Browse files

MDL-35794 quiz: config for whether Outcomes are advanced settings

  • Loading branch information...
1 parent 83a23ea commit 0c49b6c445a66264026875d3fd15db9f2b95aaed @dtle dtle committed with stronk7 Oct 16, 2012
Showing with 12 additions and 0 deletions.
  1. +2 −0 mod/quiz/lang/en/quiz.php
  2. +3 −0 mod/quiz/mod_form.php
  3. +7 −0 mod/quiz/settings.php
@@ -166,6 +166,7 @@
$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 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}';
@@ -385,6 +385,9 @@ protected function definition() {
// -------------------------------------------------------------------------------
+ // Check and act on whether setting outcomes is considered an advanced setting.
+ $mform->setAdvanced('modoutcomes', !empty($quizconfig->outcomes_adv));
// -------------------------------------------------------------------------------
@@ -193,6 +193,13 @@
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)) {

0 comments on commit 0c49b6c

Please sign in to comment.