]> git.mjollnir.org Git - moodle.git/commitdiff
Minor formatting tweaks
authormartin <martin>
Tue, 25 Jun 2002 16:42:34 +0000 (16:42 +0000)
committermartin <martin>
Tue, 25 Jun 2002 16:42:34 +0000 (16:42 +0000)
course/view.php
mod/choice/index.php
mod/survey/index.php

index b21293dc10fa30c8423141591d7834621a1269c1..766a52aa88d8a6ceb3735b6469b32bd5b594d4a8 100644 (file)
@@ -95,7 +95,7 @@ function print_side_block($heading="", $list=NULL, $footer="", $icons=NULL) {
             } else {
                 echo "";
             }
-            echo "</TD>\n<TD WIDTH=100%>";
+            echo "</TD>\n<TD WIDTH=100% VALIGN=top>";
             echo "<P><FONT SIZE=2>$string</FONT></P>";
             echo "</TD></TR>\n";
         }
index 65ea50687689e5d0d4f932a39c9eacc65deed815..56cf165d8728af503132fc4a22a4ceaaf395582f 100644 (file)
 
     $timenow = time();
 
-    $table->head  = array ("Week", "Question", "Answer");
-    $table->align = array ("CENTER", "LEFT", "CENTER");
+    if ($course->format == "weeks") {
+        $table->head  = array ("Week", "Question", "Answer");
+        $table->align = array ("CENTER", "LEFT", "LEFT");
+    } else if ($course->format == "topics") {
+        $table->head  = array ("Topic", "Question", "Answer");
+        $table->align = array ("CENTER", "LEFT", "LEFT");
+    } else {
+        $table->head  = array ("Question", "Answer");
+        $table->align = array ("LEFT", "LEFT");
+    }
 
     foreach ($choices as $choice) {
         $answer = $answers[$choice->id];
                 break;
         }
 
-        $table->data[] = array ("<P>$choice->section</P>",
-                                "<P><A HREF=\"view.php?id=$choice->coursemodule\">$choice->name</A></P>",
-                                "<P>$aa</P>");
+        if ($course->format == "weeks" || $course->format == "topics") {
+            $table->data[] = array ("$choice->section",
+                                    "<A HREF=\"view.php?id=$choice->coursemodule\">$choice->name</A>",
+                                    "$aa");
+        } else {
+            $table->data[] = array ("<A HREF=\"view.php?id=$choice->coursemodule\">$choice->name</A>",
+                                    "$aa");
+        }
     }
     print_table($table);
 
index 42e95218a22330d5f4447172162042811fb105a1..71f4d6d186c9def9a9902d0bb187cea32cdbfa1a 100644 (file)
         notice("There are no surveys.", "../../course/view.php?id=$course->id");
     }
     
-    $table->head  = array ("Week", "Name", "Status");
-    $table->align = array ("CENTER", "LEFT", "LEFT");
+    if ($course->format == "weeks") {
+        $table->head  = array ("Week", "Name", "Status");
+        $table->align = array ("CENTER", "LEFT", "LEFT");
+    } else if ($course->format == "topics") {
+        $table->head  = array ("Topic", "Name", "Status");
+        $table->align = array ("CENTER", "LEFT", "LEFT");
+    } else {
+        $table->head  = array ("Name", "Status");
+        $table->align = array ("LEFT", "LEFT");
+    }
 
     foreach ($surveys as $survey) {
         if (survey_already_done($survey->id, $USER->id)) {
         } else {
             $ss = "<A HREF=\"view.php?id=$survey->coursemodule\">Not done yet</A>";
         }
-        $table->data[] = array ("$survey->section", 
-                                "<A HREF=\"view.php?id=$survey->coursemodule\">$survey->name</A>",
-                                "$ss");
+        if ($course->format == "weeks" or $course->format == "topics") {
+            $table->data[] = array ("$survey->section", 
+                                    "<A HREF=\"view.php?id=$survey->coursemodule\">$survey->name</A>",
+                                    "$ss");
+        } else {
+            $table->data[] = array ("<A HREF=\"view.php?id=$survey->coursemodule\">$survey->name</A>",
+                                    "$ss");
+        }
     }
 
     print_table($table);