-
Bug
-
Resolution: Fixed
-
Minor
-
3.3.5, 3.4.3, 3.5
-
MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
-
MOODLE_34_STABLE, MOODLE_35_STABLE
-
MDL-62262-master -
The quiz page (mod/quiz/index) accessed from Activities > Quiz incorrectly display "No close date" when it has one or a the incorrect date when user and group overrides are used. The incorrect information is displayed for those students that don't have an override.
We have students miss close dates as they have seen 'No close date' displayed on this page when there are close dates.
This is what students are seeing from my testing. I have tested this in our institutions Moodle 3.1 and on https://qa.moodle.net whcih I presume is running 3.4
My results
No overrides
- Where there isn't a close date - Fail - Nothing is displayed instead of 'No close date'
- Where there is a close date - Pass - The correct date displays
With a user override
User with the override:
- Where there isn't a close date - Fail - No date displays instead of 'No close date'
- Where there is a close date - Pass - Displays the override date
Users without overrides:
- Where there isn't a close date - Fail - No date displays instead of 'No close date'
- Where there is a close date - Fail - Displays 'No close date' instead of default date
With a group override
User in a group with override:
- Where there isn't a close date - Fail - No date displays instead of 'No close date'
- Where there is a close date - Pass - Override date displays
Users without overrides:
- Where there isn't a close date - Fail - No date displays instead of 'No close date'
- Where there is a close date - Fail - Override date displays instead of default date
The quiz dates in other areas I have tested are correct. It is just this page that has the issues.
Error
In qa.moodle.net I see this error on the page where another student has a quiz override
Notice: Undefined offset: 17 in /opt/app/mod/quiz/index.php on line 151
Notice: Trying to get property of non-object in /opt/app/mod/quiz/index.php on line 151
Notice: Undefined offset: 17 in /opt/app/mod/quiz/index.php on line 151
Notice: Trying to get property of non-object in /opt/app/mod/quiz/index.php on line 151
Testing
- Set up a group to be used for quiz overrides
- Enrol two students in the course
- Add one student to the override group
- Set up a quiz with at least one question. Don't set a close date
- Log in as the two students
- Give the first student an override for the quiz and set a due date
View the Activities > Quiz page for each of the students. - Check the student with a date override displays
- Do further testing to cover the scenarios above.
Attached are some screenshots and a backup of the qa.moodle.net course I used for testing
To reproduce the display of false values:
- Import the course.
- Add student101 to the "Quiz override group" group.
- Add a group override for the "Quiz override group" for the "Open date in the past (1 Jan 2018). Close in the future (31 Dec 2018)" quiz setting the enddate to january 1st 2019.
- Access the Quiz index page(mod/quiz/index) as student100 which should not be affected by the override to experience the lastmost mentioned example above.
To reproduce the display of the notice:
- Enable the display of Notices by setting Site Administration → Development → Debugging → Debug messages to "DEVELOPER: extra Moodle debug messages for developers"
- Import the course.
- Add a user override for the "Student 101" user for the "No open date. Close in the future (31 Dec 2018)" quiz setting the enddate to january 1st 2019.
- Access the Quiz index page(mod/quiz/index) as student100.
- has been marked as being related by
-
MDL-62761 Lesson index page does not take user and group overrides into account when displaying closing dates
- Closed