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

requireloginerror popup caused by user tours on enrol page

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5.4, 3.7
    • Fix Version/s: None
    • Component/s: User Tours
    • Labels:
      None
    • Affected Branches:
      MOODLE_35_STABLE, MOODLE_37_STABLE

      Description

      Steps to reproduce:

      • Create a course (Course 1)
      • Create a user tour with the following settings:
        • Name - Welcome to Course 1
        • Apply to URL match - leave this blank
        • Tour is enabled - checked
        • Tour filters: Courses - Course 1
        • All other settings should be left as default
      • Add a new step to the tour, with the following settings:
        • Target type: Display in the middle of page
        • Title: Welcome
        • Content: Welcome to Course 1
      • Make sure the tour is the first one on the list, so no other tour will be chosen instead
      • Login as the user who is not enrolled on Course 1 (and cannot view it without enrolment)
      • Try to visit Course 1
      • You will then be redirected to the enrolment page

      Expected outcome:

      • Moodle makes no attempt to launch the user tour, as the user does not have permission to access the course

      Actual outcome:

      • Moodle attempts to display the tour, but fails and shows a 'requireloginerror' popup

      Error stack trace:
      Not enrolled
      Error code: requireloginerror

      • line 2943 of /lib/moodlelib.php: require_login_exception thrown
      • line 498 of /lib/externallib.php: call to require_login()
      • line 62 of /admin/tool/usertours/classes/external/tour.php: call to external_api::validate_context()
      • line 244 of /lib/externallib.php: call to tool_usertours\external\tour::fetch_and_start_tour()
      • line 59 of /lib/ajax/service.php: call to external_api::call_external_function()

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              davosmith Davo Smith
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated: