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

Notifications - Upcoming Quiz Open

XMLWordPrintable

    • MOODLE_405_STABLE
    • MDL-79718-main
    • Hide

      Scheduled task

      1. Log in as admin
      2. Go to Site admin->Server->Tasks->Scheduled tasks
      3. CONFIRM there is a task called 'Notify user of an approaching quiz open date'
      4. CONFIRM that it is set to run on a random minute, every two hours.

      Setup

      Set up your Moodle instance to be able to read outgoing emails (e.g. MailHog).

      For help setting up outgoing mail, refer to this guide.

      Testing scenario 1

      1. Log in as a teacher.
      2. Create a course and enrol a student (student1).
      3. Create a quiz with an open date one day from now (48 is the threshold).
      4. Log in as student1 and go to User -> Preferences -> Notification preferences.
      5. CONFIRM there is a notification preference called 'Quiz opens soon notification' and that both Web and Email are enabled.
      6. Run this scheduled task:

        php admin/cli/scheduled_task.php --execute=\\mod_quiz\\task\\queue_all_quiz_open_notification_tasks

      7. Run cron:

        php admin/cli/cron.php

      8. Refresh your page.
      9. Click on the notifications (top of page with 'Bell' icon) .
      10. CONFIRM there is a notification called 'Opens on xxxxx ... '
      11. Click on 'View full notification'.
      12. CONFIRM the message reads:
        Hi xxxxx,
        The quiz xxxxx in course xxxx is opening soon.
        Opens: xxxxxx
        Closes: xxxxxx
        Go to quiz
      13. Click the 'Go to quiz' link.
      14. CONFIRM that it takes you to the quiz you created earlier.
      15. Go to your email client (e.g. MailHog).
      16. CONFIRM there is an email addressed to student1 with the same message as above.

      Testing scenario 2

      1. Log back in as the teacher.
      2. Enrol another student into the course (student2).
      3. Run the scheduled task again (see above).
      4. Run cron (see above).
      5. Log in as student2.
      6. CONFIRM there is a notification (just like in the previous scenario).
      7. Log in as student1.
      8. CONFIRM that you do not have a new notification.

      Testing scenario 3

      1. Log back in as the teacher.
      2. Enrol another student (student3).
      3. Go to the quiz.
      4. Go to More->Overrides.
      5. Add a user override for student3 and set the 'Open the quiz' date one week from now and save changes.
      6. Run the scheduled task again (see above).
      7. Run cron (see above).
      8. Log in as student3
      9. CONFIRM that you do not have a new notification.
      10. Log in as the teacher
      11. Adjust the override date for the user to one hour from now.
      12. Run the scheduled task again (see above).
      13. Run cron (see above).
      14. Log in as student3
      15. CONFIRM that you have a new notification.

      Testing scenario 4

      1. Log back in as the teacher.
      2. Enrol two more students (student4 and student5)
      3. Assign these two users to a group (group1)
      4. Go to the quiz.
      5. Go to More->Overrides.
      6. Add a group override for group1 and set the 'Open the quiz' date one week from now.
      7. Run the scheduled task again (see above).
      8. Run cron (see above).
      9. Log in as student4 and student 5
      10. CONFIRM that you do not have a new notifications for either of them.
      11. Log in as the teacher
      12. Adjust the override date for the group to one hour from now.
      13. Run the scheduled task again (see above).
      14. Run cron (see above).
      15. Log in as student4 and student5
      16. CONFIRM that you have a new notifications for both of them.

      Testing scenario 5

      1. Log back in as the teacher.
      2. Go the quiz settings.
      3. Edit the 'Open the quiz' date. Just add one minute to the 'Open the quiz' date.
      4. Run the scheduled task again (see above).
      5. Run cron (see above).
      6. Log in as student1 and student2.
      7. CONFIRM that you have a new notifications for both of them using the updated date.
      Show
      Scheduled task Log in as admin Go to Site admin->Server->Tasks->Scheduled tasks CONFIRM there is a task called 'Notify user of an approaching quiz open date' CONFIRM that it is set to run on a random minute, every two hours. Setup Set up your Moodle instance to be able to read outgoing emails (e.g. MailHog). For help setting up outgoing mail, refer to this guide . Testing scenario 1 Log in as a teacher. Create a course and enrol a student (student1). Create a quiz with an open date one day from now (48 is the threshold). Log in as student1 and go to User -> Preferences -> Notification preferences. CONFIRM there is a notification preference called 'Quiz opens soon notification' and that both Web and Email are enabled. Run this scheduled task: php admin/cli/scheduled_task.php --execute=\\mod_quiz\\task\\queue_all_quiz_open_notification_tasks Run cron: php admin/cli/cron.php Refresh your page. Click on the notifications (top of page with 'Bell' icon) . CONFIRM there is a notification called 'Opens on xxxxx ... ' Click on 'View full notification'. CONFIRM the message reads: Hi xxxxx, The quiz xxxxx in course xxxx is opening soon. Opens: xxxxxx Closes: xxxxxx Go to quiz Click the 'Go to quiz' link. CONFIRM that it takes you to the quiz you created earlier. Go to your email client (e.g. MailHog). CONFIRM there is an email addressed to student1 with the same message as above. Testing scenario 2 Log back in as the teacher. Enrol another student into the course (student2). Run the scheduled task again (see above). Run cron (see above). Log in as student2. CONFIRM there is a notification (just like in the previous scenario). Log in as student1. CONFIRM that you do not have a new notification. Testing scenario 3 Log back in as the teacher. Enrol another student (student3). Go to the quiz. Go to More->Overrides. Add a user override for student3 and set the 'Open the quiz' date one week from now and save changes. Run the scheduled task again (see above). Run cron (see above). Log in as student3 CONFIRM that you do not have a new notification. Log in as the teacher Adjust the override date for the user to one hour from now. Run the scheduled task again (see above). Run cron (see above). Log in as student3 CONFIRM that you have a new notification. Testing scenario 4 Log back in as the teacher. Enrol two more students (student4 and student5) Assign these two users to a group (group1) Go to the quiz. Go to More->Overrides. Add a group override for group1 and set the 'Open the quiz' date one week from now. Run the scheduled task again (see above). Run cron (see above). Log in as student4 and student 5 CONFIRM that you do not have a new notifications for either of them. Log in as the teacher Adjust the override date for the group to one hour from now. Run the scheduled task again (see above). Run cron (see above). Log in as student4 and student5 CONFIRM that you have a new notifications for both of them. Testing scenario 5 Log back in as the teacher. Go the quiz settings. Edit the 'Open the quiz' date. Just add one minute to the 'Open the quiz' date. Run the scheduled task again (see above). Run cron (see above). Log in as student1 and student2. CONFIRM that you have a new notifications for both of them using the updated date.
    • 6
    • Team Hedgehog 2023 Review 4, Team Hedgehog 2024 Sprint 1.1, Team Hedgehog 2024 Sprint 1.2, Team Hedgehog 2024 Sprint 1.3, Team Hedgehog 2024 Sprint 1.4, Team Hedgehog 2024 Review 1, Team Hedgehog 2024 Sprint 2.1, Team Hedgehog 2024 Sprint 2.2

      Add a new notification for students when they have an quiz about to open. This will help students manage their workload. And was identified as a need from user research.

      The quiz open time was chosen based on the pattern of most quizzes where they are only open for a short time (compared to the quiz time limit).

      The notification should be sent out 48 hours before the quiz is available. In cases where a quiz is created and the time between the quiz being available and open is less than 48hours, then the notification will be sent on next run of the scheduled task.

      We've deliberately made the decision to not make the notification period configurable. This is so there are not additional course/activity level settings for teachers and admins to configure and manage. We can always revisit this design in the future.

      Copy for the notification text will need to be confirmed, but likely at a minimum need to include the quiz name, course short name and link/call to view the quiz activity.

        1. MDL-79718- 1.png
          MDL-79718- 1.png
          621 kB
        2. MDL-79718- 2.png
          MDL-79718- 2.png
          457 kB
        3. MDL-79718 - 3.png
          MDL-79718 - 3.png
          437 kB
        4. MDL-79718 - 4.png
          MDL-79718 - 4.png
          488 kB
        5. MDL-79718 - 5.png
          MDL-79718 - 5.png
          485 kB
        6. MDL-79718 -schedule task.png
          MDL-79718 -schedule task.png
          238 kB
        7. screenshot 1.png
          screenshot 1.png
          68 kB
        8. screenshot 2.png
          screenshot 2.png
          119 kB

            david.woloszyn@moodle.com David Woloszyn
            matt.porritt@moodle.com Matt Porritt
            Safat Shahin Safat Shahin
            Jun Pataleta Jun Pataleta
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            20 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 3 days, 7 hours, 24 minutes
                1w 3d 7h 24m

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