SCORM MDL-21555 improved Report interface - now allows export as text/excel/ods...
[moodle.git] / mod / scorm / reportsettings_form.php
1 <?php
2 require_once "$CFG->libdir/formslib.php";
3 class mod_scorm_report_settings extends moodleform {
4     
5     function definition() {
6         global $COURSE;
7         $mform    =& $this->_form;
8         //-------------------------------------------------------------------------------
9         $mform->addElement('header', 'preferencespage', get_string('preferencespage', 'scorm'));
11         $options = array();
12         if ($this->_customdata['currentgroup'] || $COURSE->id != SITEID) {
13             $options[SCORM_REPORT_ATTEMPTS_ALL_STUDENTS] = get_string('optallstudents','scorm');
14             $options[SCORM_REPORT_ATTEMPTS_STUDENTS_WITH] = get_string('optattemptsonly','scorm');
15             $options[SCORM_REPORT_ATTEMPTS_STUDENTS_WITH_NO] = get_string('optnoattemptsonly', 'scorm');
16         }
17         $mform->addElement('select', 'attemptsmode', get_string('show', 'scorm'), $options);
19         //-------------------------------------------------------------------------------
20         $mform->addElement('header', 'preferencesuser', get_string('preferencesuser', 'scorm'));
22         $mform->addElement('text', 'pagesize', get_string('pagesize', 'scorm'));
23         $mform->setType('pagesize', PARAM_INT);
25         $mform->addElement('selectyesno', 'detailedrep', get_string('details', 'scorm'));
27         $this->add_action_buttons(false, get_string('savepreferences'));
28     }
29     
30 }