Skip to content
Browse files

Customisable section 0 on social forum

  • Loading branch information...
1 parent 23d19b0 commit 97898ac9c2e4f0641e8f82d04183b862eefa3e1a martin committed
Showing with 9 additions and 13 deletions.
  1. +8 −13 course/social.php
  2. +1 −0 course/view.php
View
21 course/social.php
@@ -23,21 +23,16 @@
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");
View
1 course/view.php
@@ -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":

0 comments on commit 97898ac

Please sign in to comment.
Something went wrong with that request. Please try again.