Skip to content

Commit

Permalink
Customisable section 0 on social forum
Browse files Browse the repository at this point in the history
  • Loading branch information
martin committed Aug 3, 2002
1 parent 23d19b0 commit 97898ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
21 changes: 8 additions & 13 deletions course/social.php
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
1 change: 1 addition & 0 deletions course/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -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":
Expand Down

0 comments on commit 97898ac

Please sign in to comment.