]> git.mjollnir.org Git - moodle.git/commitdiff
Modified pending formats to be more structured. No visual changes.
authorstronk7 <stronk7>
Mon, 2 Aug 2004 18:22:47 +0000 (18:22 +0000)
committerstronk7 <stronk7>
Mon, 2 Aug 2004 18:22:47 +0000 (18:22 +0000)
mod/glossary/formats/encyclopedia/encyclopedia_format.php
mod/glossary/formats/faq/faq_format.php
mod/glossary/formats/fullwithauthor/fullwithauthor_format.php
mod/glossary/formats/fullwithoutauthor/fullwithoutauthor_format.php

index 035bc6ec07af47e8ca6ed0ba09614f9aff93088c..850f385d82e1e41536d7b7bf3695728dc619d11c 100644 (file)
@@ -15,20 +15,27 @@ function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode
     $return = false;
     if ($entry) {
         print_user_picture($user->id, $course->id, $user->picture);
+    
         echo "</td>";
-        echo "<td align=\"top\" width=100% bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
-        glossary_print_entry_approval($cm, $entry, $mode);
+        echo "<td valign=\"top\" width=100% bgcolor=\"$THEME->cellheading\" class=\"forumpostheader\">";
         echo "<b>";
         glossary_print_entry_concept($entry);
-               echo "</b><br />";
+        echo "</b><br />";
+    
         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);
+        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% align=\"top\" bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
+        echo "\n<td width=100% colspan=\"2\" bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
 
         if ($entry->attachment) {
             $entry->course = $course->id;
@@ -37,14 +44,12 @@ function glossary_show_entry_encyclopedia($course, $cm, $glossary, $entry, $mode
             } else {
                 $align = "left";
             }
-            glossary_print_entry_attachment($entry,"",$align);
+            glossary_print_entry_attachment($entry,"",$align,false);
         }
         glossary_print_entry_definition($entry);
 
-        glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons);
+        $return = 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 ee2c52b6ec7f9a33bf06c06119b410adef5bcbfc..87ac0dd6214ea5cfa45ccb7da33d38e2f4880b70 100644 (file)
@@ -6,25 +6,35 @@ function glossary_show_entry_faq($course, $cm, $glossary, $entry, $mode="",$hook
     if ( $entry ) {
         $colour = $THEME->cellheading2;
 
-        echo '<br /><table border=0 cellspacing=0 width=95% valign=top cellpadding=10 class=forumpost>';
+        echo "\n<br /><table border=0 width=95% cellspacing=0 valign=top cellpadding=3 class=forumpost align=center>";
 
         echo '<tr>';
-        echo "<td width=100% bgcolor=\"$colour\">";
+        echo "<td valign=\"top\" width=100% bgcolor=\"$colour\">";
         $entry->course = $course->id;
+
+        echo '<b>' . get_string("question","glossary") . ':</b> ';
+        glossary_print_entry_concept($entry);
+        echo '<br />';
+
+        echo "<font size=1>(".get_string("lastedited").": ".
+             userdate($entry->timemodified).")</font>";
+        echo "</td>";
+        echo "\n<td bgcolor=\"$colour\" width=35 valign=top class=\"forumpostheader\">";
+
         glossary_print_entry_approval($cm, $entry, $mode);
         glossary_print_entry_attachment($entry,"html","right");
+        echo "</td>";
 
-        echo '<b>' . get_string("question","glossary") . ':</b> ';
-        glossary_print_entry_concept($entry) . '<br>';
-        echo '&nbsp;&nbsp;<font size=1>' . get_string("lastedited").': '.userdate($entry->timemodified) . '</font></tr>';
-        echo "<tr><td width=100% bgcolor=\"$THEME->cellcontent\">";            
+        echo "</tr>";
+
+        echo "\n<tr>";
+        echo "\n<td width=100% colspan=\"2\" bgcolor=\"$THEME->cellcontent\" class=\"forumpostmessage\">";
         echo '<b>' . get_string("answer","glossary") . ':</b> ';
+
         glossary_print_entry_definition($entry);
 
 
-        glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook,$printicons);
-        echo ' ';
-        $return = glossary_print_entry_ratings($course, $entry, $ratings);
+        $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry, $mode, $hook,$printicons,$ratings);
         echo '</td></tr></table>';
 
     } else {
index 8323a9b961395cae33ac7595f22d52fccbcb4a6c..225e27dfa8ba6c419990eb372a35f88c304d11ce 100644 (file)
@@ -40,7 +40,7 @@ function glossary_show_entry_fullwithauthor($course, $cm, $glossary, $entry, $mo
         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,$ratings);
+        $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons,$ratings);
         echo ' ';
     } else {
         echo "<center>";
index c9f8ed7121dc11a80283dc9236609d3be10712a4..492e77493602520e60d6d026d2082e357bdc2870 100644 (file)
@@ -5,9 +5,6 @@ function glossary_show_entry_fullwithoutauthor($course, $cm, $glossary, $entry,
 
     $colour = $THEME->cellheading2;
 
-    $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>";
@@ -35,7 +32,7 @@ function glossary_show_entry_fullwithoutauthor($course, $cm, $glossary, $entry,
         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,$ratings);
+        $return = glossary_print_entry_lower_section($course, $cm, $glossary, $entry,$mode,$hook,$printicons,$ratings);
         echo ' ';
     } else {
         echo "<center>";