Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-62262

Quiz index page(mod/quiz/index) incorrectly displays 'No close date' and wrong due dates

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.4.5, 3.5.2
    • 3.3.5, 3.4.3, 3.5
    • Quiz
    • MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • MOODLE_34_STABLE, MOODLE_35_STABLE
    • MDL-62262-master
    • Hide
      • Import the attached 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.
      • Cross-check it shows 31 Dec 2018.
      • 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.
      • Cross-check it shows no notice

      Plus: do check Garry's use cases.

      My results

      No overrides

      • Where there isn't a close date - Fail - Nothing is displayed instead of 'No close date' – FIX: 'No close date' is displayed.
      • 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' – FIX: 'No close date' is displayed.
      • 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' – FIX: 'No close date' is displayed.
      • Where there is a close date - Fail - Displays 'No close date' instead of default date – FIX: default date is displayed.

      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' – FIX: 'No close date' is displayed.
      • 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' – FIX: 'No close date' is displayed.
      • Where there is a close date - Fail - Override date displays instead of default date – FIX: default date is displayed.
      Show
      Import the attached 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. Cross-check it shows 31 Dec 2018. 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. Cross-check it shows no notice Plus: do check Garry's use cases. My results No overrides Where there isn't a close date - Fail - Nothing is displayed instead of 'No close date' – FIX: 'No close date' is displayed. 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' – FIX: 'No close date' is displayed. 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' – FIX: 'No close date' is displayed. Where there is a close date - Fail - Displays 'No close date' instead of default date – FIX: default date is displayed. 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' – FIX: 'No close date' is displayed. 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' – FIX: 'No close date' is displayed. Where there is a close date - Fail - Override date displays instead of default date – FIX: default date is displayed.

      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.

            lucaboesch Luca Bösch
            gedmonds Garry Edmonds
            Tim Hunt Tim Hunt
            David Monllaó David Monllaó
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            5 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 30 minutes
                1h 30m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.