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

Clicking "Finish Review" after a quiz set to Full screen popup with Javascript security results in a 404 to /mod/quiz/0 if not in a popup window

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.10.7, 3.11.3
    • 3.9.8, 3.9.9, 3.10.5, 3.10.6, 3.11.1, 3.11.2
    • Quiz
    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
    • MOODLE_310_STABLE, MOODLE_311_STABLE
    • Hide
      1. Create a quiz with the "Browser security" option set to "Full screen popup with some Javascript security"
      2. Start a quiz attempt as a student
      3. Copy the URL from the popup window and open it in a new tab in the main browser window
      4. Finish the quiz and click "Finish Review" after reviewing the quiz attempt
      5. Without the patch, the user is redirected to /mod/quiz/0 resulting in a 404 error (instead of being redirected to the main quiz page with the summary of previous attempts)
      Show
      Create a quiz with the "Browser security" option set to "Full screen popup with some Javascript security" Start a quiz attempt as a student Copy the URL from the popup window and open it in a new tab in the main browser window Finish the quiz and click "Finish Review" after reviewing the quiz attempt Without the patch, the user is redirected to /mod/quiz/0 resulting in a 404 error (instead of being redirected to the main quiz page with the summary of previous attempts)

      This is a reopen of MDL-70144.

      Steps to reproduce:

      1. Create a quiz with the "Browser security" option set to "Full screen popup with some Javascript security"
      2. Start a quiz attempt as a student
      3. Copy the URL from the popup window and open it in a new tab in the main browser window
      4. Finish the quiz and click "Finish Review" after reviewing the quiz attempt

      What I expected:

      Redirection to the main quiz page with the summary of previous attempts.

      What actually happens:

      Redirection to /mod/quiz/0 resulting in a 404 error.

      Suspected cause:

      In mod/quiz/module.js:285 the close function of the secure window is called without the first parameter "Y", causing the other parameters to be misinterpreted. Specifically, the delay of 0 gets passed as the url, which is why we are redirected to /mod/quiz/0.

      This issue affects many students on our Moodle site (>50% of quiz participants), most of whom definitely didn't manually open the URL from the popup window in another tab. I suspect that this is caused by their browsers blocking the popup window and opening the quiz in a new tab instead.

      I will attach a proposed solution (removing the parameter "Y" from the close function) shortly.

            bonczek Lars Bonczek
            bonczek Lars Bonczek
            Tim Hunt Tim Hunt
            Andrew Lyons Andrew Lyons
            Gladys Basiana Gladys Basiana
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 50 minutes
                50m

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