]> git.mjollnir.org Git - moodle.git/commitdiff
Removed a lot of THEMES and some other clean up
authormoodler <moodler>
Tue, 25 Jan 2005 14:18:51 +0000 (14:18 +0000)
committermoodler <moodler>
Tue, 25 Jan 2005 14:18:51 +0000 (14:18 +0000)
A LOT of clean up and speed-up is still possible in these
important files by converting all "strings" to 'strings'

course/format/topics/format.php
course/format/weeks/format.php

index 903517ccccf05293243094e65c09832e6df649a3..9a344017b8620d72366b3e44cbf4247290000b57 100644 (file)
@@ -82,7 +82,7 @@
         $stractivityclipboard = strip_tags(get_string("activityclipboard", "", addslashes($USER->activitycopyname)));
         $strcancel= get_string("cancel");
         echo "<tr>";
-        echo "<td colspan=\"3\" valign=\"top\" bgcolor=\"$THEME->cellcontent\" class=\"topicoutlineclip\" width=\"100%\">";
+        echo "<td colspan=\"3\" valign=\"top\" class=\"topicoutlineclip\" width=\"100%\">";
         echo "<p><font size=\"2\">";
         echo "$stractivityclipboard&nbsp;&nbsp;(<a href=\"mod.php?cancelcopy=true&amp;sesskey=$USER->sesskey\">$strcancel</a>)";
         echo "</font></p>";
 
     if ($thissection->summary or $thissection->sequence or isediting($course->id)) {
         echo '<tr id="section_0">';
-        echo "<td nowrap=\"nowrap\" bgcolor=\"$THEME->cellheading\" class=\"topicsoutlineside\" valign=\"top\" width=\"20\">&nbsp;</td>";
-        echo "<td valign=\"top\" bgcolor=\"$THEME->cellcontent\" class=\"topicsoutlinecontent\" width=\"100%\">";
+        echo '<td nowrap="nowrap" class="topicsoutlineside" valign="top" width="20">&nbsp;</td>';
+        echo '<td valign="top"  class="topicsoutlinecontent" width="100%">';
 
         $summaryformatoptions->noclean = true;
         echo format_text($thissection->summary, FORMAT_HTML, $summaryformatoptions);
 
         if (isediting($course->id)) {
-            echo "<a title=\"$streditsummary\" ".
-                 " href=\"editsection.php?id=$thissection->id\"><img src=\"$CFG->pixpath/t/edit.gif\" ".
-                 " height=\"11\" width=\"11\" border=\"0\" alt=\"$streditsummary\" /></a><br /><br />";
+            echo '<a title="'.$streditsummary.'" '.
+                 ' href="editsection.php?id='.$thissection->id.'"><img src="'.$CFG->pixpath.'/t/edit.gif" '.
+                 ' height="11" width="11" border="0" alt="'.$streditsummary.'" /></a><br /><br />';
         }
 
         print_section($course, $thissection, $mods, $modnamesused);
             print_section_add_menus($course, $section, $modnames);
         }
 
-        echo "</td>";
-        echo "<td nowrap=\"nowrap\" bgcolor=\"$THEME->cellheading\" class=\"topicsoutlineside\" valign=\"top\" align=\"center\" width=\"10\">";
-        echo "&nbsp;</td></tr>";
-        echo "<tr><td colspan=\"3\"><img src=\"../pix/spacer.gif\" width=\"1\" height=\"1\" alt=\"\" /></td></tr>";
+        echo '</td>';
+        echo '<td nowrap="nowrap" class="topicsoutlineside" valign="top" align="center" width="10">';
+        echo '&nbsp;</td></tr>';
+        echo '<tr><td colspan="3"><img src="../pix/spacer.gif" width="1" height="1" alt="" /></td></tr>';
     }
 
 
             $currenttopic = ($course->marker == $section);
 
             if (!$thissection->visible) {
-                $colorsides = "bgcolor=\"$THEME->hidden\" class=\"topicsoutlinesidehidden\"";
-                $colormain  = "bgcolor=\"$THEME->cellcontent\" class=\"topicsoutlinecontenthidden\"";
+                $colorsides = 'class="topicsoutlinesidehidden"';
+                $colormain  = 'class="topicsoutlinecontenthidden"';
             } else if ($currenttopic) {
-                $colorsides = "bgcolor=\"$THEME->cellheading2\" class=\"topicsoutlinesidehighlight\"";
-                $colormain  = "bgcolor=\"$THEME->cellcontent\" class=\"topicsoutlinecontenthighlight\"";
+                $colorsides = 'class="topicsoutlinesidehighlight"';
+                $colormain  = 'class="topicsoutlinecontenthighlight"';
             } else {
-                $colorsides = "bgcolor=\"$THEME->cellheading\" class=\"topicsoutlineside\"";
-                $colormain  = "bgcolor=\"$THEME->cellcontent\" class=\"topicsoutlinecontent\"";
+                $colorsides = 'class="topicsoutlineside"';
+                $colormain  = 'class="topicsoutlinecontent"';
             }
 
             echo "<tr>";
index f8e07aa8c575feb1d06be2c6bc420e65ef74699a..9e9ca9c61a5381cba63c5d6c1b147e64f0d916bb 100644 (file)
@@ -72,7 +72,7 @@
         $stractivityclipboard = strip_tags(get_string("activityclipboard", "", addslashes($USER->activitycopyname)));
         $strcancel= get_string("cancel");
         echo "<tr>";
-        echo "<td colspan=\"3\" valign=\"top\" bgcolor=\"$THEME->cellcontent\" class=\"weeklyoutlineclip\" width=\"100%\">";
+        echo "<td colspan=\"3\" valign=\"top\" class=\"weeklyoutlineclip\" width=\"100%\">";
         echo "<p><font size=\"2\">";
         echo "$stractivityclipboard&nbsp;&nbsp;(<a href=\"mod.php?cancelcopy=true&amp;sesskey=$USER->sesskey\">$strcancel</a>)";
         echo "</font></p>";
@@ -88,8 +88,8 @@
 
     if ($thissection->summary or $thissection->sequence or isediting($course->id)) {
         echo "<tr>";
-        echo "<td nowrap=\"nowrap\" bgcolor=\"$THEME->cellheading\" class=\"weeklyoutlineside\" valign=\"top\" width=\"20\">&nbsp;</td>";
-        echo "<td valign=\"top\" bgcolor=\"$THEME->cellcontent\" class=\"weeklyoutlinecontent\" width=\"100%\">";
+        echo "<td nowrap=\"nowrap\" class=\"weeklyoutlineside\" valign=\"top\" width=\"20\">&nbsp;</td>";
+        echo "<td valign=\"top\" class=\"weeklyoutlinecontent\" width=\"100%\">";
 
         $summaryformatoptions->noclean = true;
         echo format_text($thissection->summary, FORMAT_HTML, $summaryformatoptions);
         }
 
         echo "</td>";
-        echo "<td nowrap=\"nowrap\" bgcolor=\"$THEME->cellheading\" class=\"weeklyoutlineside\" valign=\"top\" align=\"center\" width=\"10\">";
+        echo "<td nowrap=\"nowrap\" class=\"weeklyoutlineside\" valign=\"top\" align=\"center\" width=\"10\">";
         echo "&nbsp;</td></tr>";
         echo "<tr><td colspan=\"3\"><img src=\"../pix/spacer.gif\" width=\"1\" height=\"1\" alt=\"\" /></td></tr>";
     }
             $currentweek = (($weekdate <= $timenow) && ($timenow < $nextweekdate));
 
             if (!$thissection->visible) {
-                $colorsides = "bgcolor=\"$THEME->hidden\" class=\"weeklyoutlinesidehidden\"";
-                $colormain  = "bgcolor=\"$THEME->cellcontent\" class=\"weeklyoutlinecontenthidden\"";
+                $colorsides = "class=\"weeklyoutlinesidehidden\"";
+                $colormain  = "class=\"weeklyoutlinecontenthidden\"";
             } else if ($currentweek) {
-                $colorsides = "bgcolor=\"$THEME->cellheading2\" class=\"weeklyoutlinesidehighlight\"";
-                $colormain  = "bgcolor=\"$THEME->cellcontent\" class=\"weeklyoutlinecontenthighlight\"";
+                $colorsides = "class=\"weeklyoutlinesidehighlight\"";
+                $colormain  = "class=\"weeklyoutlinecontenthighlight\"";
             } else {
-                $colorsides = "bgcolor=\"$THEME->cellheading\" class=\"weeklyoutlineside\"";
-                $colormain  = "bgcolor=\"$THEME->cellcontent\" class=\"weeklyoutlinecontent\"";
+                $colorsides = "class=\"weeklyoutlineside\"";
+                $colormain  = "class=\"weeklyoutlinecontent\"";
             }
 
             echo "<tr>";