MDL-3030 quiz settings: reorganise form before adding new fields.
This commit is contained in:
@@ -757,6 +757,7 @@ $string['timelimitsec'] = 'Time limit (seconds)';
|
||||
$string['timestr'] = '%H:%M:%S on %d/%m/%y';
|
||||
$string['timesup'] = 'Time is up!';
|
||||
$string['timetaken'] = 'Time taken';
|
||||
$string['timing'] = 'Timing';
|
||||
$string['tofile'] = 'to file';
|
||||
$string['tolerance'] = 'Tolerance';
|
||||
$string['toomanyrandom'] = 'The number of random questions required is more than are still available in the category!';
|
||||
|
||||
+11
-8
@@ -73,6 +73,9 @@ class mod_quiz_mod_form extends moodleform_mod {
|
||||
// Introduction.
|
||||
$this->add_intro_editor(false, get_string('introduction', 'quiz'));
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
$mform->addElement('header', 'timing', get_string('timing', 'quiz'));
|
||||
|
||||
// Open and close dates.
|
||||
$mform->addElement('date_time_selector', 'timeopen', get_string('quizopen', 'quiz'),
|
||||
array('optional' => true, 'step' => 1));
|
||||
@@ -88,6 +91,14 @@ class mod_quiz_mod_form extends moodleform_mod {
|
||||
$mform->setAdvanced('timelimit', $quizconfig->timelimit_adv);
|
||||
$mform->setDefault('timelimit', $quizconfig->timelimit);
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
// Grade settings
|
||||
$this->standard_grading_coursemodule_elements();
|
||||
|
||||
$mform->removeElement('grade');
|
||||
$mform->addElement('hidden', 'grade', $quizconfig->maximumgrade);
|
||||
$mform->setType('grade', PARAM_NUMBER);
|
||||
|
||||
// Number of attempts.
|
||||
$attemptoptions = array('0' => get_string('unlimited'));
|
||||
for ($i = 1; $i <= QUIZ_MAX_ATTEMPT_OPTION; $i++) {
|
||||
@@ -106,14 +117,6 @@ class mod_quiz_mod_form extends moodleform_mod {
|
||||
$mform->setDefault('grademethod', $quizconfig->grademethod);
|
||||
$mform->disabledIf('grademethod', 'attempts', 'eq', 1);
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
// Grade settings
|
||||
$this->standard_grading_coursemodule_elements();
|
||||
|
||||
$mform->removeElement('grade');
|
||||
$mform->addElement('hidden', 'grade', $quizconfig->maximumgrade);
|
||||
$mform->setType('grade', PARAM_NUMBER);
|
||||
|
||||
//-------------------------------------------------------------------------------
|
||||
$mform->addElement('header', 'layouthdr', get_string('layout', 'quiz'));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user