// $Id$ // social.php - course format featuring social forum // included from view.php require_once("$CFG->dirroot/mod/forum/lib.php"); require_once("$CFG->dirroot/mod/resource/lib.php"); $leftwidth = 210; ?>
$moddata[]="id\">".get_string("participants")."";
$modicon[]="";
$editmyprofile = "firstname $USER->lastname\" href=\"../user/edit.php?id=$USER->id&course=$course->id\">".
get_string("editmyprofile")."";
if ($USER->description) {
$moddata[]= $editmyprofile;
} else {
$moddata[]= $editmyprofile." ";
}
$modicon[]="";
print_side_block(get_string("people"), "", $moddata, $modicon, "", $leftwidth);
/// Then, print all the available resources (Section 0)
print_section_block(get_string("activities"), $course, $sections[0],
$mods, $modnames, $modnamesused, true, "100%", isediting($course->id));
/// Print all the recent activity
// Print all the recent activity
if ($course->showrecent) {
print_side_block_start(get_string("recentactivity"), $leftwidth, "sideblockrecentactivity");
print_recent_activity($course);
print_side_block_end();
}
/// Print a form to search forums
$searchform = forum_print_search_form($course, "", true);
$searchform = " $searchform ";
print_side_block(get_string("search","forum"), $searchform, "", "", "", $leftwidth);
/// Admin links and controls
print_course_admin_links($course);
echo " | ";
echo "";
if ($social = forum_get_course_forum($course->id, "social")) {
if (forum_is_subscribed($USER->id, $social->id)) {
$subtext = get_string("unsubscribe", "forum");
} else {
$subtext = get_string("subscribe", "forum");
}
$headertext = "
"; forum_print_latest_discussions($social->id, 10, "plain", "", false); } else { notify("Could not find or create a social forum here"); } ?> |