]> git.mjollnir.org Git - moodle.git/commitdiff
quiz settings: MDL-16781 Avoid concatenating and calling strtolower on language strings.
authortjhunt <tjhunt>
Fri, 5 Dec 2008 04:20:26 +0000 (04:20 +0000)
committertjhunt <tjhunt>
Fri, 5 Dec 2008 04:20:26 +0000 (04:20 +0000)
mod/quiz/mod_form.php

index d380a0fa2cf214adea2300a149d8429691b9ae25..aa16ff235b032db8d0aea06431fb07de49d9c787 100644 (file)
@@ -100,11 +100,9 @@ class mod_quiz_mod_form extends moodleform_mod {
 
 //-------------------------------------------------------------------------------
         $mform->addElement('header', 'attemptshdr', get_string('attempts', 'quiz'));
-        $attemptoptions = array();
-        $attemptoptions[0] = get_string("attemptsunlimited", "quiz");
-        $attemptoptions[1] = "1 ".moodle_strtolower(get_string("attempt", "quiz"));
-        for ($i=2;$i<=6;$i++) {
-            $attemptoptions[$i] = "$i ".moodle_strtolower(get_string("attempts", "quiz"));
+        $attemptoptions = array('0' => get_string('unlimited'));
+        for ($i = 1; $i <= 10; $i++) {
+            $attemptoptions[$i] = $i;
         }
         $mform->addElement('select', 'attempts', get_string("attemptsallowed", "quiz"), $attemptoptions);
         $mform->setHelpButton('attempts', array("attempts", get_string("attemptsallowed","quiz"), "quiz"));