mirror of
https://github.com/moodle/moodle.git
synced 2025-08-07 18:06:51 +02:00
MDL-55979 quiz: Fix error moving question from last page
When moving the last question from the last page to the last slot of the previous page would show the error in the error log but move successfully.
This commit is contained in:
parent
932bc91cb4
commit
72b8806abc
2 changed files with 20 additions and 1 deletions
|
@ -715,7 +715,8 @@ class structure {
|
|||
}
|
||||
|
||||
$followingslotnumber = $moveafterslotnumber + 1;
|
||||
if ($followingslotnumber == $movingslotnumber) {
|
||||
// Prevent checking against non-existance slot when already at the last slot.
|
||||
if ($followingslotnumber == $movingslotnumber && !$this->is_last_slot_in_quiz($followingslotnumber)) {
|
||||
$followingslotnumber += 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue