Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $handlers = array();
- foreach (get_fast_modinfo($COURSE->id)->get_cms() as $cm) {
- $name = $cm->name;
- $link = $cm->url;
- $mform = new simplehtml_form($name, $link);
- array_push($handlers, $mform);
- $mform->set_data($toform);
- $html = $mform->render();
- }
- foreach ($handlers as $h) {
- if ($h->get_data()) {
- echo('prints only the submit data of the first. WHY???');
- var_dump($h->get_data());
- }
- }
- $this->content = new stdClass;
- $this->content->text = $html;
- return $this->content;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement