-
Sub-task
-
Resolution: Fixed
-
Blocker
-
2.7, 3.0, 3.7
-
MOODLE_27_STABLE, MOODLE_30_STABLE, MOODLE_37_STABLE
-
MOODLE_37_STABLE
-
MDL-46881-master -
Hide
A) Setup
- Start with a clean install of Moodle
- Ensure you have something like mailcatcher or MailHog running and configured
- Run the adhoc task processor to clear any pending adhoc tasks
php admin/tool/task/cli/adhoc_task.php --execute
- Open Site administration and search for 'maxediting'
- Set the max editing time to 1 minute
- Create one new course
- Enrol 10 students (s1-s10), and two editing teachers (t1, t2) in the course
- Ensure that the "Activities" block is present in the course
- Ensure that each course has the "Announcements" forum
- Create forums for each of the other types. Ensure that you set the Subscription to 'Automatic':
- Standard
- Blog
- Question and Answer
- Each User
- Single simple discussion
- For each of the remaining students login and ensure the following are set:
Note: To set the profile setting, open the user menu -> Preferences -> Forum preferences, and use the dropdown
Note: To set the setting for all forums, follow the "Forum" link in the Activities block and use the toggle for each of the forumsUser Profile setting Setting for all forums s1 No digest (no change) Default (No digest) s2 No digest (no change) Complete digest s3 No digest (no change) Subjects only s4 Complete digest No digest s5 Complete digest Default (Complete) s6 Complete digest Subjects only s7 Subjects only digest No digest s8 Subjects only digest Complete s9 Subjects only digest Default (Subjects only) t1 No digest (no change) Default (No digest) t2 Complete digest Default (Complete) - Login as s10
- Navigate to the course and select "Forum" in the activies block
- Unsubscribe from each forum (Note: You cannot unsubscribe from the News forum)
- Login as admin
- Start a new discussion in each of:
- Announcements
- Standard
- Q&A
- Each User
- Blog (Add a new topic)
Note: for ease of testing I suggest you set a subject which includes the type of forum.
- Reply to a post in all of them (including the Single simple discussion)
Note: For Blog you must "Discuss this topic" - Wait 1 minute
B) Visibility tests
B1) Initial test (all forums visible)
- Run the scheduled task:
php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task"
- Confirm there were no errors or failures
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the following:
User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement Yes No No Yes No No Yes No No Yes Yes No Standard Yes No No Yes No No Yes No No No Yes No Single Simple Discussion Yes No No Yes No No Yes No No No Yes No Each user Yes No No Yes No No Yes No No No Yes No Blog Yes No No Yes No No Yes No No No Yes No Q & A First only No No First only No No First only No No No All posts No Note: Yes means both the original post, and the reply to it
- Confirm that you have the following:
- Delete all of the messages in your mail client/catcher
- Run the attached test_46881_adhoc.php script:
php test_46881_adhoc.php
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the digests for the following users which contain posts:
User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Standard No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Single Simple Discussion No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Each user No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Blog No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Q & A No First only First only (Subject only) No First only First only (Subject only) No First only First only (Subject only) No No All posts Note: Yes means both the original post, and the reply to it
- Confirm that you have the digests for the following users which contain posts:
- Delete all of the messages in your mail client/catcher
B2) Initially hidden, but made visible before send
- Run the attached test_46881_reset.php script
php test_46881_adhoc.php
- Open the course that the forums are all in
- From the settings menu, choose "Edit settings"
- Update the course visility to "Hide"
- Run the scheduled task:
php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task"
- Confirm there were no errors or failures
- Open the course that the forums are all in
- From the settings menu, choose "Edit settings"
- Update the course visility to "Show"
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the following:
User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement Yes No No Yes No No Yes No No Yes Yes No Standard Yes No No Yes No No Yes No No No Yes No Single Simple Discussion Yes No No Yes No No Yes No No No Yes No Each user Yes No No Yes No No Yes No No No Yes No Blog Yes No No Yes No No Yes No No No Yes No Q & A First only No No First only No No First only No No No All posts No Note: Yes means both the original post, and the reply to it
- Confirm that you have the following:
- Delete all of the messages in your mail client/catcher
- Run the attached test_46881_adhoc.php script:
php test_46881_adhoc.php
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the digests for the following users which contain posts:
User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Standard No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Single Simple Discussion No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Each user No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Blog No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Q & A No First only First only (Subject only) No First only First only (Subject only) No First only First only (Subject only) No No All posts Note: Yes means both the original post, and the reply to it
- Confirm that you have the digests for the following users which contain posts:
- Delete all of the messages in your mail client/catcher
B3) Hidden course
- Run the attached test_46881_reset.php script
php test_46881_adhoc.php
- Open the course that the forums are all in
- From the settings menu, choose "Edit settings"
- Update the course visility to "Hide"
- Run the scheduled task:
php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task"
- Confirm there were no errors or failures
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the following:
User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No No No No No No No No No No Yes No Standard No No No No No No No No No No Yes No Single Simple Discussion No No No No No No No No No No Yes No Each user No No No No No No No No No No Yes No Blog No No No No No No No No No No Yes No Q & A No No No No No No No No No No All posts No Note: Yes means both the original post, and the reply to it
- Confirm that you have the following:
- Delete all of the messages in your mail client/catcher
- Run the attached test_46881_adhoc.php script:
php test_46881_adhoc.php
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the digests for the following users which contain posts:
User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No No No No No No No No No No No Yes Standard No No No No No No No No No No No Yes Single Simple Discussion No No No No No No No No No No No Yes Each user No No No No No No No No No No No Yes Blog No No No No No No No No No No No Yes Q & A No No No No No No No No No No No All posts Note: Yes means both the original post, and the reply to it
- Confirm that you have the digests for the following users which contain posts:
- Delete all of the messages in your mail client/catcher
- Show the course again
B4) Hidden course category
- Run the attached test_46881_reset.php script
php test_46881_adhoc.php
- Open the course category of the course that the forums are all in
- From the settings menu, choose "Manage this category"
- Hide the course category (using the "Eye" icon)
- Run the scheduled task:
php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task"
- Confirm there were no errors or failures
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the following:
User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No No No No No No No No No No Yes No Standard No No No No No No No No No No Yes No Single Simple Discussion No No No No No No No No No No Yes No Each user No No No No No No No No No No Yes No Blog No No No No No No No No No No Yes No Q & A No No No No No No No No No No All posts No Note: Yes means both the original post, and the reply to it
- Confirm that you have the following:
- Delete all of the messages in your mail client/catcher
- Run the attached test_46881_adhoc.php script:
php test_46881_adhoc.php
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the digests for the following users which contain posts:
User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No No No No No No No No No No No Yes Standard No No No No No No No No No No No Yes Single Simple Discussion No No No No No No No No No No No Yes Each user No No No No No No No No No No No Yes Blog No No No No No No No No No No No Yes Q & A No No No No No No No No No No No All posts Note: Yes means both the original post, and the reply to it
- Confirm that you have the digests for the following users which contain posts:
- Delete all of the messages in your mail client/catcher
- Show the course category again
B5) Hidden course after initial send
- Run the attached test_46881_reset.php script
php test_46881_adhoc.php
- Run the attached test_46881_reset.php script
php test_46881_adhoc.php
- Run the scheduled task:
php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task"
- Confirm there were no errors or failures
- Open the course that the forums are all in
- From the settings menu, choose "Edit settings"
- Update the course visility to "Hide"
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the following:
User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No No No No No No No No No No Yes No Standard No No No No No No No No No No Yes No Single Simple Discussion No No No No No No No No No No Yes No Each user No No No No No No No No No No Yes No Blog No No No No No No No No No No Yes No Q & A No No No No No No No No No No All posts No Note: Yes means both the original post, and the reply to it
- Confirm that you have the following:
- Delete all of the messages in your mail client/catcher
- Run the attached test_46881_adhoc.php script:
php test_46881_adhoc.php
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the digests for the following users which contain posts:
User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No No No No No No No No No No No Yes Standard No No No No No No No No No No No Yes Single Simple Discussion No No No No No No No No No No No Yes Each user No No No No No No No No No No No Yes Blog No No No No No No No No No No No Yes Q & A No No No No No No No No No No No All posts Note: Yes means both the original post, and the reply to it
- Confirm that you have the digests for the following users which contain posts:
- Delete all of the messages in your mail client/catcher
- Show the course again
B6) Hidden forums
- Run the attached test_46881_reset.php script
php test_46881_adhoc.php
- Open the course that the forums are all in
- From the settings menu, choose "Turn editing on"
- Hide all of the forums
- Run the attached test_46881_reset.php script
php test_46881_adhoc.php
- Run the scheduled task:
php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task"
- Confirm there were no errors or failures
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the following:
User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No No No No No No No No No No Yes No Standard No No No No No No No No No No Yes No Single Simple Discussion No No No No No No No No No No Yes No Each user No No No No No No No No No No Yes No Blog No No No No No No No No No No Yes No Q & A No No No No No No No No No No All posts No Note: Yes means both the original post, and the reply to it
- Confirm that you have the following:
- Delete all of the messages in your mail client/catcher
- Run the attached test_46881_adhoc.php script:
php test_46881_adhoc.php
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the digests for the following users which contain posts:
User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No No No No No No No No No No No Yes Standard No No No No No No No No No No No Yes Single Simple Discussion No No No No No No No No No No No Yes Each user No No No No No No No No No No No Yes Blog No No No No No No No No No No No Yes Q & A No No No No No No No No No No No All posts Note: Yes means both the original post, and the reply to it
- Confirm that you have the digests for the following users which contain posts:
- Delete all of the messages in your mail client/catcher
- Show the forums again
C) Discussion subscriptions
- Login as users s1, s2, s3
- Open up the "Standard" forum
- Unsubscribe from the discussion you created initially (Click the envelope icon so that it shows an open envelope)
- Login as user s10
- Open up the "Standard" forum
- Subscribe to the discussion you created initially (Click the envelope icon so that it shows a closed envelope)
- Login as admin
- Create a new reply to that discussion
- Wait 1 minute
- Run the scheduled task:
php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task"
- Confirm there were no errors or failures
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the following:
User: s1 s2 s3 s10 Standard No No No Yes Note: Ignore messages from the other users.
- Confirm that you have the following:
- Delete all of the messages in your mail client/catcher
- Run the attached test_46881_adhoc.php script:
php test_46881_adhoc.php
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the digests for the following users which contain posts:
User: s1 s2 s3 s10 Standard No No No No
- Confirm that you have the digests for the following users which contain posts:
- Delete all of the messages in your mail client/catcher
- Login as s10
- Open your Forum preferences (User menu -> Preferences -> Forum preferences)
- Set "Digest type" to complete
- Login as admin
- Post another reply to the discussion (set the "Send forum post notifications with no editing-time delay" checkbox)
- Run the scheduled task:
php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task"
- Confirm there were no errors or failures
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the following:
User: s1 s2 s3 s10 Standard No No No No Note: Ignore messages from the other users.
- Confirm that you have the following:
- Delete all of the messages in your mail client/catcher
- Run the attached test_46881_adhoc.php script:
php test_46881_adhoc.php
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the digests for the following users which contain posts:
User: s1 s2 s3 s10 Standard No No No Yes
- Confirm that you have the digests for the following users which contain posts:
- Delete all of the messages in your mail client/catcher
- Login as s10
- Reset your digest preferences back to "No digests"
D) Timed forum posts
- Login as admin
- Open the standard forum
- Create a new forum post:
- Set "Send forum post notifications with no editing-time delay"
- Expand "Display period"
- Choose a "Display start" time of three minutes time
- Do not choose a "Display end" time
- Create a new forum post:
- Set "Send forum post notifications with no editing-time delay"
- Expand "Display period"
- Choose a "Display end" time of three minutes time
- Do not choose a "Display start" time
- Run the scheduled task:
php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task"
- Confirm there were no errors or failures
- Make a cup of tea
- By the time you've made your tea, the time you chose in the previous steps should have expired.
- Refresh the list of discussion:
- The one which was set to start in the future is now visible (text is not greyed out)
- The one which was set to end in the future is now hidden (text is greyed out)
- Run the attached test_46881_adhoc.php script:
php test_46881_adhoc.php
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the following:
User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Standard No No No No No No No No No No Yes Yes
- Confirm that you have the following:
- Delete all of the messages in your mail client/catcher
- Run the scheduled task:
php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task"
- Confirm there were no errors or failures
- Run the attached test_46881_adhoc.php script:
php test_46881_adhoc.php
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the following:
User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Standard Yes Yes (in digest) Yes (in digest) Yes Yes (in digest) Yes (in digest) Yes Yes (in digest) Yes (in digest) No Yes Yes (in digest)
- Confirm that you have the following:
- Delete all of the messages in your mail client/catcher
E) Content removed between runs
- Login as admin
- Open the standard forum
- Create a new forum post:
- Set "Send forum post notifications with no editing-time delay"
- Run the scheduled task:
php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task"
- Confirm there were no errors or failures
- Delete the forum post (Open the discussion, choose Delete, Confirm)
- Run the attached test_46881_adhoc.php script:
php test_46881_adhoc.php
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- Open the Mail client/catcher
- Confirm that you have the following:
User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Standard No No No No No No No No No No No No
- Confirm that you have the following:
- Delete all of the messages in your mail client/catcher
F) Read tracking
F1) Mark as read on post
- Login as s1
- Open your forum preferences
- Set "Forum tracking" to "Yes: highlight new posts for me"
- Set "When sending forum post notifications" to "Mark the post as read"
- Run the attached test_46881_reset.php script
php test_46881_adhoc.php
- View the Standard forum (as s1)
- Confirm that all posts appear as unread
- Run the scheduled task:
php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task"
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- View the Standard forum (as s1)
- Confirm that all posts appear as read
F2) Do not mark as read on post
- Login as s1
- Open your forum preferences
- Set "Forum tracking" to "Yes: highlight new posts for me"
- Set "When sending forum post notifications" to "Do not mark the post as read"
- Run the attached test_46881_reset.php script
php test_46881_adhoc.php
- View the Standard forum (as s1)
- Confirm that all posts appear as unread
- Run the scheduled task:
php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task"
- Run the adhoc task runner:
php admin/tool/task/cli/adhoc_task.php --execute
- View the Standard forum (as s1)
- Confirm that all posts still appear as unread
ShowA) Setup Start with a clean install of Moodle Ensure you have something like mailcatcher or MailHog running and configured Run the adhoc task processor to clear any pending adhoc tasks php admin/tool/task/cli/adhoc_task.php --execute Open Site administration and search for 'maxediting' Set the max editing time to 1 minute Create one new course Enrol 10 students (s1-s10), and two editing teachers (t1, t2) in the course Ensure that the "Activities" block is present in the course Ensure that each course has the "Announcements" forum Create forums for each of the other types. Ensure that you set the Subscription to 'Automatic': Standard Blog Question and Answer Each User Single simple discussion For each of the remaining students login and ensure the following are set: Note: To set the profile setting, open the user menu -> Preferences -> Forum preferences, and use the dropdown Note: To set the setting for all forums, follow the "Forum" link in the Activities block and use the toggle for each of the forums User Profile setting Setting for all forums s1 No digest (no change) Default (No digest) s2 No digest (no change) Complete digest s3 No digest (no change) Subjects only s4 Complete digest No digest s5 Complete digest Default (Complete) s6 Complete digest Subjects only s7 Subjects only digest No digest s8 Subjects only digest Complete s9 Subjects only digest Default (Subjects only) t1 No digest (no change) Default (No digest) t2 Complete digest Default (Complete) Login as s10 Navigate to the course and select "Forum" in the activies block Unsubscribe from each forum (Note: You cannot unsubscribe from the News forum) Login as admin Start a new discussion in each of: Announcements Standard Q&A Each User Blog (Add a new topic) Note: for ease of testing I suggest you set a subject which includes the type of forum. Reply to a post in all of them (including the Single simple discussion) Note: For Blog you must "Discuss this topic" Wait 1 minute B) Visibility tests B1) Initial test (all forums visible) Run the scheduled task: php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task" Confirm there were no errors or failures Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the following: User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement Yes No No Yes No No Yes No No Yes Yes No Standard Yes No No Yes No No Yes No No No Yes No Single Simple Discussion Yes No No Yes No No Yes No No No Yes No Each user Yes No No Yes No No Yes No No No Yes No Blog Yes No No Yes No No Yes No No No Yes No Q & A First only No No First only No No First only No No No All posts No Note: Yes means both the original post, and the reply to it Delete all of the messages in your mail client/catcher Run the attached test_46881_adhoc.php script: php test_46881_adhoc.php Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the digests for the following users which contain posts: User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Standard No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Single Simple Discussion No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Each user No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Blog No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Q & A No First only First only (Subject only) No First only First only (Subject only) No First only First only (Subject only) No No All posts Note: Yes means both the original post, and the reply to it Delete all of the messages in your mail client/catcher B2) Initially hidden, but made visible before send Run the attached test_46881_reset.php script php test_46881_adhoc.php Open the course that the forums are all in From the settings menu, choose "Edit settings" Update the course visility to "Hide" Run the scheduled task: php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task" Confirm there were no errors or failures Open the course that the forums are all in From the settings menu, choose "Edit settings" Update the course visility to "Show" Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the following: User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement Yes No No Yes No No Yes No No Yes Yes No Standard Yes No No Yes No No Yes No No No Yes No Single Simple Discussion Yes No No Yes No No Yes No No No Yes No Each user Yes No No Yes No No Yes No No No Yes No Blog Yes No No Yes No No Yes No No No Yes No Q & A First only No No First only No No First only No No No All posts No Note: Yes means both the original post, and the reply to it Delete all of the messages in your mail client/catcher Run the attached test_46881_adhoc.php script: php test_46881_adhoc.php Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the digests for the following users which contain posts: User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Standard No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Single Simple Discussion No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Each user No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Blog No Yes Yes (Subject only) No Yes Yes (Subject only) No Yes Yes (Subject only) No No Yes Q & A No First only First only (Subject only) No First only First only (Subject only) No First only First only (Subject only) No No All posts Note: Yes means both the original post, and the reply to it Delete all of the messages in your mail client/catcher B3) Hidden course Run the attached test_46881_reset.php script php test_46881_adhoc.php Open the course that the forums are all in From the settings menu, choose "Edit settings" Update the course visility to "Hide" Run the scheduled task: php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task" Confirm there were no errors or failures Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the following: User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No No No No No No No No No No Yes No Standard No No No No No No No No No No Yes No Single Simple Discussion No No No No No No No No No No Yes No Each user No No No No No No No No No No Yes No Blog No No No No No No No No No No Yes No Q & A No No No No No No No No No No All posts No Note: Yes means both the original post, and the reply to it Delete all of the messages in your mail client/catcher Run the attached test_46881_adhoc.php script: php test_46881_adhoc.php Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the digests for the following users which contain posts: User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No No No No No No No No No No No Yes Standard No No No No No No No No No No No Yes Single Simple Discussion No No No No No No No No No No No Yes Each user No No No No No No No No No No No Yes Blog No No No No No No No No No No No Yes Q & A No No No No No No No No No No No All posts Note: Yes means both the original post, and the reply to it Delete all of the messages in your mail client/catcher Show the course again B4) Hidden course category Run the attached test_46881_reset.php script php test_46881_adhoc.php Open the course category of the course that the forums are all in From the settings menu, choose "Manage this category" Hide the course category (using the "Eye" icon) Run the scheduled task: php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task" Confirm there were no errors or failures Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the following: User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No No No No No No No No No No Yes No Standard No No No No No No No No No No Yes No Single Simple Discussion No No No No No No No No No No Yes No Each user No No No No No No No No No No Yes No Blog No No No No No No No No No No Yes No Q & A No No No No No No No No No No All posts No Note: Yes means both the original post, and the reply to it Delete all of the messages in your mail client/catcher Run the attached test_46881_adhoc.php script: php test_46881_adhoc.php Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the digests for the following users which contain posts: User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No No No No No No No No No No No Yes Standard No No No No No No No No No No No Yes Single Simple Discussion No No No No No No No No No No No Yes Each user No No No No No No No No No No No Yes Blog No No No No No No No No No No No Yes Q & A No No No No No No No No No No No All posts Note: Yes means both the original post, and the reply to it Delete all of the messages in your mail client/catcher Show the course category again B5) Hidden course after initial send Run the attached test_46881_reset.php script php test_46881_adhoc.php Run the attached test_46881_reset.php script php test_46881_adhoc.php Run the scheduled task: php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task" Confirm there were no errors or failures Open the course that the forums are all in From the settings menu, choose "Edit settings" Update the course visility to "Hide" Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the following: User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No No No No No No No No No No Yes No Standard No No No No No No No No No No Yes No Single Simple Discussion No No No No No No No No No No Yes No Each user No No No No No No No No No No Yes No Blog No No No No No No No No No No Yes No Q & A No No No No No No No No No No All posts No Note: Yes means both the original post, and the reply to it Delete all of the messages in your mail client/catcher Run the attached test_46881_adhoc.php script: php test_46881_adhoc.php Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the digests for the following users which contain posts: User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No No No No No No No No No No No Yes Standard No No No No No No No No No No No Yes Single Simple Discussion No No No No No No No No No No No Yes Each user No No No No No No No No No No No Yes Blog No No No No No No No No No No No Yes Q & A No No No No No No No No No No No All posts Note: Yes means both the original post, and the reply to it Delete all of the messages in your mail client/catcher Show the course again B6) Hidden forums Run the attached test_46881_reset.php script php test_46881_adhoc.php Open the course that the forums are all in From the settings menu, choose "Turn editing on" Hide all of the forums Run the attached test_46881_reset.php script php test_46881_adhoc.php Run the scheduled task: php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task" Confirm there were no errors or failures Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the following: User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No No No No No No No No No No Yes No Standard No No No No No No No No No No Yes No Single Simple Discussion No No No No No No No No No No Yes No Each user No No No No No No No No No No Yes No Blog No No No No No No No No No No Yes No Q & A No No No No No No No No No No All posts No Note: Yes means both the original post, and the reply to it Delete all of the messages in your mail client/catcher Run the attached test_46881_adhoc.php script: php test_46881_adhoc.php Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the digests for the following users which contain posts: User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Announcement No No No No No No No No No No No Yes Standard No No No No No No No No No No No Yes Single Simple Discussion No No No No No No No No No No No Yes Each user No No No No No No No No No No No Yes Blog No No No No No No No No No No No Yes Q & A No No No No No No No No No No No All posts Note: Yes means both the original post, and the reply to it Delete all of the messages in your mail client/catcher Show the forums again C) Discussion subscriptions Login as users s1, s2, s3 Open up the "Standard" forum Unsubscribe from the discussion you created initially (Click the envelope icon so that it shows an open envelope) Login as user s10 Open up the "Standard" forum Subscribe to the discussion you created initially (Click the envelope icon so that it shows a closed envelope) Login as admin Create a new reply to that discussion Wait 1 minute Run the scheduled task: php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task" Confirm there were no errors or failures Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the following: User: s1 s2 s3 s10 Standard No No No Yes Note: Ignore messages from the other users. Delete all of the messages in your mail client/catcher Run the attached test_46881_adhoc.php script: php test_46881_adhoc.php Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the digests for the following users which contain posts: User: s1 s2 s3 s10 Standard No No No No Delete all of the messages in your mail client/catcher Login as s10 Open your Forum preferences (User menu -> Preferences -> Forum preferences) Set "Digest type" to complete Login as admin Post another reply to the discussion (set the "Send forum post notifications with no editing-time delay" checkbox) Run the scheduled task: php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task" Confirm there were no errors or failures Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the following: User: s1 s2 s3 s10 Standard No No No No Note: Ignore messages from the other users. Delete all of the messages in your mail client/catcher Run the attached test_46881_adhoc.php script: php test_46881_adhoc.php Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the digests for the following users which contain posts: User: s1 s2 s3 s10 Standard No No No Yes Delete all of the messages in your mail client/catcher Login as s10 Reset your digest preferences back to "No digests" D) Timed forum posts Login as admin Open the standard forum Create a new forum post: Set "Send forum post notifications with no editing-time delay" Expand "Display period" Choose a "Display start" time of three minutes time Do not choose a "Display end" time Create a new forum post: Set "Send forum post notifications with no editing-time delay" Expand "Display period" Choose a "Display end" time of three minutes time Do not choose a "Display start" time Run the scheduled task: php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task" Confirm there were no errors or failures Make a cup of tea By the time you've made your tea, the time you chose in the previous steps should have expired. Refresh the list of discussion: The one which was set to start in the future is now visible (text is not greyed out) The one which was set to end in the future is now hidden (text is greyed out) Run the attached test_46881_adhoc.php script: php test_46881_adhoc.php Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the following: User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Standard No No No No No No No No No No Yes Yes Delete all of the messages in your mail client/catcher Run the scheduled task: php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task" Confirm there were no errors or failures Run the attached test_46881_adhoc.php script: php test_46881_adhoc.php Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the following: User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Standard Yes Yes (in digest) Yes (in digest) Yes Yes (in digest) Yes (in digest) Yes Yes (in digest) Yes (in digest) No Yes Yes (in digest) Delete all of the messages in your mail client/catcher E) Content removed between runs Login as admin Open the standard forum Create a new forum post: Set "Send forum post notifications with no editing-time delay" Run the scheduled task: php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task" Confirm there were no errors or failures Delete the forum post (Open the discussion, choose Delete, Confirm) Run the attached test_46881_adhoc.php script: php test_46881_adhoc.php Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute Open the Mail client/catcher Confirm that you have the following: User: s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 t1 t2 Standard No No No No No No No No No No No No Delete all of the messages in your mail client/catcher F) Read tracking F1) Mark as read on post Login as s1 Open your forum preferences Set "Forum tracking" to "Yes: highlight new posts for me" Set "When sending forum post notifications" to "Mark the post as read" Run the attached test_46881_reset.php script php test_46881_adhoc.php View the Standard forum (as s1) Confirm that all posts appear as unread Run the scheduled task: php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task" Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute View the Standard forum (as s1) Confirm that all posts appear as read F2) Do not mark as read on post Login as s1 Open your forum preferences Set "Forum tracking" to "Yes: highlight new posts for me" Set "When sending forum post notifications" to "Do not mark the post as read" Run the attached test_46881_reset.php script php test_46881_adhoc.php View the Standard forum (as s1) Confirm that all posts appear as unread Run the scheduled task: php admin/tool/task/cli/scheduled_task.php --execute="\mod_forum\task\cron_task" Run the adhoc task runner: php admin/tool/task/cli/adhoc_task.php --execute View the Standard forum (as s1) Confirm that all posts still appear as unread
It's most likely possible to refactor the cron tasks into smaller chunks to handle single, digests etc ...
- caused a regression
-
MDL-65655 Forum mailings and maintenance jobs fails with "Suspended account" exception
- Closed
-
MDL-65888 Forum mailings and maintenance jobs fails with "error/usernotconfirmed" exception
- Closed
- is blocked by
-
MDL-64347 Improve processing of scheduled and adhoc tasks
- Closed
- is duplicated by
-
MDL-44734 Move forum cron to a scheduled_task
- Closed
- Testing discovered
-
MDL-64363 Adhoc tasks created during a scheduled task cannot run until the next cron iteration
- Closed