Merge branch 'MDL-33697' of git://github.com/netspotau/moodle-mod_assign

This commit is contained in:
Dan Poltawski 2012-06-18 13:12:56 +08:00
commit 728aee9767
4 changed files with 6 additions and 10 deletions

View file

@ -25,10 +25,7 @@
$messageproviders = array ( $messageproviders = array (
// Ordinary assignment submissions // Ordinary assignment submissions
'assign_student_notification' => array( 'assign_notification' => array(
),
'assign_grader_notification' => array(
'capability' => 'mod/assign:grade'
) )
); );

View file

@ -147,8 +147,7 @@ $string['locksubmissionforstudent'] = 'Prevent any more submissions for student:
$string['locksubmissions'] = 'Lock submissions'; $string['locksubmissions'] = 'Lock submissions';
$string['manageassignfeedbackplugins'] = 'Manage assignment feedback plugins'; $string['manageassignfeedbackplugins'] = 'Manage assignment feedback plugins';
$string['manageassignsubmissionplugins'] = 'Manage assignment submission plugins'; $string['manageassignsubmissionplugins'] = 'Manage assignment submission plugins';
$string['messageprovider:assign_student_notification'] = 'Assignment student notifications'; $string['messageprovider:assign_notification'] = 'Assignment notifications';
$string['messageprovider:assign_grader_notification'] = 'Assignment grader notifications';
$string['modulename'] = 'Assignment'; $string['modulename'] = 'Assignment';
$string['modulename_help'] = 'The assignment activity module enables a teacher to communicate tasks, collect work and provide grades and feedback. $string['modulename_help'] = 'The assignment activity module enables a teacher to communicate tasks, collect work and provide grades and feedback.

View file

@ -1181,7 +1181,7 @@ class assign {
// need to send this to the student // need to send this to the student
$messagetype = 'feedbackavailable'; $messagetype = 'feedbackavailable';
$eventtype = 'assign_student_notification'; $eventtype = 'assign_notification';
$updatetime = $submission->lastmodified; $updatetime = $submission->lastmodified;
$modulename = get_string('modulename', 'assign'); $modulename = get_string('modulename', 'assign');
self::send_assignment_notification($grader, $user, $messagetype, $eventtype, $updatetime, $mod, $contextmodule, $course, $modulename, $submission->name); self::send_assignment_notification($grader, $user, $messagetype, $eventtype, $updatetime, $mod, $contextmodule, $course, $modulename, $submission->name);
@ -2438,7 +2438,7 @@ class assign {
return; return;
} }
$user = $DB->get_record('user', array('id'=>$submission->userid), '*', MUST_EXIST); $user = $DB->get_record('user', array('id'=>$submission->userid), '*', MUST_EXIST);
$this->send_notification($user, $user, 'submissionreceipt', 'assign_student_notification', $submission->timemodified); $this->send_notification($user, $user, 'submissionreceipt', 'assign_notification', $submission->timemodified);
} }
/** /**
@ -2460,7 +2460,7 @@ class assign {
$user = $DB->get_record('user', array('id'=>$submission->userid), '*', MUST_EXIST); $user = $DB->get_record('user', array('id'=>$submission->userid), '*', MUST_EXIST);
if ($teachers = $this->get_graders($user->id)) { if ($teachers = $this->get_graders($user->id)) {
foreach ($teachers as $teacher) { foreach ($teachers as $teacher) {
$this->send_notification($user, $teacher, 'gradersubmissionupdated', 'assign_grader_notification', $submission->timemodified); $this->send_notification($user, $teacher, 'gradersubmissionupdated', 'assign_notification', $submission->timemodified);
} }
} }
} }

View file

@ -25,7 +25,7 @@
defined('MOODLE_INTERNAL') || die(); defined('MOODLE_INTERNAL') || die();
$module->component = 'mod_assign'; // Full name of the plugin (used for diagnostics) $module->component = 'mod_assign'; // Full name of the plugin (used for diagnostics)
$module->version = 2012061100; // The current module version (Date: YYYYMMDDXX) $module->version = 2012061400; // The current module version (Date: YYYYMMDDXX)
$module->requires = 2012050300; // Requires this Moodle version $module->requires = 2012050300; // Requires this Moodle version
$module->cron = 60; $module->cron = 60;