Browse files

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

  • Loading branch information...
1 parent 0dc5a53 commit d18f78b04672eb67e5171dd3b4088fa5c047a04c @dtle dtle committed with timhunt 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
2 mod/quiz/lang/en/quiz.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}';
3 mod/quiz/mod_form.php
@@ -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));
// -------------------------------------------------------------------------------
7 mod/quiz/settings.php
@@ -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 d18f78b

Please sign in to comment.