2 /****************************************************************/
\r
4 /****************************************************************/
\r
5 /* Copyright (c) 2002-2010 */
\r
6 /* Inclusive Design Institute */
\r
7 /* http://atutor.ca */
\r
9 /* This program is free software. You can redistribute it and/or*/
\r
10 /* modify it under the terms of the GNU General Public License */
\r
11 /* as published by the Free Software Foundation. */
\r
12 /****************************************************************/
\r
15 define('AT_INCLUDE_PATH', '../../../include/');
\r
16 require(AT_INCLUDE_PATH.'vitals.inc.php');
\r
18 require(AT_INCLUDE_PATH.'header.inc.php');
\r
20 if (!$_SESSION['groups']) {
\r
21 $msg->printErrors('NOT_IN_ANY_GROUPS');
\r
22 require(AT_INCLUDE_PATH.'footer.inc.php');
\r
25 $group_list = implode(',', $_SESSION['groups']);
\r
26 $sql = "SELECT group_id, title, modules FROM ".TABLE_PREFIX."groups WHERE group_id IN ($group_list) ORDER BY title";
\r
27 $result = mysql_query($sql, $db);
\r
29 echo '<ol id="tools">';
\r
31 while ($row = mysql_fetch_assoc($result)) {
\r
32 echo '<li class="top-tool">'.AT_print($row['title'], 'groups.title') . ' ';
\r
34 $modules = explode('|', $row['modules']);
\r
38 echo '<ul class="child-top-tool">';
\r
39 foreach ($modules as $module_name) {
\r
40 $fn = basename($module_name) . '_get_group_url';
\r
41 $module =& $moduleFactory->getModule($module_name);
\r
42 if ($module->isEnabled() && function_exists($fn)) {
\r
43 echo '<li class="child-tool"><a href="'. url_rewrite($fn($row['group_id'])) .'">'._AT($_pages[$module->getGroupTool()]['title_var']).'</a></li>';
\r
52 require(AT_INCLUDE_PATH.'footer.inc.php');
\r