Skip to content
Browse files

MDL-27990 assignment: Some small modifications to the assignment noti…

…fication code

AMOS BEGIN
 MOV [enableemailnotification,mod_assignment],[enablenotification,mod_assignment]
 MOV [enableemailnotification_help,mod_assignment],[enablenotification_help,mod_assignment]
AMOS END
  • Loading branch information...
1 parent 3552484 commit be34802d23c2e0779a8ca0d5a1cad71fd0d212f4 @andyjdavis andyjdavis committed Jun 24, 2011
Showing with 8 additions and 7 deletions.
  1. +1 −1 lib/messagelib.php
  2. +2 −2 mod/assignment/lang/en/assignment.php
  3. +5 −4 mod/assignment/lib.php
View
2 lib/messagelib.php
@@ -133,7 +133,7 @@ function message_send($eventdata) {
// Find out if user has configured this output
$userisconfigured = $processor->object->is_user_configured($eventdata->userto);
- // DEBUG: noify if we are forcing unconfigured output
+ // DEBUG: notify if we are forcing unconfigured output
if ($permitted == 'forced' && !$userisconfigured) {
debugging('Attempt to force message delivery to user who has "'.$processor->name.'" output unconfigured', DEBUG_NORMAL);
}
View
4 mod/assignment/lang/en/assignment.php
@@ -90,8 +90,8 @@
Only teachers who are able to grade the particular assignment are notified. So, for example, if the course uses separate groups, teachers restricted to particular groups won\'t receive notification about students in other groups.';
$string['emptysubmission'] = 'You have not submitted anything yet';
-$string['enableemailnotification'] = 'Send notification emails';
-$string['enableemailnotification_help'] = 'If enabled, students will receive email notification when their assignment submissions are graded.';
+$string['enablenotification'] = 'Send notifications';
+$string['enablenotification_help'] = 'If enabled, students will be notified when their assignment submissions are graded.';
$string['errornosubmissions'] = 'There are no submissions to download';
$string['existingfiledeleted'] = 'Existing file has been deleted: {$a}';
$string['failedupdatefeedback'] = 'Failed to update submission feedback for user {$a}';
View
9 mod/assignment/lib.php
@@ -1021,6 +1021,7 @@ function display_submission($offset=-1,$userid =-1, $display=true) {
$mformdata->submissioncommentformat= FORMAT_HTML;
$mformdata->submission_content= $this->print_user_files($user->id,true);
$mformdata->filter = $filter;
+ $mformdata->mailinfo = get_user_preferences('assignment_mailinfo', 0);
if ($assignment->assignmenttype == 'upload') {
$mformdata->fileui_options = array('subdirs'=>1, 'maxbytes'=>$assignment->maxbytes, 'maxfiles'=>$assignment->var1, 'accepted_types'=>'*', 'return_types'=>FILE_INTERNAL);
} elseif ($assignment->assignmenttype == 'uploadsingle') {
@@ -1470,9 +1471,9 @@ function display_submissions($message='') {
if (get_user_preferences('assignment_mailinfo', 1)) {
$mailinfopref = true;
}
- $emailnotification = html_writer::checkbox('mailinfo', 1, $mailinfopref, get_string('enableemailnotification','assignment'));
+ $emailnotification = html_writer::checkbox('mailinfo', 1, $mailinfopref, get_string('enablenotification','assignment'));
- $emailnotification .= $OUTPUT->help_icon('enableemailnotification', 'assignment');
+ $emailnotification .= $OUTPUT->help_icon('enablenotification', 'assignment');
echo html_writer::tag('div', $emailnotification, array('class'=>'emailnotification'));
$savefeedback = html_writer::empty_tag('input', array('type'=>'submit', 'name'=>'fastg', 'value'=>get_string('saveallfeedback', 'assignment')));
@@ -2304,8 +2305,8 @@ function add_feedback_section() {
$lastmailinfo = get_user_preferences('assignment_mailinfo', 1) ? array('checked'=>'checked') : array();
$mform->addElement('hidden', 'mailinfo_h', "0");
$mform->setType('mailinfo_h', PARAM_INT);
- $mform->addElement('checkbox', 'mailinfo',get_string('enableemailnotification','assignment').
- $OUTPUT->help_icon('enableemailnotification', 'assignment') .':' );
+ $mform->addElement('checkbox', 'mailinfo',get_string('enablenotification','assignment').
+ $OUTPUT->help_icon('enablenotification', 'assignment') .':' );
$mform->updateElementAttr('mailinfo', $lastmailinfo);
$mform->setType('mailinfo', PARAM_INT);
}

0 comments on commit be34802

Please sign in to comment.
Something went wrong with that request. Please try again.