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

Check course enrolment later in event factory early bailout check

XMLWordPrintable

    • MOODLE_34_STABLE
    • MOODLE_35_STABLE
    • MDL-60960-master
    • Hide

      Test

      1. Log in as admin
      2. Create 3 courses, C1, C3, and C3
      3. Create a user (s1) and enrol them as a student in C1 and C3
      4. Hide course C3 (set “Course visibility” to “Hide” in course settings)
      5. For each of the 3 courses, create a course event
        • View the course then click “Calendar” in the nav drawer which takes you to the course calendar to create the events
      6. Log in as s1
      7. View the calendar
      8. CONFIRM that you only see the course event for course C1. The event from C2 should not be visible because user s1 is not enrolled in that course and the event from C3 should not be visible because the course is hidden
      9. Log in as admin
      10. Give s1 the “teacher” role in C3 (the hidden course)
        • View the course and go to “Participants” in the nav drawer
      11. Log in as s1
      12. View the calendar
      13. CONFIRM that you can now see the event from C3 (along with the event from C1) because teachers can see hidden courses
      Show
      Test Log in as admin Create 3 courses, C1, C3, and C3 Create a user (s1) and enrol them as a student in C1 and C3 Hide course C3 (set “Course visibility” to “Hide” in course settings) For each of the 3 courses, create a course event View the course then click “Calendar” in the nav drawer which takes you to the course calendar to create the events Log in as s1 View the calendar CONFIRM that you only see the course event for course C1. The event from C2 should not be visible because user s1 is not enrolled in that course and the event from C3 should not be visible because the course is hidden Log in as admin Give s1 the “teacher” role in C3 (the hidden course) View the course and go to “Participants” in the nav drawer Log in as s1 View the calendar CONFIRM that you can now see the event from C3 (along with the event from C1) because teachers can see hidden courses

      The early bailout check for the event factory checks that the user is enrolled in the course for a course event. This is just one of many checks that it does however it is one of the more expensive checks in terms of DB queries so it should only be done once we've performed all of the lighter weight checks and rules them out of the early bailout.

            ryanwyllie Ryan Wyllie
            ryanwyllie Ryan Wyllie
            Mihail Geshoski Mihail Geshoski
            David Monllaó David Monllaó
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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