Quiz submission email notification: Difference between revisions
m (added link to Spanish page) |
|||
(14 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{Quiz}} | {{Quiz}} | ||
It is possible for a message to be sent out to confirm that the student submitted the quiz. | |||
It is possible for | |||
There are two types of notification: | |||
#A confirmation to the student that their attempt has finished successfully | |||
#A notification to the teacher(s) that someone has submitted an attempt. Messages are never sent for preview attempts. | |||
Note that although the capabilities are "emailnotifysubmission/emailconfirmsubmission" the notifications do NOT have to be via email. The notifications come via Moodle's messaging system. Admins can set the defaults from ''Administration > Site administration > Plugins > Message outputs > Default message outputs'' to enable/disable email/pop up notification. | |||
{| | |||
| [[File:quizsubmissionnotificationdefault.png|thumb|Quiz submission notification default settings]] | |||
|} | |||
See [[Messaging settings]] for more details. (Notification messages in Moodle quiz are disabled by default.) | |||
==Allow | ==Allow Quiz notification messages to teachers== | ||
The | To do this for an individual quiz, click into the quiz, click the gear icon top right and click Permissions (Boost theme) or for other themes, click Permissions from the Quiz administration block. | ||
This may also be done on the site level by the administrator in ''Administration > Site administration > Users > Permissions > Define roles > Teacher'' | |||
#In the filter, type "email" to locate the capability "mod/quiz/emailnotifysubmission" | |||
#Click on the + for "Roles with permission" | |||
#On the next screen, select Teacher and click "Allow" | |||
[[File:QuizEmailNotifySub.png]] | |||
===Messages in a specific quiz to specific teacher(s)=== | |||
The system administrator will need to create a new role, and allow the the capability ''mod/quiz:emailnotifysubmission'' for that role. Do not give the capability to the teacher's role on the system or course level. The new role is similar to a teacher's role and should be available on the activity level. | |||
In the course, go to the quiz and the quiz administration>locally assigned roles, assign the user(s) that should get emails/messages for a submitted quiz to the new role. | |||
==Allow confirmation messages to students== | |||
To do this for an individual quiz, go to: | |||
''Administration > Quiz administration > Permissions'' | |||
This may also be done on the site level by the administrator in ''Administration > Site administration > Users > Permissions > Define roles > Student'' | |||
#In the Capability column under ''Activity: Quiz'' find the capability ''mod/quiz:emailconfirmsubmission'' | |||
#Click on the + | |||
#On the next screen, select Student and click "Allow" | |||
{| | |||
| [[File:studentno.png|thumb|1. Click the + to add a role ]] | |||
| [[File:studentadd.png|thumb|2. Select Student and click "Allow"]] | |||
| [[File:studentyes.png|thumb|3. Students will now receive messages]] | |||
|} | |||
==Notes== | ==Notes== | ||
Line 23: | Line 53: | ||
* the teacher has moodle/site:accessallgroups. | * the teacher has moodle/site:accessallgroups. | ||
==How to configure the text of the | ==How to configure the text of the messages== | ||
'' | ''Administration > Site administration > Language > Language customization'' | ||
This can only be done by a user that has permission to alter the language files. To reconfigure the way the email reads, you will need to understand string variables and how they work as part of another string. While not complicated, this will require attention to detail. This section assumes you also have read [[Language customization]]. | This can only be done by a user that has permission to alter the language files. To reconfigure the way the email reads, you will need to understand string variables and how they work as part of another string. While not complicated, this will require attention to detail. This section assumes you also have read [[Language customization]]. | ||
Line 81: | Line 111: | ||
[[ja:解答送信の通知メール]] | [[ja:解答送信の通知メール]] | ||
[[de:E-Mail-Benachrichtigung bei Testabgabe]] | [[de:E-Mail-Benachrichtigung bei Testabgabe]] | ||
[[es:Notificación Email sobre envío de examen]] |
Latest revision as of 19:14, 6 February 2018
It is possible for a message to be sent out to confirm that the student submitted the quiz.
There are two types of notification:
- A confirmation to the student that their attempt has finished successfully
- A notification to the teacher(s) that someone has submitted an attempt. Messages are never sent for preview attempts.
Note that although the capabilities are "emailnotifysubmission/emailconfirmsubmission" the notifications do NOT have to be via email. The notifications come via Moodle's messaging system. Admins can set the defaults from Administration > Site administration > Plugins > Message outputs > Default message outputs to enable/disable email/pop up notification.
See Messaging settings for more details. (Notification messages in Moodle quiz are disabled by default.)
Allow Quiz notification messages to teachers
To do this for an individual quiz, click into the quiz, click the gear icon top right and click Permissions (Boost theme) or for other themes, click Permissions from the Quiz administration block.
This may also be done on the site level by the administrator in Administration > Site administration > Users > Permissions > Define roles > Teacher
- In the filter, type "email" to locate the capability "mod/quiz/emailnotifysubmission"
- Click on the + for "Roles with permission"
- On the next screen, select Teacher and click "Allow"
Messages in a specific quiz to specific teacher(s)
The system administrator will need to create a new role, and allow the the capability mod/quiz:emailnotifysubmission for that role. Do not give the capability to the teacher's role on the system or course level. The new role is similar to a teacher's role and should be available on the activity level.
In the course, go to the quiz and the quiz administration>locally assigned roles, assign the user(s) that should get emails/messages for a submitted quiz to the new role.
Allow confirmation messages to students
To do this for an individual quiz, go to: Administration > Quiz administration > Permissions
This may also be done on the site level by the administrator in Administration > Site administration > Users > Permissions > Define roles > Student
- In the Capability column under Activity: Quiz find the capability mod/quiz:emailconfirmsubmission
- Click on the +
- On the next screen, select Student and click "Allow"
Notes
- Note that if the quiz is set to separate groups, then teachers will only get a notification if either
- the student is in the same group as the teacher, or
- the teacher has moodle/site:accessallgroups.
How to configure the text of the messages
Administration > Site administration > Language > Language customization
This can only be done by a user that has permission to alter the language files. To reconfigure the way the email reads, you will need to understand string variables and how they work as part of another string. While not complicated, this will require attention to detail. This section assumes you also have read Language customization.
The subject and body of the emails are defined in the quiz.php language file that are in the "mod" group. The strings to edit are 'emailconfirmsubject', 'emailconfirmbody', 'emailnotifysubject' and 'emailnotifybody'. The $a string passed in when these language strings are loaded contains all the following information:
The emailconfirmbody string
Dear {$a->username}, Thank you for submitting your answers to '{$a->quizname}' in course '{$a->coursename}' at {$a->submissiontime}. This message confirms that we have safely received your answers. You can access this quiz at {$a->quizurl}.
The emailnotifybody string
Dear {$a->username}, {$a->studentname} has completed the quiz '{$a->quizname}' ({$a->quizurl}) in course '{$a->coursename}' You can review this attempt at {$a->quizreviewurl}.
The emailnotifysmall
{$a->studentname} has completed {$a->quizname}
The emailnotifysubject string
Quiz submission confirmation: {$a->quizname}
Potential strings to use in an email
- $a->coursename
- The name of the course
- $a->courseshortname
- The shortname of the course
- $a->quizname
- The name of the quiz
- $a->quizreporturl
- The URL of the results overview for this quiz (.../mod/quiz/report.php?q=quizid)
- $a->quizreportlink
- The URL of the results overview URL and quiz name as a HTML link
- $a->quizreviewurl
- The URL of the review page for this attempt (.../mod/quiz/review.php?attempt=attemptid)
- $a->quizreviewlink
- The attempt review URL and quiz name as a HTML link
- $a->quizurl
- The URL of the main page of the quiz (.../mod/quiz/view.php?q=quizid)
- $a->quizlink
- The URL of the quiz and the quiz name as a HTML link
- $a->attemptsubmissiontime
- The time the attempt was submitted, formatted using userdate().
- $a->timetaken
- How long the quiz attempt lasted.
- $a->studentname
- The name of the person who submitted the quiz.
- $a->studentidnumber
- The idnumber of the person who submitted the quiz.
- $a->studentusername
- The username of the person who submitted the quiz.
- $a->username
- The name of the user the email is being sent to.
- $a->useridnumber
- The idnumber of the user the email is being sent to.
- $a->userusername
- The username of the user the email is being sent to.