diff --git a/mod/quiz/lang/en/quiz.php b/mod/quiz/lang/en/quiz.php index b2619d7e2c2..14ab98e5221 100644 --- a/mod/quiz/lang/en/quiz.php +++ b/mod/quiz/lang/en/quiz.php @@ -166,6 +166,7 @@ $string['configintro'] = 'The values you set here define the default values that $string['configmaximumgrade'] = 'The default grade that the quiz grade is scaled to be out of.'; $string['confignewpageevery'] = 'When adding questions to the quiz page breaks will automatically be inserted according to the setting you choose here.'; $string['confignavmethod'] = 'In Free navigation, questions may be answered in any order using navigation. In Sequential, questions must be answered in strict sequence.'; +$string['configoutcomesadvanced'] = 'If this option is turned on, then the Outcomes on the quiz editing form are advanced settings.'; $string['configpenaltyscheme'] = 'Penalty subtracted for each wrong response in adaptive mode.'; $string['configpopup'] = 'Force the attempt to open in a popup window, and use JavaScript tricks to try to restrict copy and paste, etc. during quiz attempts.'; $string['configrequirepassword'] = 'Students must enter this password before they can attempt the quiz.'; @@ -518,6 +519,7 @@ To add page breaks after particular questions, tick the checkboxes next to the q To arrange the questions over a number of pages, click the Repaginate button and select the desired number of questions per page.'; $string['orderingquiz'] = 'Order and paging'; $string['orderingquizx'] = 'Order and paging: {$a}'; +$string['outcomesadvanced'] = 'Outcomes are advanced settings'; $string['outof'] = '{$a->grade} out of a maximum of {$a->maxgrade}'; $string['outofpercent'] = '{$a->grade} out of a maximum of {$a->maxgrade} ({$a->percent}%)'; $string['outofshort'] = '{$a->grade}/{$a->maxgrade}'; diff --git a/mod/quiz/mod_form.php b/mod/quiz/mod_form.php index e40de89e904..13113cddb3d 100644 --- a/mod/quiz/mod_form.php +++ b/mod/quiz/mod_form.php @@ -385,6 +385,9 @@ class mod_quiz_mod_form extends moodleform_mod { // ------------------------------------------------------------------------------- $this->standard_coursemodule_elements(); + // Check and act on whether setting outcomes is considered an advanced setting. + $mform->setAdvanced('modoutcomes', !empty($quizconfig->outcomes_adv)); + // ------------------------------------------------------------------------------- $this->add_action_buttons(); } diff --git a/mod/quiz/settings.php b/mod/quiz/settings.php index 7efd52606f5..0a27db2e410 100644 --- a/mod/quiz/settings.php +++ b/mod/quiz/settings.php @@ -193,6 +193,13 @@ $quizsettings->add(new mod_quiz_admin_setting_browsersecurity('quiz/browsersecur get_string('showinsecurepopup', 'quiz'), get_string('configpopup', 'quiz'), array('value' => '-', 'adv' => true), null)); +// Allow user to specify if setting outcomes is an advanced setting +if (!empty($CFG->enableoutcomes)) { + $quizsettings->add(new admin_setting_configcheckbox('quiz/outcomes_adv', + get_string('outcomesadvanced', 'quiz'), get_string('configoutcomesadvanced', 'quiz'), + '0')); +} + // Now, depending on whether any reports have their own settings page, add // the quiz setting page to the appropriate place in the tree. if (empty($reportsbyname)) {