quiz settings: MDL-16781 Avoid concatenating and calling strtolower on language strings.

This commit is contained in:
tjhunt 2008-12-05 04:20:26 +00:00
parent f2c86f9445
commit ab652c35ee

View file

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