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

Digest email link to update preferences points to profile page instead of forum preferences page

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0.4, 3.1, 3.2
    • 3.0.5, 3.1.1
    • Forum
    • MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MDL-54663-master
    • Hide
      1. Create a new forum post
      2. Ensure that you have a user subscribed to it with daily digests enabled
      3. Modify mod/forum/lib.php:

        diff --git a/mod/forum/lib.php b/mod/forum/lib.php
        index 29f4f6d..5c83469 100644
        --- a/mod/forum/lib.php
        +++ b/mod/forum/lib.php
        @@ -902,6 +902,8 @@ function forum_cron() {
             $weekago = $timenow - (7 * 24 * 3600);
             $DB->delete_records_select('forum_queue', "timemodified < ?", array($weekago));
             mtrace ('Cleaned old digest records');
        +    $digesttime = $timenow - 1;
        +    $CFG->digestmailtimelast = $weekago - 1;
         
             if ($CFG->digestmailtimelast < $digesttime and $timenow > $digesttime) {
        

      4. Modify config.php to set $CFG->maxeditingtime = 1;
      5. Run the forum task:

        php admin/tool/task/cli/schedule_task.php --execute="\mod_forum\task\cron_task"
        

        1. Verify that the e-mail received has a link at the top This is your daily digest of new posts from the Example forums. To change your default forum email preferences, go to your user profile.
        2. Verify that the link in the text takes you to the user's forum preference page
      Show
      Create a new forum post Ensure that you have a user subscribed to it with daily digests enabled Modify mod/forum/lib.php : diff --git a/mod/forum/lib.php b/mod/forum/lib.php index 29f4f6d..5c83469 100644 --- a/mod/forum/lib.php +++ b/mod/forum/lib.php @@ -902,6 +902,8 @@ function forum_cron() { $weekago = $timenow - (7 * 24 * 3600); $DB->delete_records_select('forum_queue', "timemodified < ?", array($weekago)); mtrace ('Cleaned old digest records'); + $digesttime = $timenow - 1; + $CFG->digestmailtimelast = $weekago - 1; if ($CFG->digestmailtimelast < $digesttime and $timenow > $digesttime) { Modify config.php to set $CFG->maxeditingtime = 1; Run the forum task: php admin/tool/task/cli/schedule_task.php --execute="\mod_forum\task\cron_task" Verify that the e-mail received has a link at the top This is your daily digest of new posts from the Example forums. To change your default forum email preferences, go to your user profile. Verify that the link in the text takes you to the user's forum preference page

    Description

      I'm happy because now I'm receiving my moodle.org emails to the address I specified in message/edit.php?id=122326 -> Send email notifications to, thanks for fixing it, but I've noticed that the digest email comes with a This is your daily digest of new posts from the Moodle - Open-source learning platform | Moodle.org forums. To change your default forum email preferences, go to your user profile. message with a link to user/edit.php?id=122326&course=1 instead of a link to user/forum.php?id=122326&course=1 or message/edit.php?id=122326

      Note that 122326 is my userid in moodle.org.

      Attachments

        Activity

          People

            dobedobedoh Andrew Lyons
            dmonllao David Monllaó
            Ryan Wyllie Ryan Wyllie
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Rajesh Taneja Rajesh Taneja
            Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Jul/16