]> git.mjollnir.org Git - moodle.git/commitdiff
Customisable section 0 on social forum
authormartin <martin>
Sat, 3 Aug 2002 11:58:40 +0000 (11:58 +0000)
committermartin <martin>
Sat, 3 Aug 2002 11:58:40 +0000 (11:58 +0000)
course/social.php
course/view.php

index 590eb9c3d6219dbd61e86839b847ad360d3829c0..c2c92211b8bcc2330a8d58a509a3e97cfb428ffb 100644 (file)
       print_side_block("", $moddata, "", $modicon);
       
 
-      // Then, print all the available readings
-
+      // Then, print all the available resources (Section 0)
       print_simple_box("Resources", $align="CENTER", $width="100%", $color="$THEME->cellheading");
+      print_section($site->id, $sections[0], $mods, $modnamesused, true);
 
-      if ($readings = reading_list_all_readings($course->id, "timemodified DESC", 0, true)) {
-          foreach ($readings as $reading) {
-              $readingdata[] = $reading;
-              $readingicon[] = "<IMG SRC=\"../mod/reading/icon.gif\" HEIGHT=16 WIDTH=16 ALT=\"Reading\">";
-          }
-      }
-      if (isediting($course->id)) {
-          $readingdata[] = "<A HREF=\"mod.php?id=$course->id&section=0&add=reading\">Add reading...</A>";
-          $readingicon[] = "&nbsp;";
-      }
-      print_side_block("", $readingdata, "", $readingicon);
+      if (isediting($site->id)) {
+          echo "<DIV ALIGN=right>";
+          popup_form("$CFG->wwwroot/course/mod.php?id=$course->id&section=0&add=",
+                      $modnames, "section0", "", "Add...");
+          echo "</DIV>";
+      }      
 
       // Print all the recent activity
       print_simple_box("Recent Activity", $align="CENTER", $width="100%", $color="$THEME->cellheading");
index 724da490da846f5bc659347f78f3513e369c37cc..6cbe7bf6bdee2a345f484f079b101f7358021275 100644 (file)
@@ -49,6 +49,7 @@
                   update_course_icon($course->id));
 
     get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused, $modsectioncounts);
+    $sections = get_all_sections($course->id);
 
     switch ($course->format) {
         case "weeks":