]> git.mjollnir.org Git - moodle.git/commitdiff
Some more cleaning up of the HTML and code formatting ...
authormoodler <moodler>
Fri, 17 Oct 2003 08:38:16 +0000 (08:38 +0000)
committermoodler <moodler>
Fri, 17 Oct 2003 08:38:16 +0000 (08:38 +0000)
mod/glossary/formats/1.php
mod/glossary/formats/2.php
mod/glossary/formats/3.php

index 25efe73f463c7c547a75c6459f6fbff713554658..2a87b3852d578c0bf8b15b3627e190b9a62dfc65 100644 (file)
@@ -3,45 +3,38 @@
 function glossary_print_entry_by_format($course, $cm, $glossary, $entry,$currentview="",$cat="") {
     global $THEME, $USER;
 
-//    if ($entry->timemarked < $entry->modified) {
-        $colour = $THEME->cellheading2;
-//    } else {
-//        $colour = $THEME->cellheading;
-//    }
-    echo "<table width=95% border=0><tr><td>";
+    $colour = $THEME->cellheading2;
 
-    echo "\n<TABLE BORDER=1 CELLSPACING=0 width=100% valign=top cellpadding=10>";
+    echo "\n<table border=1 cellspacing=0 width=95% valign=top cellpadding=10>";
 
-    echo "\n<TR>";
-    echo "<TD WIDTH=100% BGCOLOR=\"$colour\">";
+    echo "\n<tr>";
+    echo "<td width=100% bgcolor=\"$colour\">";
     if ($entry->attachment) {
-          $entry->course = $course->id;
-          echo "<table border=0 align=right><tr><td>";
-          echo glossary_print_attachments($entry, "html");
-          echo "</td></tr></table>";
+        $entry->course = $course->id;
+        echo "<table border=0 align=right><tr><td>";
+        echo glossary_print_attachments($entry, "html");
+        echo "</td></tr></table>";
     }
     echo "<b>$entry->concept</b><br>";
     if ($entry) {
-        echo "&nbsp;&nbsp;<FONT SIZE=1>".get_string("lastedited").": ".userdate($entry->timemodified)."</FONT>";
+        echo "&nbsp;&nbsp;<font size=1>".get_string("lastedited").": ".userdate($entry->timemodified)."</font>";
     }
-    echo "</TR>";
+    echo "</tr>";
 
-    echo "\n<TR><TD WIDTH=100% BGCOLOR=\"$THEME->cellcontent\">";
+    echo "\n<tr><td width=100% bgcolor=\"$THEME->cellcontent\">";
     if ($entry) {
-         echo format_text($entry->definition, $entry->format);
+        echo format_text($entry->definition, $entry->format);
 
-         glossary_print_entry_icons($course, $cm, $glossary, $entry,$currentview,$cat);
+        glossary_print_entry_icons($course, $cm, $glossary, $entry, $currentview, $cat);
 
     } else {
-         echo "<center>";
+        echo "<center>";
         print_string("noentry", "glossary");
-         echo "</center>";
+        echo "</center>";
     }
-    echo "</TD></TR>";
+    echo "</td></tr>";
 
-    echo "</TABLE>\n";
-    
-    echo "</td></tr></table>";
+    echo "</table>\n";
 
 }
 
index 23231c0032c7c0a4246303d1d396b13bfa28c804..0ec92f0860776eb1f60213dbd14423c651d396c1 100644 (file)
@@ -1,29 +1,22 @@
 <?PHP  // $Id$
-require_once("lib.php");
 
-function glossary_print_entry_by_format($course, $cm, $glossary, $entry,$currentview="",$cat="") {
+function glossary_print_entry_by_format($course, $cm, $glossary, $entry, $currentview="",$cat="") {
     global $THEME, $CFG, $USER;
 
-//    if ($entry->timemarked < $entry->modified) {
-        $colour = $THEME->cellheading2;
-//    } else {
-//        $colour = $THEME->cellheading;
-//    }
+    $colour = $THEME->cellheading2;
 
     $user = get_record("user", "id", $entry->userid);
-    $strby = get_string("writtenby","glossary");
+    $strby = get_string("writtenby", "glossary");
 
-    echo "<table width=95% border=0><tr><td>";
+    echo "\n<table border=0 width=95% cellspacing=0 valign=top cellpadding=3 class=forumpost align=center>";
 
-    echo "\n<TABLE BORDER=1 CELLSPACING=0 valign=top cellpadding=10>";
-
-    echo "\n<TR>";
-    echo "\n<TD ROWSPAN=2 BGCOLOR=\"$colour\" WIDTH=35 VALIGN=TOP>";
+    echo "\n<tr>";
+    echo "\n<td rowspan=2 bgcolor=\"$colour\" width=35 valign=top class=\"forumpostpicture\">";
     if ($entry) {
-          print_user_picture($user->id, $course->id, $user->picture);
+        print_user_picture($user->id, $course->id, $user->picture);
     }
-    echo "</TD>";
-    echo "<TD NOWRAP WIDTH=100% BGCOLOR=\"$THEME->cellheading\">";
+    echo "</td>";
+    echo "<td nowrap width=100% bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
     if ($entry->attachment) {
           $entry->course = $glossary->course;
           echo "<table border=0 align=right><tr><td>";
@@ -31,27 +24,26 @@ function glossary_print_entry_by_format($course, $cm, $glossary, $entry,$current
           echo "</td></tr></table>";
     }
     if ($entry) {
-            echo "<b>$entry->concept</b><br><FONT SIZE=2>$strby $user->firstname $user->lastname</font>";
-          echo "&nbsp;&nbsp;<FONT SIZE=1>(".get_string("lastedited").": ".userdate($entry->timemodified).")</FONT></small>";
+        echo "<b>$entry->concept</b><br />";
+        echo "<font size=\"2\">$strby $user->firstname $user->lastname</font>";
+        echo "&nbsp;&nbsp;<font size=1>(".get_string("lastedited").": ".
+             userdate($entry->timemodified).")</font>";
     }
-    echo "</TR>";
+    echo "</tr>";
 
-    echo "\n<TR><TD WIDTH=100% BGCOLOR=\"$THEME->cellcontent\">";
+    echo "\n<tr><td width=100% bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
     if ($entry) {
-         echo format_text($entry->definition, $entry->format);
-
-         glossary_print_entry_icons($course, $cm, $glossary, $entry,$currentview,$cat);
+        echo format_text($entry->definition, $entry->format);
+        glossary_print_entry_icons($course, $cm, $glossary, $entry,$currentview,$cat);
 
     } else {
-         echo "<center>";
+        echo "<center>";
         print_string("noentry", "glossary");
-         echo "</center>";
+        echo "</center>";
     }
-    echo "</TD></TR>";
-
-    echo "</TABLE>\n";
+    echo "</td></tr>";
 
-    echo "</td></tr></table>";
+    echo "</table>\n";
 }
 
 ?>
index e836313700f7df517c80097632ed3d8f97f92502..75f7f82c47ffb96bc4c5deadd385393e7f29fe4a 100644 (file)
@@ -1,5 +1,4 @@
 <?PHP  // $Id$
-require_once("lib.php");
 
 function glossary_print_entry_by_format($course, $cm, $glossary, $entry, $currentview="",$cat="") {
     global $THEME, $CFG, $USER;
@@ -21,7 +20,8 @@ function glossary_print_entry_by_format($course, $cm, $glossary, $entry, $curren
     if ($entry) {
         echo "<b>$entry->concept</b><br />";
         echo "<font size=\"2\">$strby $user->firstname $user->lastname</font>";
-        echo "&nbsp;&nbsp;<font size=1>(".get_string("lastedited").": ".userdate($entry->timemodified).")</font></small>";
+        echo "&nbsp;&nbsp;<font size=1>(".get_string("lastedited").": ".
+             userdate($entry->timemodified).")</font>";
     }
     echo "</tr>";
 
@@ -38,14 +38,14 @@ function glossary_print_entry_by_format($course, $cm, $glossary, $entry, $curren
             echo glossary_print_attachments($entry);
             echo "</td></tr></table>";
         }
-         echo format_text($entry->definition, $entry->format);
+        echo format_text($entry->definition, $entry->format);
 
-         glossary_print_entry_icons($course, $cm, $glossary, $entry,$currentview,$cat);
+        glossary_print_entry_icons($course, $cm, $glossary, $entry,$currentview,$cat);
 
     } else {
-         echo "<center>";
+        echo "<center>";
         print_string("noentry", "glossary");
-         echo "</center>";
+        echo "</center>";
     }
     echo "</td></tr>";