]> git.mjollnir.org Git - moodle.git/commitdiff
Firming it up
authormoodler <moodler>
Sat, 14 Jun 2003 12:09:35 +0000 (12:09 +0000)
committermoodler <moodler>
Sat, 14 Jun 2003 12:09:35 +0000 (12:09 +0000)
course/format/topics.php

index a72b83bb1808bc7000fd3c39e34bc11627891a94..0ac240dd6fd5000c79c2fd936ca1b1f684475fc6 100644 (file)
     while ($section <= $course->numsections) {
 
         if (!empty($displaysection) and $displaysection != $section) {
-            if (!empty($sections[$section])) {
-                if (strlen($sections[$section]->summary) < 57) {
-                    $strsummary = " - ".$sections[$section]->summary;
+            if (empty($sections[$section])) {
+                $strsummary = "";
+            } else {
+                $strsummary = " - ".strip_tags($sections[$section]->summary);
+                if (strlen($strsummary) < 57) {
+                    $strsummary = " - $strsummary";
                 } else {
-                    $strsummary = " - ".substr($sections[$section]->summary, 0, 60)."...";
+                    $strsummary = " - ".substr($strsummary, 0, 60)."...";
                 }
-            } else {
-                $strsummary = "";
             }
-            $sectionmenu["topic=$section"] = "$section$strsummary";
+            $sectionmenu["topic=$section"] = s("$section$strsummary");
             $section++;
             continue;
         }