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

Recent activity block does not display assignments that are visited

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Regression testing covered by behat and phpunit

      Setup

      • Create a course (Course 1)
      • Create an Assignment (Test Assignment) in Course 1 set:
        • Allow submissions from for the past
        • Due date for tomorrow
        • Remind me to grade by for 2 days time
      • Create a Page (Another activity) in Course 1
      • Create two users:
        • Jane Student
        • John Teacher
      • Enrol Jane Student on Course 1 as a Student
      • Enrol John Teacher on Course 1 as a Teacher
      • Enable the Legacy Log log store
        • The Log legacy data setting must be checked

      Backwards compatibility with old events and the legacy log

      1. Ensure you are on a version of Moodle without this patch
      2. Login as Jane Student
      3. Navigate to Test Assignment
      4. Click on the Add submission button
      5. Login as John Teacher
      6. Navigate to Test Assignment
      7. Click on the Grade button
      8. Upgrade to a version of Moodle with this patch
      9. Login as John Teacher
      10. Navigate to Test Assignment
      11. From the assignment cog menu select Logs
      12. Confirm that there are no errors.
      13. Verify that the following log entries exist in the Standard log:
        1. Jane Student viewed the submission status
        2. Jane Student viewed the submission form
        3. John Teacher viewed the submission status
        4. John Teacher viewed the grading form
      14. Verify that the following log entries exist in the Legacy log:
        1. Jane Student has the assign_view event
        2. Jane Student has the assign_view submit assignment form event
        3. John Teacher has the assign_view event
        4. John Teacher has the assign_view submission grading table event
      15. Login as Jane Student
      16. Navigate to Test Assignment
      17. Click on the Add submission button
      18. Login as John Teacher
      19. Navigate to Test Assignment
      20. Click on the Grade button
      21. Upgrade to a version of Moodle with this patch
      22. Login as John Teacher
      23. Navigate to Test Assignment
      24. From the assignment cog menu select Logs
      25. Verify that the new Legacy log events match the details of the ones created before the patch was applied.

      Student sees recent assignments

      1. Login as Jane Student
      2. Add the "Recently accessed items" and "Timeline" blocks to the Dashboard if not present
      3. Navigate to Course 1
      4. Follow the link to Test Assignment
      5. Navigate to Course 1 and visit Another activity
      6. Navigate to the dashboard
      7. Confirm that Test Assignment is displayed as the second item in the "Recently accessed items" block
      8. Click the Test is due item in the Timeline block (do not submit anything)
      9. Navigate to the dashboard
      10. Confirm that Test Assignment is now the first item in the "Recently accessed items" block

      Teacher sees recent assignments

      1. Login as Jane Student
      2. Click the Test is due item in the Timeline block
      3. Submit something to the assignment.
      4. Login as John Teacher
      5. Add the "Recently accessed items" block to the Dashboard if not present
      6. Navigate to Course 1
      7. Follow the link to Test Assignment
      8. Navigate to Course 1 and visit Another activity
      9. Navigate to the dashboard
      10. Confirm that Test Assignment is displayed as the second item in the "Recently accessed items" block
      11. Click the Test is due to be graded item in the Timeline block
      12. Navigate to the dashboard
      13. Confirm that Test Assignment is now the first item in the "Recently accessed items" block
      Show
      Regression testing covered by behat and phpunit Setup Create a course (Course 1) Create an Assignment (Test Assignment) in Course 1 set: Allow submissions from for the past Due date for tomorrow Remind me to grade by for 2 days time Create a Page (Another activity) in Course 1 Create two users: Jane Student John Teacher Enrol Jane Student on Course 1 as a Student Enrol John Teacher on Course 1 as a Teacher Enable the Legacy Log log store The Log legacy data setting must be checked Backwards compatibility with old events and the legacy log Ensure you are on a version of Moodle without this patch Login as Jane Student Navigate to Test Assignment Click on the Add submission button Login as John Teacher Navigate to Test Assignment Click on the Grade button Upgrade to a version of Moodle with this patch Login as John Teacher Navigate to Test Assignment From the assignment cog menu select Logs Confirm that there are no errors. Verify that the following log entries exist in the Standard log : Jane Student viewed the submission status Jane Student viewed the submission form John Teacher viewed the submission status John Teacher viewed the grading form Verify that the following log entries exist in the Legacy log : Jane Student has the assign_view event Jane Student has the assign_view submit assignment form event John Teacher has the assign_view event John Teacher has the assign_view submission grading table event Login as Jane Student Navigate to Test Assignment Click on the Add submission button Login as John Teacher Navigate to Test Assignment Click on the Grade button Upgrade to a version of Moodle with this patch Login as John Teacher Navigate to Test Assignment From the assignment cog menu select Logs Verify that the new Legacy log events match the details of the ones created before the patch was applied. Student sees recent assignments Login as Jane Student Add the "Recently accessed items" and "Timeline" blocks to the Dashboard if not present Navigate to Course 1 Follow the link to Test Assignment Navigate to Course 1 and visit Another activity Navigate to the dashboard Confirm that Test Assignment is displayed as the second item in the "Recently accessed items" block Click the Test is due item in the Timeline block (do not submit anything) Navigate to the dashboard Confirm that Test Assignment is now the first item in the "Recently accessed items" block Teacher sees recent assignments Login as Jane Student Click the Test is due item in the Timeline block Submit something to the assignment. Login as John Teacher Add the "Recently accessed items" block to the Dashboard if not present Navigate to Course 1 Follow the link to Test Assignment Navigate to Course 1 and visit Another activity Navigate to the dashboard Confirm that Test Assignment is displayed as the second item in the "Recently accessed items" block Click the Test is due to be graded item in the Timeline block Navigate to the dashboard Confirm that Test Assignment is now the first item in the "Recently accessed items" block
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_36_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      Assignments do not show up in the Recent activities block

      To reproduce

      1. Add a Recent activities block to the Dashboard
      2. Visit a course with an assignment
      3. Click the assignment
      4. Go back to the Dashboard

      Expected result

      The assignment will be the first item displayed in the list

      Actual result

      The assignment is not displayed.

      Note

      It looks as though the assignment activity does not generate any \core\event\course_module_viewed events (which the block relies on)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: