2 /****************************************************************/
4 /****************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
9 /* This program is free software. You can redistribute it and/or*/
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /****************************************************************/
16 define('AT_INCLUDE_PATH', '../../../include/');
17 require(AT_INCLUDE_PATH.'vitals.inc.php');
18 require(AT_INCLUDE_PATH.'../mods/_standard/forums/lib/forums.inc.php');
19 require(AT_INCLUDE_PATH.'../mods/_standard/student_tools/classes/StudentToolsUtil.class.php');
21 require(AT_INCLUDE_PATH.'header.inc.php');
23 function print_one_menu_item($text) {
25 echo '<img src="images/'.$rtl.'tree/tree_vertline.gif" alt="" class="img-size-tree" />';
26 echo '<img src="images/'.$rtl.'tree/tree_end.gif" alt="" class="img-size-tree" />';
27 echo '<img src="images/'.$rtl.'tree/tree_horizontal.gif" alt="" class="img-size-tree" />';
31 <div id="container" style="padding:2em; width:90%;">
33 echo '<p><a href="index.php">'._AT('home').'</a>';
35 $_current_modules = array_slice($_pages[AT_NAV_COURSE], 1);
36 $_current_modules = array_merge((array) $_current_modules, array_diff($_pages[AT_NAV_HOME],$_pages[AT_NAV_COURSE]));
38 foreach ($_current_modules as $module) {
40 echo '<img src="images/'.$rtl.'tree/tree_split.gif" alt="" class="img-size-tree" /> <a href="'.url_rewrite($module).'">' . _AT($_pages[$module]['title_var']) . '</a>';
42 if (substr($module, -14) == 'forum/list.php') {
43 $forums = get_forums($_SESSION['course_id']);
45 if (is_array($forums)) {
46 foreach ($forums as $state=>$rows) {
48 $num_forums = count($rows);
49 foreach ($rows as $row) {
52 echo '<img src="images/'.$rtl.'tree/tree_vertline.gif" alt="" class="img-size-tree" />';
53 if ($count < $num_forums) {
54 echo '<img src="images/'.$rtl.'tree/tree_split.gif" alt="" class="img-size-tree" />';
56 echo '<img src="images/'.$rtl.'tree/tree_end.gif" alt="" class="img-size-tree" />';
58 echo '<img src="images/'.$rtl.'tree/tree_horizontal.gif" alt="" class="img-size-tree" />';
59 echo ' <a href="'.url_rewrite('mods/_standard/forums/forum/index.php?fid='.$row['forum_id']).'">'.AT_print($row['title'], 'forums.title').'</a>';
63 print_one_menu_item(_AT('no_forums'));
67 // display the turned-on student tools
68 if (substr($module, -23) == 'student_tools/index.php') {
69 $student_tools = StudentToolsUtil::getStudentTools($_SESSION['course_id']);
71 if (count($student_tools) == 0) {
72 print_one_menu_item(_AT("no_student_tools"));
74 foreach (get_home_navigation($student_tools) as $link) {
75 $text = '<a href="'.$link['url'].'">'. $link['title'].'</a>';
76 print_one_menu_item($text);
82 echo '<br /><img src="images/'.$rtl.'tree/tree_split.gif" alt="" class="img-size-tree" /> <a href="'.url_rewrite('search.php').'">'._AT('search').'</a><br />';
83 echo '<img src="images/'.$rtl.'tree/tree_split.gif" alt="" class="img-size-tree" /> <a href="help/">'._AT('help').'</a><br />';
84 echo '<img src="images/'.$rtl.'tree/tree_end.gif" alt="" class="img-size-tree" /> '._AT('content').'<br />';
86 $contentManager->printSiteMapMenu();
93 require(AT_INCLUDE_PATH.'footer.inc.php');