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

Timed forum discussions/posts timed to go live more than 7 days in the future won't be sent in user digests

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.2.9, 4.1.15, 4.3.9, 4.4.5, 4.5.1
    • Forum
    • MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE, MOODLE_404_STABLE, MOODLE_405_STABLE
    • MDL-83487-405
    • MDL-83487-500
    • MDL-83487-main
    • Hide

      Preparation

      1. Prepare an email testing tool.
      2. Ensure that the forum standard cron runs every minute or open /admin/cron.php in another tab.
      3. Setup one user with single post (no digest) forum preference (normally this is the default).
        1. Click on the user profile icon on the top right.
        2. Select preferences from the dropdown.
        3. Click on the Forum preferences.
        4. Change __ the Email digest type accordingly.
      1. Setup one user with mail digest (complete or subjects) forum preference.

      Course and forum preparation

      1. Create a course.
      2. Enrol one user with single post preference and one user with mail digest forum preference to the course.
      3. Create a forum.
        1. Turn on the edit mode.
        2. Add a new activity from any section.
        3. Choose forum.
        4. Fill in the forum name, then save the forum.
        5. Turn off the edit mode.
      4. Ensure both users are subscribed to the forum.
        1. Go to the forum.
        2. Navigate to the subscriptions menu.

      Test

      1. From inside the forum, create a new discussion topic, then click advanced.
      2. Type the forum subject and message.
      3. Check the Send forum post notifications with no editing-time delay or else it will wait 30 minutes to send the email.
      4. In the display period section, enable the display start for a few minutes ahead.
      5. Ensure that the digest won't be sent right after the post went live (would lead to problems diagnosing)
      6. Open the database, and in the mdl_forum_posts table, locate the forum post record we have created and change the created field value to be more than 7 days ago.
      7. When the post goes live, Ensure the cron is running or open /admin/cron.php in a new tab before checking the following steps.
      8. When the post goes live, ensure that the single post user receives the mail.
      9. When the post goes live, check the forum_queue table and ensure it contains an entry that says that the digest user will receive the timed post.
      10. To immediately send the digest, open task_adhoc table and modify the nextruntime field for \mod_forum\task\send_user_digests record to the past time.
      11. Ensure the cron is running or open /admin/cron.php in a new tab before checking the following step.
      12. Verify that the user with the mail digest post preference receives a digest with the timed post inside. 
      Show
      Preparation Prepare an email testing tool. Ensure that the forum standard cron runs every minute or open /admin/cron.php in another tab. Setup one user with single post (no digest) forum preference (normally this is the default). Click on the user profile icon on the top right. Select preferences from the dropdown. Click on the Forum preferences. Change __ the Email digest type accordingly. Setup one user with mail digest (complete or subjects) forum preference. Course and forum preparation Create a course. Enrol one user with single post preference and one user with mail digest forum preference to the course. Create a forum. Turn on the edit mode. Add a new activity from any section. Choose forum . Fill in the forum name, then save the forum. Turn off the edit mode. Ensure both users are subscribed to the forum. Go to the forum. Navigate to the subscriptions  menu. Test From inside the forum, create a new discussion topic, then click advanced . Type the forum subject and message. Check the Send forum post notifications with no editing-time delay or else it will wait 30 minutes to send the email. In the display period section, enable the display start for a few minutes ahead. Ensure that the digest won't be sent right after the post went live (would lead to problems diagnosing) Open the database, and in the mdl_forum_posts table, locate the forum post record we have created and change the created field value to be more than 7 days ago. When the post goes live, Ensure the cron is running or open /admin/cron.php in a new tab before checking the following steps. When the post goes live, ensure that the single post user receives the mail. When the post goes live, check the forum_queue table and ensure it contains an entry that says that the digest user will receive the timed post. To immediately send the digest, open task_adhoc table and modify the nextruntime field for \mod_forum\task\send_user_digests record to the past time. Ensure the cron is running or open /admin/cron.php in a new tab before checking the following step. Verify that the user with the mail digest post preference receives a digest with the timed post inside. 
    • Hide

      Code verified against automated checks.

      Checked MDL-83487 using repository: https://github.com/muhammadarnaldo/moodle.git

      More information about this report

      Built on: Fri May 16 10:59:52 UTC 2025

      Show
      Code verified against automated checks. Checked MDL-83487 using repository: https://github.com/muhammadarnaldo/moodle.git MOODLE_405_STABLE (0 errors / 0 warnings) [branch: MDL-83487-405 | CI Job ] MOODLE_500_STABLE (0 errors / 0 warnings) [branch: MDL-83487-500 | CI Job ] main (0 errors / 0 warnings) [branch: MDL-83487-main | CI Job ] More information about this report Built on: Fri May 16 10:59:52 UTC 2025
    • Show
      Launching automatic jobs for branch MDL-83487 -405 https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/19411/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/66386/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/66387/ Behat (Firefox - boost) Launching automatic jobs for branch MDL-83487 -500 https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/19412/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/66388/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/66389/ Behat (Firefox - boost) Launching automatic jobs for branch MDL-83487 -main https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/19413/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/66390/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/66391/ Behat (Firefox - boost) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/66392/ Behat (Firefox - classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/66393/ App tests (stable app version) Built on: Thu May 22 04:30:24 UTC 2025
    • 3
    • Team Alpha - Sprint 1 I2-2025, Team Alpha - Sprint 2 I2-2025

           Timed posts timed for more than 7 days in the future will be added to the forum queue once they go "live".

      But those queue entries will be immediately deleted by the next \mod_forum\task\cron_task run because it first deletes all queue entries older than 7 days.

            muhammad.arnaldo@moodle.com Muhammad Arnaldo
            poggenpohlda Daniel Poggenpohl
            Jayce Birrell Jayce Birrell
            Votes:
            25 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 49 minutes
                2h 49m

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