mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 09:26:35 +02:00
quiz settings: MDL-16781 Avoid concatenating and calling strtolower on language strings.
This commit is contained in:
parent
f2c86f9445
commit
ab652c35ee
1 changed files with 3 additions and 5 deletions
|
@ -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"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue