mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
quiz MDL-25297 fixing quiz messaging issues
This commit is contained in:
parent
a5e8e6e5de
commit
94263cca87
@ -25,9 +25,14 @@
|
||||
|
||||
$messageproviders = array (
|
||||
|
||||
// student has submitted a quiz attempt
|
||||
// notify teacher that a student has submitted a quiz attempt
|
||||
'submission' => array (
|
||||
'capability' => 'mod/quiz:emailnotifysubmission'
|
||||
),
|
||||
|
||||
// confirm a student's quiz attempt
|
||||
'confirmation' => array (
|
||||
'capability' => 'mod/quiz:emailconfirmsubmission'
|
||||
)
|
||||
|
||||
);
|
||||
|
@ -294,6 +294,7 @@ at {$a->submissiontime}.
|
||||
This email confirms that we have safely received your answers.
|
||||
|
||||
You can access this quiz at {$a->quizurl}.';
|
||||
$string['emailconfirmsmall'] = 'Thank you for submitting your answers to \'{$a->quizname}\'';
|
||||
$string['emailconfirmsubject'] = 'Quiz submission confirmation: {$a->quizname}';
|
||||
$string['emailnotifybody'] = 'Dear {$a->username},
|
||||
|
||||
@ -476,7 +477,8 @@ $string['matcherror'] = 'Grades do not match grade options - question skipped';
|
||||
$string['matchgrades'] = 'Match grades';
|
||||
$string['matchgradeserror'] = 'Error if grade not listed';
|
||||
$string['matchgradesnearest'] = 'Nearest grade if not listed';
|
||||
$string['messageprovider:submission'] = 'Quiz submission notifications';
|
||||
$string['messageprovider:confirmation'] = 'Confirmation of your own quiz submissions';
|
||||
$string['messageprovider:submission'] = 'Notification of quiz submissions';
|
||||
$string['max'] = 'Max';
|
||||
$string['min'] = 'Min';
|
||||
$string['minutes'] = 'Minutes';
|
||||
|
@ -1017,14 +1017,21 @@ function quiz_send_confirmation($a) {
|
||||
|
||||
// send email and analyse result
|
||||
$eventdata = new stdClass();
|
||||
$eventdata->modulename = 'quiz';
|
||||
$eventdata->component = 'mod_quiz';
|
||||
$eventdata->name = 'confirmation';
|
||||
$eventdata->notification = 1;
|
||||
|
||||
$eventdata->userfrom = get_admin();
|
||||
$eventdata->userto = $USER;
|
||||
$eventdata->subject = $subject;
|
||||
$eventdata->fullmessage = $body;
|
||||
$eventdata->fullmessageformat = FORMAT_PLAIN;
|
||||
$eventdata->fullmessagehtml = '';
|
||||
$eventdata->smallmessage = '';
|
||||
|
||||
$eventdata->smallmessage = get_string('emailconfirmsmall', 'quiz', $a);
|
||||
$eventdata->contexturl = $a->quizurl;
|
||||
$eventdata->contexturlname = $a->quizname;
|
||||
|
||||
return message_send($eventdata);
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
// This fragment is called by moodle_needs_upgrading() and /admin/index.php
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$module->version = 2010111900; // The (date) version of this module
|
||||
$module->version = 2010111904; // The (date) version of this module
|
||||
$module->requires = 2010080300; // Requires this Moodle version
|
||||
$module->cron = 0; // How often should cron check this module (seconds)?
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user