MDL-25375 - mod/feedback/complete.php throws exception if email notifications are enabled
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Defines message providers (types of messages being sent)
|
||||
*
|
||||
* @package mod-assignment
|
||||
* @copyright 2010 onwards Aparup Banerjee http://moodle.com
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$messageproviders = array (
|
||||
|
||||
/// Submitting a feedback
|
||||
'submission' => array (
|
||||
)
|
||||
|
||||
);
|
||||
@@ -162,6 +162,7 @@ you can associate them with this feedback using map course(s). Multiple courses
|
||||
$string['mappedcourses'] = 'Mapped courses';
|
||||
$string['max_args_exceeded'] = 'Max 6 arguments can be handled, too many arguments for';
|
||||
$string['maximal'] = 'maximal';
|
||||
$string['messageprovider:submission'] = 'Feedback notifications';
|
||||
$string['mode'] = 'Mode';
|
||||
$string['modulename'] = 'Feedback';
|
||||
$string['modulename_help'] = 'The feedback modules enables custom surveys to be created.';
|
||||
|
||||
@@ -2582,8 +2582,8 @@ function feedback_send_email($cm, $feedback, $course, $userid) {
|
||||
|
||||
if($feedback->anonymous == FEEDBACK_ANONYMOUS_NO) {
|
||||
$eventdata = new stdClass();
|
||||
$eventdata->name = 'feedback';
|
||||
$eventdata->component = 'mod';
|
||||
$eventdata->name = 'submission';
|
||||
$eventdata->component = 'mod_feedback';
|
||||
$eventdata->userfrom = $user;
|
||||
$eventdata->userto = $teacher;
|
||||
$eventdata->subject = $postsubject;
|
||||
@@ -2594,8 +2594,8 @@ function feedback_send_email($cm, $feedback, $course, $userid) {
|
||||
message_send($eventdata);
|
||||
}else {
|
||||
$eventdata = new stdClass();
|
||||
$eventdata->name = 'feedback';
|
||||
$eventdata->component = 'mod';
|
||||
$eventdata->name = 'submission';
|
||||
$eventdata->component = 'mod_feedback';
|
||||
$eventdata->userfrom = $teacher;
|
||||
$eventdata->userto = $teacher;
|
||||
$eventdata->subject = $postsubject;
|
||||
@@ -2646,8 +2646,8 @@ function feedback_send_email_anonym($cm, $feedback, $course) {
|
||||
$posthtml = ($teacher->mailformat == 1) ? feedback_send_email_html($info, $course, $cm) : '';
|
||||
|
||||
$eventdata = new stdClass();
|
||||
$eventdata->name = 'feedback';
|
||||
$eventdata->component = 'mod';
|
||||
$eventdata->name = 'submission';
|
||||
$eventdata->component = 'mod_feedback';
|
||||
$eventdata->userfrom = $teacher;
|
||||
$eventdata->userto = $teacher;
|
||||
$eventdata->subject = $postsubject;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
*/
|
||||
|
||||
|
||||
$module->version = 2010103100; // The current module version (Date: YYYYMMDDXX)
|
||||
$module->version = 2010112302; // The current module version (Date: YYYYMMDDXX)
|
||||
$module->requires = 2010080300; // Requires this Moodle version
|
||||
$feedback_version_intern = 1; //this version is used for restore older backups
|
||||
$module->cron = 0; // Period for cron to check this module (secs)
|
||||
|
||||
Reference in New Issue
Block a user