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

Paginate the sort-by-courses page in the timeline view

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Critical Critical
    • 3.3
    • 3.3
    • Blocks
    • MOODLE_33_STABLE
    • MOODLE_33_STABLE
    • MDL-58464-master
    • Hide
      1. You can either run the attached script (create_a_bunch_of_courses.php) (on a new install with only the admin user and no courses) or manually create more than 6 in-progress (start date before today and end date after today) courses with a bunch of activities that have calendar events (e.g. assignment with a due date) and enrolled users
      2. Open the developer tools for your browser of choice
      3. Log in as one of the students
      4. Go to your dashboard (if you aren't there already)
      5. Check the network requests that were sent and confirm that one for core_calendar_get_action_events_by_courses was not sent
      6. Click the "sort by courses" button
      7. Check the network requests and confirm that a core_calendar_get_action_events_by_courses was sent
      8. Confirm that only six courses are shown and underneath them is a "More courses" button
      9. Click the "More courses" button and confirm that more courses are appended to the list
      10. Keep clicking the button until there are no more courses to display
      11. Confirm the button is disabled when there are no more courses to display
      12. Create a student that is not enrolled in any courses
      13. Create a course that starts in the future (start date after today)
      14. Log in as the student
      15. View the sort by courses view and confirm that the "no courses" placeholder is shown
      16. Enrol the student in the future course
      17. Log back in as the student
      18. View the sort by courses view again and confirm that you're still seeing the placeholder
      Show
      You can either run the attached script (create_a_bunch_of_courses.php) (on a new install with only the admin user and no courses) or manually create more than 6 in-progress (start date before today and end date after today) courses with a bunch of activities that have calendar events (e.g. assignment with a due date) and enrolled users Open the developer tools for your browser of choice Log in as one of the students Go to your dashboard (if you aren't there already) Check the network requests that were sent and confirm that one for core_calendar_get_action_events_by_courses was not sent Click the "sort by courses" button Check the network requests and confirm that a core_calendar_get_action_events_by_courses was sent Confirm that only six courses are shown and underneath them is a "More courses" button Click the "More courses" button and confirm that more courses are appended to the list Keep clicking the button until there are no more courses to display Confirm the button is disabled when there are no more courses to display Create a student that is not enrolled in any courses Create a course that starts in the future (start date after today) Log in as the student View the sort by courses view and confirm that the "no courses" placeholder is shown Enrol the student in the future course Log back in as the student View the sort by courses view again and confirm that you're still seeing the placeholder

      The sort-by-courses page in the timeline view currently shows all of the in-progress courses that the user is enrolled in which results in a big request to the server to get all of the events for each of those courses.

      Instead we should only show the first 6 courses (consistent with the courses tab) and then show a "More courses" button at the bottom of the list to load the next 6 courses. When that button is clicked it should send a single request to the server to get the events for the next 6 courses and then render the result at the bottom of the list.

            ryanwyllie Ryan Wyllie
            ryanwyllie Ryan Wyllie
            cameron1729 cameron1729
            Dan Poltawski Dan Poltawski
            Marina Glancy Marina Glancy
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

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