Course full name in Email subject

Course full name in Email subject

by Richard van Iwaarden -
Number of replies: 9
Picture of Particularly helpful Moodlers

I think I have done this once, get the course full name in the Email subject in stead of the course short name.

However, I can't seem to find the right variable. In the language file, under forum, you can find this: 

{$a->courseshortname}: {$a->subject}

However, changing $a->courseshortname into $a->coursefulllname or $a>coursename does not seem to work. 

What is the correct variable to do this?

Average of ratings: -
In reply to Richard van Iwaarden

Re: Course full name in Email subject

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Richard,

I found the tracker issue 'Make subject line of forum notifications a configurable language string' - MDL-44505 - which mentions the placeholders

{$a->courseshortname}
{$a->forumname}
{$a->subject}

and the possibility of adding more, though nothing about course full name. Thus, unfortunately it seems it is not currently possible.

Average of ratings: Useful (1)
In reply to Helen Foster

Re: Course full name in Email subject

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

I do remember it editing though, must be in core code then.

I will look a bit further. It's not a big issue, but since we switched to codes in the shortname of a course (so that it can be identified by other systems) we do not like showing the shortname to our users. It's ugly smile

In reply to Richard van Iwaarden

Re: Course full name in Email subject

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Hi Richard,

No guarantee that they will work, but if you:

  • go to Language customisation
  • select everything in the box for, Show strings of these components
  • then enter, $a->course, in the, Only strings containing, box
  • and then finally click on Show strings,
You should get these different possibilities to try.

{$a->course_name}
{$a->course}
{$a->coursename}
Average of ratings: Useful (1)
In reply to AL Rachels

Re: Course full name in Email subject

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers

Tried them all, but none worked.

Thanks for this great trick though, I might use it a couple of times myself now!

In reply to Richard van Iwaarden

Re: Course full name in Email subject

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Update: Anyone please vote or comment on MDL-75072 if you would like to use a coursefullname placeholder for including the course full name in forum notifications.

In reply to Helen Foster

Re: Course full name in Email subject

by Richard van Iwaarden -
Picture of Particularly helpful Moodlers
I voted!

We actually generate our course-short names from an external system. Recently I found one that had an abusive generated code... normally no one sees the course short name but this was being mailed around from the announcement forum... sad
In reply to Richard van Iwaarden

Re: Course full name in Email subject [Solved]

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Thanks Richard for voting. I just learned though, from Jun's comment in MDL-75072, that the placeholder coursefullname is already available. smile