Skip to content

Commit

Permalink
MDL-27990 assignment: Some small modifications to the assignment noti…
Browse files Browse the repository at this point in the history
…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
andyjdavis committed Jun 24, 2011
1 parent 3552484 commit be34802
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/messagelib.php
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions mod/assignment/lang/en/assignment.php
Expand Up @@ -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}';
Expand Down
9 changes: 5 additions & 4 deletions mod/assignment/lib.php
Expand Up @@ -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') {
Expand Down Expand Up @@ -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')));
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit be34802

Please sign in to comment.