mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
FIxed a few silly bugs. Seems to test out OK now.
This commit is contained in:
parent
7123e12e03
commit
c30b1bc038
1 changed files with 5 additions and 5 deletions
|
@ -857,7 +857,7 @@ function assignment_email_teachers($course, $cm, $assignment, $submission) {
|
|||
$teachers = get_course_teachers($course->id);
|
||||
}
|
||||
|
||||
if (!$teachers) {
|
||||
if ($teachers) {
|
||||
|
||||
$strassignments = get_string('modulenameplural', 'assignment');
|
||||
$strassignment = get_string('modulename', 'assignment');
|
||||
|
@ -866,14 +866,14 @@ function assignment_email_teachers($course, $cm, $assignment, $submission) {
|
|||
foreach ($teachers as $teacher) {
|
||||
unset($info);
|
||||
$info->username = fullname($user);
|
||||
$info->assignment = "$submission->name";
|
||||
$info->url = "$CFG->wwwroot/mod/assignment/view.php?id=$cm->id";
|
||||
$info->assignment = $assignment->name;
|
||||
$info->url = "$CFG->wwwroot/mod/assignment/submissions.php?id=$assignment->id";
|
||||
|
||||
$postsubject = "$strsubmitted: $info->username -> $assignment->name";
|
||||
$posttext = "$course->shortname -> $strassignments -> $assignment->name\n";
|
||||
$posttext .= "---------------------------------------------------------------------\n";
|
||||
$posttext .= get_string("emailteachermail", "assignment", $info);
|
||||
$posttext .= "---------------------------------------------------------------------\n";
|
||||
$posttext .= "\n---------------------------------------------------------------------\n";
|
||||
|
||||
if ($user->mailformat == 1) { // HTML
|
||||
$posthtml = "<p><font face=\"sans-serif\">".
|
||||
|
@ -887,7 +887,7 @@ function assignment_email_teachers($course, $cm, $assignment, $submission) {
|
|||
$posthtml = "";
|
||||
}
|
||||
|
||||
@email_to_user($user, $teacher, $postsubject, $posttext, $posthtml); // If it fails, oh well, too bad.
|
||||
@email_to_user($teacher, $user, $postsubject, $posttext, $posthtml); // If it fails, oh well, too bad.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue