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:
Paul Holden
2022-11-09 18:54:08 +00:00
parent 28043b9b2e
commit c3367700c2
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -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;
}
+1 -1
View File
@@ -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;
}