remove old readme
[atutor.git] / docs / tools / index.php
1 <?php
2 /****************************************************************/
3 /* ATutor                                                                                                               */
4 /****************************************************************/
5 /* Copyright (c) 2002-2010                                      */
6 /* Inclusive Design Institute                                   */
7 /* http://atutor.ca                                                                                             */
8 /*                                                              */
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 /****************************************************************/
13 // $Id$
14
15 define('AT_INCLUDE_PATH', '../include/');
16 require(AT_INCLUDE_PATH.'vitals.inc.php');
17
18 require(AT_INCLUDE_PATH.'header.inc.php');
19
20 $module_list = $moduleFactory->getModules(AT_MODULE_STATUS_ENABLED, 0, TRUE);
21 $keys = array_keys($module_list);
22
23 echo '<ol id="tools">';
24 foreach ($keys as $module_name) {
25         $module = $module_list[$module_name];
26         if ($module->getPrivilege() && authenticate($module->getPrivilege(), AT_PRIV_RETURN) && ($parent = $module->getChildPage('tools/index.php')) && page_available($parent)) {
27                 echo '<li class="top-tool"><a href="' . $parent . '">' . $module->getName() . '</a>  ';
28                 if (isset($_pages[$parent]['children'])) {
29                         echo '<ul class="child-top-tool">';
30                         foreach ($_pages[$parent]['children'] as $child) {
31                                 if (page_available($child)) {
32                                         echo '<li class="child-tool"><a href="'.$child.'">'._AT($_pages[$child]['title_var']).'</a></li>';
33                                 }
34                         }
35                         echo '</ul>';
36                 }
37                 echo '</li>';
38         }
39 }
40 echo '</ol>';
41
42 require(AT_INCLUDE_PATH.'footer.inc.php');
43 ?>