SHARE
TWEET

Untitled

a guest Dec 9th, 2019 84 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $handlers = array();
  2. foreach (get_fast_modinfo($COURSE->id)->get_cms() as $cm) {
  3.     $name = $cm->name;
  4.     $link = $cm->url;
  5.     $mform = new simplehtml_form($name, $link);
  6.     array_push($handlers, $mform);
  7.     $mform->set_data($toform);
  8.     $html = $mform->render();
  9. }
  10.  
  11. foreach ($handlers as $h) {
  12.     if ($h->get_data()) {
  13.         echo('prints only the submit data of the first. WHY???');
  14.         var_dump($h->get_data());
  15.     }            
  16. }
  17.  
  18. $this->content = new stdClass;
  19. $this->content->text = $html;
  20. return $this->content;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top