Merge branch 'm20_MDL-26176_cleanup' of github.com:danmarsden/moodle
[moodle.git] / mod / scorm / reportsettings_form.php
... / ...
CommitLineData
1<?php
2if (!defined('MOODLE_INTERNAL')) {
3 die('Direct access to this script is forbidden.'); /// It must be included from a Moodle page
4}
5
6require_once "$CFG->libdir/formslib.php";
7class mod_scorm_report_settings extends moodleform {
8
9 function definition() {
10 global $COURSE;
11 $mform =& $this->_form;
12 //-------------------------------------------------------------------------------
13 $mform->addElement('header', 'preferencespage', get_string('preferencespage', 'scorm'));
14
15 $options = array();
16 if ($this->_customdata['currentgroup'] || $COURSE->id != SITEID) {
17 $options[SCORM_REPORT_ATTEMPTS_ALL_STUDENTS] = get_string('optallstudents','scorm');
18 $options[SCORM_REPORT_ATTEMPTS_STUDENTS_WITH] = get_string('optattemptsonly','scorm');
19 $options[SCORM_REPORT_ATTEMPTS_STUDENTS_WITH_NO] = get_string('optnoattemptsonly', 'scorm');
20 }
21 $mform->addElement('select', 'attemptsmode', get_string('show', 'scorm'), $options);
22
23 //-------------------------------------------------------------------------------
24 $mform->addElement('header', 'preferencesuser', get_string('preferencesuser', 'scorm'));
25
26 $mform->addElement('text', 'pagesize', get_string('pagesize', 'scorm'));
27 $mform->setType('pagesize', PARAM_INT);
28
29 $mform->addElement('selectyesno', 'detailedrep', get_string('details', 'scorm'));
30
31 $this->add_action_buttons(false, get_string('savepreferences'));
32 }
33
34}