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

Recently accessed items block does not handle deleted courses

    XMLWordPrintable

    Details

      Description

      The recently accessed items block does not check whether a course exists before attempting to load items from it.

      The result is that loading a dashboard containing that block, where a user's recently accessed items include any from a deleted course, will result in an error being thrown to the user, and the entire list of recently accessed items not loading.

      To replicate:

      1. Log in as admin.
      2. Create a test course that you will delete later in the test. Note the ID of the course. Create or have at least one other course (that will not be deleted).
      3. Create or interact with some activity (eg forum) on both courses.
      4. Navigate to the Dashboard. Add the recently accessed items block if it does not already exist.
      5. CONFIRM the two activities from step 3 exist in the recently accessed items block.
      6. Delete one of the courses.
      7. Return to the Dashboard.
      8. CONFIRM you now receive an error. If you have dev debugging enabled, the error will reference the course ID noted in step 2 above.
      9. CONFIRM no items load in the recently accessed items block (whether the course exists or not).

        Attachments

          Activity

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                8/Jul/19

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 30 minutes
                1h 30m