From 0446243690dbb998b8bd28ed197994a734d644cc Mon Sep 17 00:00:00 2001 From: rkingdon Date: Tue, 16 Nov 2004 20:49:25 +0000 Subject: [PATCH] Stock comments can now contain single quotes. --- mod/workshop/locallib.php | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) 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"; } -- 2.39.5