From 5f8505882eb5272367f03f11fab1394f9842b39c Mon Sep 17 00:00:00 2001 From: moodler Date: Fri, 19 Mar 2004 08:18:13 +0000 Subject: [PATCH] To avoid some unpleasant stuff with filters etc, I made slight changes to separate the printing of the summary text from the edit button ... Might need some testing because people have adjusted old texts to work the old way ... if anyone complains I'll put it back ... --- course/format/topics/format.php | 20 ++++++++++++-------- course/format/weeks/format.php | 20 ++++++++++++-------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/course/format/topics/format.php b/course/format/topics/format.php index 83f7baacab..e27d08cb0b 100644 --- a/course/format/topics/format.php +++ b/course/format/topics/format.php @@ -138,13 +138,15 @@ echo "cellheading\" class=\"topicsoutlineside\" valign=top width=20> "; echo "cellcontent\" class=\"topicsoutlinecontent\" width=\"100%\">"; + echo format_text($thissection->summary, FORMAT_HTML); + if (isediting($course->id)) { - $thissection->summary .= " id\">pixpath/t/edit.gif\" ". - "height=11 width=11 border=0 alt=\"$streditsummary\">

"; + echo "id\">pixpath/t/edit.gif\" ". + " height=11 width=11 border=0 alt=\"$streditsummary\">
"; } - echo format_text($thissection->summary); + echo '
'; print_section($course, $thissection, $mods, $modnamesused); @@ -227,12 +229,14 @@ } else { echo ""; + echo format_text($thissection->summary, FORMAT_HTML); + if (isediting($course->id)) { - $thissection->summary .= " id>". - "pixpath/t/edit.gif\" border=0 height=11 width=11>"; + echo " id>". + "pixpath/t/edit.gif\" border=0 height=11 width=11>
"; } - - echo format_text($thissection->summary); + + echo '
'; print_section($course, $thissection, $mods, $modnamesused); diff --git a/course/format/weeks/format.php b/course/format/weeks/format.php index 64657906d0..fca6ac4c18 100644 --- a/course/format/weeks/format.php +++ b/course/format/weeks/format.php @@ -125,13 +125,15 @@ echo "cellheading\" class=\"weeklyoutlineside\" valign=top width=20> "; echo "cellcontent\" class=\"weeklyoutlinecontent\" width=\"100%\">"; + echo format_text($thissection->summary, FORMAT_HTML); + if (isediting($course->id)) { - $thissection->summary .= " id\">pixpath/t/edit.gif\" ". - "border=0 alt=\"$streditsummary\">

"; + echo " id\">pixpath/t/edit.gif\" ". + " border=0 alt=\"$streditsummary\">
"; } - - echo format_text($thissection->summary); + + echo '
'; print_section($course, $thissection, $mods, $modnamesused); @@ -217,12 +219,14 @@ echo "

$weekday - $endweekday

"; + echo format_text($thissection->summary, FORMAT_HTML); + if (isediting($course->id)) { - $thissection->summary .= " id\">". - "pixpath/t/edit.gif\" height=11 width=11 border=0>

"; + echo " id\">". + "pixpath/t/edit.gif\" height=11 width=11 border=0>
"; } - echo format_text($thissection->summary); + echo '
'; print_section($course, $thissection, $mods, $modnamesused); -- 2.39.5