send glossary comments

send glossary comments

by Heidi Peter -
Number of replies: 2
Hi all,

is it possible to send the comments, written in a glossary to the author of the glosarryentry? Maybe this is easily done with a mail()-function or a send()-function?

Regards,
Heidi
Average of ratings: -
In reply to Heidi Peter

Re: send glossary comments

by Matt Bury -
Picture of Plugin developers
Yeah, message/email alerts when entries are edited, rated, etc. would be a nice option. A similar function to the forums.

Matt
In reply to Matt Bury

Re: send glossary comments

by Heidi Peter -
i found code, that could be helpful and maybe is the solution to send comments via email to the author of the glossary. First of all. thank you to Nadav Kavalerchik who made the send option possible for comments on blogs!

He added this code to the blog to send an email to the author of the blog. Maybe this works with the glossary, too?
if ($CFG->sendemailonnewcomment or true) {
 $touser = get_record('user','id',$blog->userid);
 $ok = email_to_user($touser,$USER,'you got new comment
to your personal blog','click this link:'.$viewurl.' to see your post
 with the new comment/s',$comment->message);
 }
maybe it is done like that? But where to add this code? to moodle/mod/glossary/comment.php? And in which line?
if ($CFG->sendemailonnewcomment or true) {
 $touser = get_record('user','id',$glossary->userid);
 $ok = email_to_user($touser,$USER,'you got new comment
to your glossary','click this link:'.$viewurl.' to see your post
 with the new comment/s',$comment->message);
 }

maybe somebody can help?
Thanks, Heidi