Skip to content

Commit

Permalink
Merge branch 'MDL-27990_assignment_notifications' of git://github.com…
Browse files Browse the repository at this point in the history
…/andyjdavis/moodle
  • Loading branch information
stronk7 committed Jun 28, 2011
2 parents 5163ac9 + 83dfca3 commit cddb428
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lib/messagelib.php
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
11 changes: 5 additions & 6 deletions mod/assignment/lib.php
Original file line number Diff line number Diff line change
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 @@ -2303,12 +2304,10 @@ function add_feedback_section() {
default :
break;
}
$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->updateElementAttr('mailinfo', $lastmailinfo);
$mform->addElement('checkbox', 'mailinfo',get_string('enablenotification','assignment').
$OUTPUT->help_icon('enablenotification', 'assignment') .':' );
$mform->setType('mailinfo', PARAM_INT);
}
}
Expand Down

0 comments on commit cddb428

Please sign in to comment.