Modifying notifications

Modifying notifications

by Velson Horie -
Number of replies: 3

It is a minor niggle.

When a student submits a piece of work (quizz, assignment ..) I receive a standard notification in my Outlook inbox, see the blue one below from my dummy student.

I run a number of courses in the group of CfC courses. This notification does not tell me which course the student is on, nor in the space available the work that has been done.   I can find nothing relevant by searching in Documentation, though it is a big pond to catch a little fish.

Would it be possible to change the notification template to something like:


Two Anon                      velson Horie    CfC21_01. Expt02 submitted                                  Thu 25/03/21 19:51  54KB


Average of ratings: -
In reply to Velson Horie

Re: Modifying notifications

by Ravi Murugesan -
Picture of Particularly helpful Moodlers Picture of Testers
Hi Velson,

To see the assignment name more clearly in the subject line, try Language Customisation. (I know you asked about seeing the course name as well, but I couldn't get this part to work. More below.)

You need to have Site Administrator access to carry out the below steps.

  1. Site administration -> Language -> Language customisation -> Open the language pack (English)
  2. You will see a menu to filter strings. Scroll down to find and click on assign.php - the first one in the category called mod.
  3. Enter the following phrase in Only strings containing: has updated their submission (do not put quotation marks around the phrase)
  4. You should then see one result - the string name is gradersubmissionupdatedsmall. In the blank text box under Local customisation, enter the following: {$a->assignment} submitted
Save changes to the language pack.

In theory you should be able to add {$a->courseshortname} to the string in step 4, but on my Moodle site this does not work - I just see the raw string in the subject line of the email and not the actual course name. There's at least one discussion here on moodle.org about the difficulty of introducing the course name in email subject lines.

Best,
Ravi
Average of ratings: Useful (1)
In reply to Ravi Murugesan

Re: Modifying notifications

by Velson Horie -
Thank you for the lead. I should never have found (or thought of) the Language route without your guidance.

Everything works as you describe, including the failure of {$a->courseshortname} to work. Perhaps it works only for forum notifications.
A nudge to the Moodle Tracker seems due.  Support gratefully accepted.
Average of ratings: Useful (1)