From ab652c35ee3c3761535bdd8624d671187660563e Mon Sep 17 00:00:00 2001 From: tjhunt Date: Fri, 5 Dec 2008 04:20:26 +0000 Subject: [PATCH] quiz settings: MDL-16781 Avoid concatenating and calling strtolower on language strings. --- mod/quiz/mod_form.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mod/quiz/mod_form.php b/mod/quiz/mod_form.php index d380a0fa2c..aa16ff235b 100644 --- a/mod/quiz/mod_form.php +++ b/mod/quiz/mod_form.php @@ -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")); -- 2.39.5