adding some strings
[moodle-linuxchix.git] / course / import / activities / import_form.php
blob5bbba0680910e473243869026f31d9d6d6332689
1 <?php // $Id$
3 require_once($CFG->libdir.'/formslib.php');
5 class course_import_activities_form_1 extends moodleform {
7 function definition() {
9 global $CFG;
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);
18 // buttons
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) {
29 return true;
34 class course_import_activities_form_2 extends moodleform {
36 function definition() {
38 global $CFG;
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'));
46 // buttons
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) {
56 return true;