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

Allow the forum post and digest notification mail body to contain the course fullname

    XMLWordPrintable

Details

    • Improvement
    • Status: Development in progress
    • Minor
    • Resolution: Unresolved
    • 3.5, 4.0.1
    • None
    • Forum
    • MOODLE_35_STABLE, MOODLE_400_STABLE
    • MDL-63484_master
    • Hide

      Prerequisites

      1. Outgoing mail setup. Easier to use Mailcatcher or Mailhog.
      Setup
      1. Create a course with full name: "Full name" and short same: "Short name" and with a forum.
      2. Enroll two students s1 and s2.
      3. Log in as s1.
      4. Open the user menu > Preferences > Forum preferences
      5. Make sure that "Email digest type" preference is set to "No digest"
      6. Log in as s2.
      7. Open the user menu > Preferences > Forum preferences
      8. Make sure that "Email digest type" preference is set to "Complete"
      9. Navigate to the course,  then to the forum and create a discussion
        • Note: Recommended to tick "Send forum post notifications with no editing-time delay" as well to send the email right away.
      10. Run cron 

        php admin/cli/cron.php 

      11. Using your preferred Database management tool, go to the "mdl_task_adhoc". You should see an entry there for the "\mod_forum\task\send_user_digests" ad-hoc task.
      12. Edit the record and set the "nextruntime" field to 0 and save the changes.
      Test: Forum post email
      1. Run cron. You should see the email for both students.

        php admin/cli/cron.php 

      2. Check that the breadcrumb and subject on the E-Mail of s1 has the course short name ("Short name").
      3. Check that the breadcrumb on the E-Mail of s2 has the course short name ("Short name")
      Setup #2
      1. Login as admin
      2. Navigate to Site Administration > Plugins > Forum
      3. Enable the option "Use course full name in emails"
      4. Save changes
      5. Navigate to the course,  then to the forum and create a discussion
        • Note: Recommended to tick "Send forum post notifications with no editing-time delay" as well to send the email right away.
      6. Run cron.

        php admin/cli/cron.php 

      7. Using your preferred Database management tool, go to the "mdl_task_adhoc". You should see an entry there for the "\mod_forum\task\send_user_digests" ad-hoc task.
      8. Edit the record and set the "nextruntime" field to 0 and save the changes.
      Test: Forum post email #2
      1. Run cron.

        php admin/cli/cron.php 

      2. Check that the breadcrumb and subject on the E-Mail of s1 has the course full name ("Full name").
      3. Check that the breadcrumb on the E-Mail of s2 has the course full name ("Full name")
      Test: Forum post email #3
      1. Go to Site Administration->Language->Language Customization->English->Open pack->mod/forum.php->String Identifier->postmailsubject->change "$a->coursename" to "$a->courseshortname"->Save
      2. Navigate to the course,  then to the forum and create a discussion
        • Note: Recommended to tick "Send forum post notifications with no editing-time delay" as well to send the email right away.
      3. Run cron.

        php admin/cli/cron.php 

      4. Check that the breadcrumb on the E-Mail of s1 has the course full name ("Full name") and the subject has the course short name ("Short name").
      Show
      Prerequisites Outgoing mail setup. Easier to use Mailcatcher or Mailhog. Setup Create a course with full name: "Full name" and short same: "Short name" and with a forum. Enroll two students s1 and s2. Log in as s1. Open the user menu > Preferences > Forum preferences Make sure that " Email digest type " preference is set to " No digest " Log in as s2. Open the user menu > Preferences > Forum preferences Make sure that " Email digest type " preference is set to " Complete " Navigate to the course,  then to the forum and create a discussion Note: Recommended to tick " Send forum post notifications with no editing-time delay " as well to send the email right away. Run cron  php admin/cli/cron.php Using your preferred Database management tool, go to the " mdl_task_adhoc ". You should see an entry there for the " \mod_forum\task\send_user_digests " ad-hoc task. Edit the record and set the " nextruntime " field to 0 and save the changes. Test: Forum post email Run cron. You should see the email for both students. php admin/cli/cron.php Check that the breadcrumb and subject on the E-Mail of s1 has the course short name ("Short name"). Check that the breadcrumb on the E-Mail of s2 has the course short name ("Short name") Setup #2 Login as admin Navigate to Site Administration > Plugins > Forum Enable the option "Use course full name in emails" Save changes Navigate to the course,  then to the forum and create a discussion Note: Recommended to tick " Send forum post notifications with no editing-time delay " as well to send the email right away. Run cron. php admin/cli/cron.php Using your preferred Database management tool, go to the " mdl_task_adhoc ". You should see an entry there for the " \mod_forum\task\send_user_digests " ad-hoc task. Edit the record and set the " nextruntime " field to 0 and save the changes. Test: Forum post email #2 Run cron. php admin/cli/cron.php Check that the breadcrumb and subject on the E-Mail of s1 has the course full name ("Full name"). Check that the breadcrumb on the E-Mail of s2 has the course full name ("Full name") Test: Forum post email #3 Go to Site Administration->Language->Language Customization->English->Open pack->mod/forum.php->String Identifier->postmailsubject->change "$a->coursename" to "$a->courseshortname"->Save Navigate to the course,  then to the forum and create a discussion Note: Recommended to tick " Send forum post notifications with no editing-time delay " as well to send the email right away. Run cron. php admin/cli/cron.php Check that the breadcrumb on the E-Mail of s1 has the course full name ("Full name") and the subject has the course short name ("Short name").
    • 1

    Description

      In MDL-34160, there was the possibility added to let the admin / language pack maintainer change the mail subject (string "postmailsubject | forum") of a forum single post notification to contain the course fullname (and others) instead of the course shortname.

      Unfortunately, this possibility wasn't brought to the forum notification mail body.
      There, regardless if we are getting a single-post notification or a digest notification, always the course shortname is shown.

      I propose to let the admin also customize the forum notification mail body to change the coursename in the thread breadcrumb from course shortname to course fullname.

      Attachments

        Issue Links

          Activity

            People

              tasosb Anastasios Bithas
              abias Alexander Bias
              Mathew May Mathew May
              Votes:
              1 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - 4 hours
                  4h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours, 30 minutes Time Not Required
                  3h 30m