From: rkingdon Date: Tue, 16 Nov 2004 20:49:25 +0000 (+0000) Subject: Stock comments can now contain single quotes. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0446243690dbb998b8bd28ed197994a734d644cc;p=moodle.git Stock comments can now contain single quotes. --- diff --git a/mod/workshop/locallib.php b/mod/workshop/locallib.php index 6011ede7fa..90423be0ac 100644 --- a/mod/workshop/locallib.php +++ b/mod/workshop/locallib.php @@ -2006,7 +2006,8 @@ function workshop_print_assessment($workshop, $assessment = false, $allowchanges if ($stockcomments = get_records_select("workshop_stockcomments", "workshopid = $workshop->id AND elementno = $i", "id")) { // show comments in fixed order (oldest first) foreach ($stockcomments as $stockcomment) { - echo "comments';\"><<$stockcomment->comments>>\n"; + echo "comments)."';\"><<$stockcomment->comments>>\n"; if (isteacheredit($course->id, $USER->id)) { echo " id;document.assessmentform.submit();\"> <--".get_string("delete","workshop")."\n"; } @@ -2109,7 +2110,9 @@ function workshop_print_assessment($workshop, $assessment = false, $allowchanges if ($stockcomments = get_records_select("workshop_stockcomments", "workshopid = $workshop->id AND elementno = $i", "id")) { // get comments in a fixed order - oldest first foreach ($stockcomments as $stockcomment) { - echo "comments';\"><<$stockcomment->comments>>\n"; + echo "comments). + "';\"><<$stockcomment->comments>>\n"; if (isteacheredit($course->id, $USER->id)) { echo " id;document.assessmentform.submit();\"> <--".get_string("delete","workshop")."\n"; } @@ -2212,7 +2215,9 @@ function workshop_print_assessment($workshop, $assessment = false, $allowchanges if ($stockcomments = get_records_select("workshop_stockcomments", "workshopid = $workshop->id AND elementno = $i", "id")) { // get comments in a fixed order - oldest first foreach ($stockcomments as $stockcomment) { - echo "comments';\"><<$stockcomment->comments>>\n"; + echo "comments). + "';\"><<$stockcomment->comments>>\n"; if (isteacheredit($course->id, $USER->id)) { echo " id;document.assessmentform.submit();\"> <--".get_string("delete","workshop")."\n"; } @@ -2373,7 +2378,9 @@ function workshop_print_assessment($workshop, $assessment = false, $allowchanges if ($stockcomments = get_records_select("workshop_stockcomments", "workshopid = $workshop->id AND elementno = $i", "id")) { // show comments in fixed (creation) order foreach ($stockcomments as $stockcomment) { - echo "comments';\"><<$stockcomment->comments>>\n"; + echo "comments). + "';\"><<$stockcomment->comments>>\n"; if (isteacheredit($course->id, $USER->id)) { echo " id;document.assessmentform.submit();\"> <--".get_string("delete","workshop")."\n"; } @@ -2432,7 +2439,8 @@ function workshop_print_assessment($workshop, $assessment = false, $allowchanges if ($stockcomments = get_records_select("workshop_stockcomments", "workshopid = $workshop->id AND elementno = 99", "id")) { // show in the same order (oldest at the top) foreach ($stockcomments as $stockcomment) { - echo "comments';\"><<$stockcomment->comments>>\n"; + echo "comments)."';\"><<$stockcomment->comments>>\n"; if (isteacheredit($course->id, $USER->id)) { echo " id;document.assessmentform.submit();\"> <--".get_string("delete","workshop")."\n"; }