MDL-75872 mod_lesson: allow unlimited attempts default value.
Related change in 252e85be added a similar value per activity, we
should also allow it to be chosen as a default for the site.
This commit is contained in:
@@ -223,7 +223,7 @@ class lesson_override_form extends moodleform {
|
||||
$mform->setDefault('review', $this->lesson->review);
|
||||
|
||||
// Number of attempts.
|
||||
$numbers = array();
|
||||
$numbers = ['0' => get_string('unlimited')];
|
||||
for ($i = 10; $i > 0; $i--) {
|
||||
$numbers[$i] = $i;
|
||||
}
|
||||
|
||||
@@ -125,7 +125,7 @@ if ($ADMIN->fulltree) {
|
||||
get_string('displayreview', 'lesson'), get_string('displayreview_help', 'lesson'),
|
||||
array('value' => 0, 'adv' => false), $yesno));
|
||||
|
||||
$attempts = array();
|
||||
$attempts = ['0' => get_string('unlimited')];
|
||||
for ($i = 10; $i > 0; $i--) {
|
||||
$attempts[$i] = $i;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user