, Ghent University * @Copyright Ghent University * @Copyright Patrick Cool * * @package chamilo.forum */ // Including the global initialization file. require_once '../inc/global.inc.php'; $htmlHeadXtra[] = ''; // The section (tabs) $this_section = SECTION_COURSES; // Notification for unauthorized people. api_protect_course_script(true); // Including additional library scripts. $nameTools = get_lang('ToolForum'); // Including necessary files require 'forumconfig.inc.php'; require_once 'forumfunction.inc.php'; // Are we in a lp ? $origin = ''; if (isset($_GET['origin'])) { $origin = Security::remove_XSS($_GET['origin']); } /* Header and Breadcrumbs */ $gradebook = null; if (isset($_SESSION['gradebook'])) { $gradebook= $_SESSION['gradebook']; } if (!empty($gradebook) && $gradebook == 'view') { $interbreadcrumb[] = array ( 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('ToolGradebook') ); } $sessionId = api_get_session_id(); $current_forum_category = get_forum_categories($_GET['forumcategory']); $interbreadcrumb[] = array( 'url' => 'index.php?gradebook=' . $gradebook . '&search=' . Security::remove_XSS(urlencode(isset($_GET['search']) ? $_GET['search'] : '')), 'name' => get_lang('Forum') ); if (!empty($_GET['action']) && !empty($_GET['content'])) { if ($_GET['action']=='add' && $_GET['content']=='forum' ) { $interbreadcrumb[] = array( 'url' => 'viewforumcategory.php?forumcategory=' . $current_forum_category['cat_id'] . '&origin=' . $origin, 'name' => $current_forum_category['cat_title'] ); $interbreadcrumb[] = array( 'url' =>'#', 'name' => get_lang('AddForum') ); } } else { $interbreadcrumb[] = array( 'url' => '#', 'name' => $current_forum_category['cat_title'] ); } if ($origin=='learnpath') { Display::display_reduced_header(); } else { Display::display_header(null); } /* ACTIONS */ $whatsnew_post_info = isset($_SESSION['whatsnew_post_info']) ? $_SESSION['whatsnew_post_info'] : null; /* Is the user allowed here? */ // if the user is not a course administrator and the forum is hidden // then the user is not allowed here. if ( !api_is_allowed_to_edit(false, true) AND ( $current_forum_category && $current_forum_category['visibility'] == 0) ) { api_not_allowed(); } /* Action Links */ $html = ''; $html .= '
' . $my_number_threads . ' ' . get_lang('ForumThreads') . '