]> git.mjollnir.org Git - moodle.git/commitdiff
More glossary formats checked and slighty modified...
authorstronk7 <stronk7>
Sun, 1 Aug 2004 00:16:17 +0000 (00:16 +0000)
committerstronk7 <stronk7>
Sun, 1 Aug 2004 00:16:17 +0000 (00:16 +0000)
mod/glossary/formats/continuous/continuous_format.php
mod/glossary/formats/fullwithauthor/fullwithauthor_format.php
mod/glossary/formats/fullwithoutauthor/fullwithoutauthor_format.php

index e3b75f4134947685325dc28d6e5b10cf9e2745ae..9627176e10e81ab10bca393cddf7ea7a564cb4d1 100644 (file)
@@ -4,31 +4,24 @@ function glossary_show_entry_continuous($course, $cm, $glossary, $entry, $mode="
 
     global $THEME, $USER;
 
-    $return = false;
-    if ($entry) {
-        glossary_print_entry_approval($cm, $entry, $mode);
-        glossary_print_entry_attachment($entry,"html","right");
-        glossary_print_entry_concept($entry);
-        echo ": ";
+    $colour = $THEME->cellheading2;
+
+    echo "\n<table border=0 width=95% cellspacing=0 valign=top cellpadding=0 align=center>\n";
+    echo "<tr>\n";
+    echo "<td width=\"100%\" valign=\"top\"\n";
+    glossary_print_entry_approval($cm, $entry, $mode);
+    glossary_print_entry_attachment($entry,"html","right");
+    echo "<b>";
+    glossary_print_entry_concept($entry);
+    echo ":</b> ";
+    glossary_print_entry_definition($entry);
+    $entry->alias = "";
+    $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons,$ratings,false);
+    echo "</td>\n";
+    echo "</tr>\n";
+    echo "</table>\n";
 
-        glossary_print_entry_definition($entry);
-
-        $icons = '';
-        if ( $printicons ) {
-            $icons = glossary_print_entry_icons($course, $cm, $glossary, $entry, $mode, $hook,"html");
-        }
-
-        echo '(';
-        if ( $icons ) {
-            echo $icons;
-        }
-        $return = glossary_print_entry_ratings($course, $entry, $ratings);
-
-        echo ')<br>';
-
-    }
     return $return;
-
 }
 
 ?>
index a1cfc48f9501b71b985f068ef373c4e07687ee76..8323a9b961395cae33ac7595f22d52fccbcb4a6c 100644 (file)
@@ -19,9 +19,6 @@ function glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mo
         echo "</td>";
         echo "<td valign=\"top\" width=100% bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
 
-        glossary_print_entry_approval($cm, $entry, $mode);
-        glossary_print_entry_attachment($entry,"html","right");
-
         echo "<b>";
         glossary_print_entry_concept($entry);
                echo "</b><br />";
@@ -29,17 +26,22 @@ function glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mo
         echo "<font size=\"2\">$strby " . fullname($user, isteacher($course->id)) . "</font>";
         echo "&nbsp;&nbsp;<font size=1>(".get_string("lastedited").": ".
              userdate($entry->timemodified).")</font>";
+        echo "</td>";
+        echo "\n<td bgcolor=\"$THEME->cellheading\" width=35 valign=top class=\"forumpostheader\">";
+
+        glossary_print_entry_approval($cm, $entry, $mode);
+        glossary_print_entry_attachment($entry,"html","right");
+        echo "</td>";
+
         echo "</tr>";
 
         echo "\n<tr>";
         echo "\n<td bgcolor=\"$colour\" width=35 valign=top class=\"forumpostside\">&nbsp;</td>";
-        echo "\n<td width=100% bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
+        echo "\n<td width=100% colspan=\"2\" bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
 
         glossary_print_entry_definition($entry);
-        glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons);
+        glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons,$ratings);
         echo ' ';
-        $return = glossary_print_entry_ratings($course, $entry, $ratings);
-
     } else {
         echo "<center>";
         print_string("noentry", "glossary");
index 903f4f04fbfd634ee320b5885b97c5d8fd9ecfe0..c9f8ed7121dc11a80283dc9236609d3be10712a4 100644 (file)
@@ -1,29 +1,42 @@
 <?PHP  // $Id$
 
 function glossary_show_entry_fullwithoutauthor($course, $cm, $glossary, $entry, $mode="",$hook="",$printicons=1,$ratings=NULL) {
-    global $THEME, $USER;
+    global $THEME, $CFG, $USER;
 
     $colour = $THEME->cellheading2;
-    $return = false;
+
+    $user = get_record("user", "id", $entry->userid);
+    $strby = get_string("writtenby", "glossary");
 
     echo "\n<br /><table border=0 width=95% cellspacing=0 valign=top cellpadding=3 class=forumpost align=center>";
 
     echo "\n<tr>";
-    echo "<td width=100% bgcolor=\"$THEME->cellheading\">";
-    glossary_print_entry_approval($cm, $entry, $mode);
+    $return = false;
     if ($entry) {
-        glossary_print_entry_attachment($entry,"html","right");
+
+        echo "<td valign=\"top\" width=100% bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
+
         echo "<b>";
         glossary_print_entry_concept($entry);
-        echo "</b><br />";
-        echo "<font size=1>".get_string("lastedited").": ".userdate($entry->timemodified)."</font>";
+               echo "</b><br />";
+
+        echo "<font size=1>(".get_string("lastedited").": ".
+             userdate($entry->timemodified).")</font>";
+        echo "</td>";
+        echo "\n<td bgcolor=\"$THEME->cellheading\" width=35 valign=top class=\"forumpostheader\">";
+
+        glossary_print_entry_approval($cm, $entry, $mode);
+        glossary_print_entry_attachment($entry,"html","right");
+        echo "</td>";
+
         echo "</tr>";
-        echo "\n<tr><td width=100% bgcolor=\"$THEME->cellcontent\">";
-               
+
+        echo "\n<tr>";
+        echo "\n<td width=100% colspan=\"2\" bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
+
         glossary_print_entry_definition($entry);
-        glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook,$printicons);
+        glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons,$ratings);
         echo ' ';
-        $return = glossary_print_entry_ratings($course, $entry, $ratings);
     } else {
         echo "<center>";
         print_string("noentry", "glossary");