3 require_once($CFG->libdir
.'/formslib.php');
5 class course_import_activities_form_1
extends moodleform
{
7 function definition() {
10 $mform =& $this->_form
;
11 $text = $this->_customdata
['text'];
12 $options = $this->_customdata
['options'];
13 $courseid = $this->_customdata
['courseid'];
14 $mform->addElement('header', 'general', '');//fill in the data depending on page params
15 //later using set_data
16 $mform->addElement('select', 'fromcourse', $text, $options);
19 $submit_string = get_string('usethiscourse');
20 $this->add_action_buttons(false, $submit_string);
22 $mform->addElement('hidden', 'id');
23 $mform->setType('id', PARAM_INT
);
24 $mform->setConstants(array('id'=> $courseid));
28 function validation($data) {
34 class course_import_activities_form_2
extends moodleform
{
36 function definition() {
39 $mform =& $this->_form
;
40 $courseid = $this->_customdata
['courseid'];
42 $mform->addElement('header', 'general', '');//fill in the data depending on page params
43 //later using set_data
44 $mform->addElement('text', 'fromcoursesearch', get_string('searchcourses'));
47 $this->add_action_buttons(false, get_string('searchcourses'));
49 $mform->addElement('hidden', 'id');
50 $mform->setType('id', PARAM_INT
);
51 $mform->setConstants(array('id'=> $courseid));
55 function validation($data) {