$string['allowresubmit'] = "Allow resubmitting";
$string['assignmentdetails'] = "Assignment details";
+$string['assignmentmail'] = "\$a->teacher has posted some feedback on your
+assignment submission for '\$a->assignment'
+
+You can see it appended to your assignment submission:
+
+ \$a->url";
+$string['assignmentmailhtml'] = "\$a->teacher has posted some feedback on your
+assignment submission for '<i>\$a->assignment</i>'<br /><br />
+You can see it appended to your <a href=\\\"\$a->url\\\">assignment submission</a>.";
$string['assignmentname'] = "Assignment name";
$string['assignmenttype'] = "Assignment type";
$string['description'] = "Description";
$string['editingended'] = "Editing period has ended";
$string['entries'] = "Entries";
$string['feedbackupdated'] = "Feedback updated for \$a entries";
+$string['journalmail'] = "\$a->teacher has posted some feedback on your
+journal entry for '\$a->journal'
+
+You can see it appended to your journal entry:
+
+ \$a->url";
+$string['journalmailhtml'] = "\$a->teacher has posted some feedback on your
+journal entry for '<i>\$a->journal</i>'<br /><br />
+You can see it appended to your <a href=\\\"\$a->url\\\">journal entry</a>.";
$string['journalname'] = "Journal name";
$string['journalquestion'] = "Journal question";
$string['journalrating1'] = "Not satisfactory";
$strassignments = get_string("modulenameplural", "assignment");
$strassignment = get_string("modulename", "assignment");
+ unset($assignmentinfo);
+ $assignmentinfo->teacher = "$teacher->firstname $teacher->lastname";
+ $assignmentinfo->assignment = "$submission->name";
+ $assignmentinfo->url = "$CFG->wwwroot/mod/assignment/view.php?id=$mod->id";
+
$postsubject = "$course->shortname: $strassignments: $submission->name";
$posttext = "$course->shortname -> $strassignments -> $submission->name\n";
$posttext .= "---------------------------------------------------------------------\n";
- $posttext .= "$teacher->firstname $teacher->lastname has posted some feedback on your\n";
- $posttext .= "assignment submission for '$submission->name'\n\n";
- $posttext .= "You can see it appended to your assignment submission:\n";
- $posttext .= " $CFG->wwwroot/mod/assignment/view.php?id=$mod->id\n";
+ $posttext .= get_string("assignmentmail", "assignment", $assignmentinfo);
$posttext .= "---------------------------------------------------------------------\n";
+
if ($user->mailformat == 1) { // HTML
- $posthtml = "<P><FONT FACE=sans-serif>".
- "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> ->".
- "<A HREF=\"$CFG->wwwroot/mod/assignment/index.php?id=$course->id\">$strassignments</A> ->".
- "<A HREF=\"$CFG->wwwroot/mod/assignment/view.php?id=$mod->id\">$submission->name</A></FONT></P>";
- $posthtml .= "<HR><FONT FACE=sans-serif>";
- $posthtml .= "<P>$teacher->firstname $teacher->lastname has posted some feedback on your";
- $posthtml .= " assignment submission for '<B>$submission->name</B>'</P>";
- $posthtml .= "<P>You can see it <A HREF=\"$CFG->wwwroot/mod/assignment/view.php?id=$mod->id\">";
- $posthtml .= "appended to your assignment submission</A>.</P></FONT><HR>";
+ $posthtml = "<p><font face=\"sans-serif\">".
+ "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->".
+ "<a href=\"$CFG->wwwroot/mod/assignment/index.php?id=$course->id\">$strassignments</a> ->".
+ "<a href=\"$CFG->wwwroot/mod/assignment/view.php?id=$mod->id\">$submission->name</a></font></p>";
+ $posthtml .= "<hr><font face=\"sans-serif\">";
+ $posthtml .= "<p>".get_string("assignmentmailhtml", "assignment", $assignmentinfo)."</p>";
+ $posthtml .= "</font><hr>";
} else {
- $posthtml = "";
+ $posthtml = "";
}
if (! email_to_user($user, $teacher, $postsubject, $posttext, $posthtml)) {
continue;
}
+ unset($journalinfo);
+ $journalinfo->teacher = "$teacher->firstname $teacher->lastname";
+ $journalinfo->journal = "$entry->name";
+ $journalinfo->url = "$CFG->wwwroot/mod/journal/view.php?id=$mod->id";
+
$postsubject = "$course->shortname: Journal feedback: $entry->name";
$posttext = "$course->shortname -> Journals -> $entry->name\n";
$posttext .= "---------------------------------------------------------------------\n";
- $posttext .= "$teacher->firstname $teacher->lastname has posted some feedback on your\n";
- $posttext .= "journal entry for '$entry->name'\n\n";
- $posttext .= "You can see it appended to your journal entry:\n";
- $posttext .= " $CFG->wwwroot/mod/journal/view.php?id=$mod->id\n";
+ $posttext .= get_string("journalmail", "journal", $journalinfo);
$posttext .= "---------------------------------------------------------------------\n";
if ($user->mailformat == 1) { // HTML
- $posthtml = "<P><FONT FACE=sans-serif>".
- "<A HREF=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</A> ->".
- "<A HREF=\"$CFG->wwwroot/mod/journal/index.php?id=$course->id\">Journals</A> ->".
- "<A HREF=\"$CFG->wwwroot/mod/journal/view.php?id=$mod->id\">$entry->name</A></FONT></P>";
- $posthtml .= "<HR><FONT FACE=sans-serif>";
- $posthtml .= "<P>$teacher->firstname $teacher->lastname has posted some feedback on your";
- $posthtml .= " journal entry for '<B>$entry->name</B>'</P>";
- $posthtml .= "<P>You can see it <A HREF=\"$CFG->wwwroot/mod/journal/view.php?id=$mod->id\">";
- $posthtml .= "appended to your journal entry</A>.</P></FONT><HR>";
+ $posthtml = "<p><font face=\"sans-serif\">".
+ "<a href=\"$CFG->wwwroot/course/view.php?id=$course->id\">$course->shortname</a> ->".
+ "<a href=\"$CFG->wwwroot/mod/journal/index.php?id=$course->id\">journals</a> ->".
+ "<a href=\"$CFG->wwwroot/mod/journal/view.php?id=$mod->id\">$entry->name</a></font></p>";
+ $posthtml .= "<hr><font face=\"sans-serif\">";
+ $posthtml .= "<p>".get_string("journalmailhtml", "journal", $journalinfo)."</p>";
+ $posthtml .= "</font><hr>";
} else {
$posthtml = "";
}