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

User tours trying to display in the middle of a redirect cause an error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6.1
    • Fix Version/s: 3.5.5, 3.6.3
    • Component/s: User Tours
    • Labels:
    • Testing Instructions:
      Hide
      1. Login as any user
      2. From the page footer choose "Reset user tour on this page"
        1. Confirm that the user tour was shown
      Original testing instructions (tester please ignore)

      I have not managed to reproduce this myself. I just spotted the problem by inspecting the code.

      You need need developer debugging on.

      You need to add a user tour that affects a page that will redirect. I think that trying to add a tour to mod/quiz/processattempt.php might achieve that.

      Then go through that redirect (if you follow my example, try submitting a quiz attempt).

      There should be no error, like the one the reporter gave.

      Show
      Login as any user From the page footer choose "Reset user tour on this page" Confirm that the user tour was shown Original testing instructions (tester please ignore) I have not managed to reproduce this myself. I just spotted the problem by inspecting the code. You need need developer debugging on. You need to add a user tour that affects a page that will redirect. I think that trying to add a tour to mod/quiz/processattempt.php might achieve that. Then go through that redirect (if you follow my example, try submitting a quiz attempt). There should be no error, like the one the reporter gave.
    • Affected Branches:
      MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE
    • Pull 3.5 Branch:
    • Pull Master Branch:

      Description

      I have set up ... a Quiz/Assignment ... but as soon as the users hits the Submit button I see an output of the SMTP dialog and what looks to ba a stack trace:

      ```

      This page did not call $PAGE->set_url(...). Using https://demomoodle.pexipacademy.com/mod/quiz/processattempt.php

       

      • line 600 of /lib/pagelib.php: call to debugging()
      • line 820 of /lib/pagelib.php: call to moodle_page->magic_get_url()
      • line 565 of /admin/tool/usertours/classes/manager.php: call to moodle_page->__get()
      • line 505 of /admin/tool/usertours/classes/helper.php: call to tool_usertours\manager::get_current_tour()
      • line 75 of /admin/tool/usertours/lib.php: call to tool_usertours\helper::bootstrap()
      • line 1346 of /lib/outputrenderers.php: call to tool_usertours_before_footer()
      • line 1201 of /lib/outputrenderers.php: call to core_renderer->footer()
      • line 2957 of /lib/weblib.php: call to core_renderer->redirect_message()
      • line 97 of /mod/quiz/processattempt.php: call to redirect()

      ```

      Moodle version Moodle 3.6.1+ (Build: 20181220)

      (Edited by Tim Hunt to remove irrelevant info about emails.)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              timhunt Tim Hunt
              Reporter:
              swinster Chris Swinney
              Peer reviewer:
              John Beedell
              Integrator:
              Andrew Nicols
              Tester:
              Janelle Barcega
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                11/Mar/19

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 10 minutes
                  10m