diff --git a/mod/assignment/index.php b/mod/assignment/index.php
index 234fd047a6d..5be03e06f2a 100644
--- a/mod/assignment/index.php
+++ b/mod/assignment/index.php
@@ -77,10 +77,10 @@
$due = userdate($assignment->timedue);
if (!$assignment->visible) {
//Show dimmed if the mod is hidden
- $link = "coursemodule\">$assignment->name";
+ $link = "coursemodule\">".format_string($assignment->name,true)."";
} else {
//Show normal if the mod is visible
- $link = "coursemodule\">$assignment->name";
+ $link = "coursemodule\">".format_string($assignment->name,true)."";
}
$printsection = "";
diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php
index 5d407eeb0e7..5030dc4a626 100644
--- a/mod/assignment/lib.php
+++ b/mod/assignment/lib.php
@@ -255,11 +255,11 @@ function assignment_cron () {
unset($assignmentinfo);
$assignmentinfo->teacher = fullname($teacher);
- $assignmentinfo->assignment = "$submission->name";
+ $assignmentinfo->assignment = format_string($submission->name,true);
$assignmentinfo->url = "$CFG->wwwroot/mod/assignment/view.php?id=$mod->id";
- $postsubject = "$course->shortname: $strassignments: $submission->name";
- $posttext = "$course->shortname -> $strassignments -> $submission->name\n";
+ $postsubject = "$course->shortname: $strassignments: ".format_string($submission->name,true);
+ $posttext = "$course->shortname -> $strassignments -> ".format_string($submission->name,true)."\n";
$posttext .= "---------------------------------------------------------------------\n";
$posttext .= get_string("assignmentmail", "assignment", $assignmentinfo);
$posttext .= "---------------------------------------------------------------------\n";
@@ -268,7 +268,7 @@ function assignment_cron () {
$posthtml = "
".
"wwwroot/course/view.php?id=$course->id\">$course->shortname ->".
"wwwroot/mod/assignment/index.php?id=$course->id\">$strassignments ->".
- "wwwroot/mod/assignment/view.php?id=$mod->id\">$submission->name
";
+ "wwwroot/mod/assignment/view.php?id=$mod->id\">".format_string($submission->name,true)."";
$posthtml .= "
";
$posthtml .= "".get_string("assignmentmailhtml", "assignment", $assignmentinfo)."
";
$posthtml .= "
";
@@ -859,11 +859,11 @@ function assignment_email_teachers($course, $cm, $assignment, $submission) {
foreach ($teachers as $teacher) {
unset($info);
$info->username = fullname($user);
- $info->assignment = $assignment->name;
+ $info->assignment = format_string($assignment->name,true);
$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 = "$course->shortname -> $strassignments -> ".format_string($assignment->name,true)."\n";
$posttext .= "---------------------------------------------------------------------\n";
$posttext .= get_string("emailteachermail", "assignment", $info);
$posttext .= "\n---------------------------------------------------------------------\n";
@@ -872,7 +872,7 @@ function assignment_email_teachers($course, $cm, $assignment, $submission) {
$posthtml = "".
"wwwroot/course/view.php?id=$course->id\">$course->shortname ->".
"wwwroot/mod/assignment/index.php?id=$course->id\">$strassignments ->".
- "wwwroot/mod/assignment/view.php?id=$cm->id\">$assignment->name
";
+ "wwwroot/mod/assignment/view.php?id=$cm->id\">".format_string($assignment->name,true)."";
$posthtml .= "
";
$posthtml .= "".get_string("emailteachermailhtml", "assignment", $info)."
";
$posthtml .= "
";
diff --git a/mod/assignment/restorelib.php b/mod/assignment/restorelib.php
index a858ec89e64..a6be6bffa70 100644
--- a/mod/assignment/restorelib.php
+++ b/mod/assignment/restorelib.php
@@ -63,7 +63,7 @@
$newid = insert_record ("assignment",$assignment);
//Do some output
- echo "".get_string("modulename","assignment")." \"".$assignment->name."\"";
+ echo "".get_string("modulename","assignment")." \"".format_string(stripslashes($assignment->name),true)."\"";
backup_flush(300);
if ($newid) {
diff --git a/mod/assignment/submissions.php b/mod/assignment/submissions.php
index 13910fb7e85..4db6b598fcf 100644
--- a/mod/assignment/submissions.php
+++ b/mod/assignment/submissions.php
@@ -32,9 +32,9 @@
$strsubmissions = get_string("submissions", "assignment");
$strsaveallfeedback = get_string("saveallfeedback", "assignment");
- print_header_simple($assignment->name, "",
+ print_header_simple(format_string($assignment->name), "",
"id\">$strassignments ->
- id\">$assignment->name -> $strsubmissions",
+ id\">".format_string($assignment->name,true)." -> $strsubmissions",
"", "", true, update_module_button($cm->id, $course->id, $strassignment), navmenu($course, $cm));
/// Check to see if groups are being used in this assignment
diff --git a/mod/assignment/upload.php b/mod/assignment/upload.php
index fb73f967517..cf35ddeb258 100644
--- a/mod/assignment/upload.php
+++ b/mod/assignment/upload.php
@@ -23,9 +23,9 @@
$strassignment = get_string("modulename", "assignment");
$strupload = get_string("upload");
- print_header_simple("$assignment->name : $strupload", "",
+ print_header_simple(format_string($assignment->name)." : $strupload", "",
"id>$strassignments ->
- id\">$assignment->name -> $strupload",
+ id\">".format_string($assignment->name,true)." -> $strupload",
"", "", true);
if ($submission = get_record("assignment_submissions", "assignment", $assignment->id, "userid", $USER->id)) {
diff --git a/mod/assignment/view.php b/mod/assignment/view.php
index 24b9dccad3f..6aa1116cec5 100644
--- a/mod/assignment/view.php
+++ b/mod/assignment/view.php
@@ -38,8 +38,8 @@
$strassignments = get_string("modulenameplural", "assignment");
$strassignment = get_string("modulename", "assignment");
- print_header_simple($assignment->name, "",
- "id\">$strassignments -> $assignment->name",
+ print_header_simple(format_string($assignment->name), "",
+ "id\">$strassignments -> ".format_string($assignment->name,true),
"", "", true, update_module_button($cm->id, $course->id, $strassignment), navmenu($course, $cm));
if (isteacher($course->id)) {
@@ -65,7 +65,7 @@
}
print_simple_box_start('center', '70%', '', 5, 'generalbox', 'intro');
- print_heading($assignment->name, "center");
+ print_heading(format_string($assignment->name), "center");
$timedifference = $assignment->timedue - time();
if ($timedifference < 31536000) { // Don't bother showing dates over a year in the future