Hi,
I want to insert multi select list courses in the courseid column in separate table, a custom functionality i am working on.
Here's the code:
$options = array();
$allcourses = coursecat::get(0)->get_courses(array('recursive' => true));
foreach ($allcourses as $course) {$options[$course->id] = $course->fullname;}
$mform->addElement('select', 'courseid', get_string('course'), $options)->setMultiple(true);
i fail to insert list of courses in courseid column. Any help will be much appreciated.
Thanks