96373bb67d83828e609b5185a75a5129d4198037
[atutor.git] / mods / userplane / module.php
1 <?php\r
2 /*******\r
3  * doesn't allow this file to be loaded with a browser.\r
4  */\r
5 if (!defined('AT_INCLUDE_PATH')) { exit; }\r
6 \r
7 /******\r
8  * this file must only be included within a Module obj\r
9  */\r
10 if (!isset($this) || (isset($this) && (strtolower(get_class($this)) != 'module'))) { exit(__FILE__ . ' is not a Module'); }\r
11 \r
12 /*******\r
13  * assign the instructor and admin privileges to the constants.\r
14  */\r
15 \r
16 define('AT_ADMIN_PRIV_USERPLANE', $this->getAdminPrivilege());\r
17 \r
18 /*******\r
19  * create a side menu box/stack.\r
20  */\r
21 $this->_stacks['userplane'] = array('title_var'=>'userplane', 'file'=>AT_INCLUDE_PATH.'../mods/userplane/side_menu.inc.php');\r
22 \r
23 /*******\r
24  * if this module is to be made available to students on the Home or Main Navigation.\r
25  */\r
26 $_student_tool = 'mods/userplane/index.php';\r
27 \r
28 /*******\r
29  * add the admin page so the Userplane ID can be managed\r
30  */\r
31 \r
32 if (admin_authenticate(AT_ADMIN_PRIV_USERPLANE, TRUE) || admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) {\r
33         $this->_pages[AT_NAV_ADMIN] = array('mods/userplane/index_admin.php');\r
34         $this->_pages['mods/userplane/index_admin.php']['title_var'] = 'userplane';\r
35         $this->_pages['mods/userplane/index_admin.php']['parent']    = AT_NAV_ADMIN;\r
36 }\r
37 \r
38 /*******\r
39  * student page.\r
40  */\r
41 $this->_pages['mods/userplane/index.php']['title_var'] = 'userplane';\r
42 $this->_pages['mods/userplane/index.php']['img']       = 'mods/userplane/userplane.jpg';\r
43 \r
44 // You may use the ATutor community ID (e2405db9bcd4f802ffed98a4d1a15ac3) but you should register your own\r
45 // at http://www.userplane.com/buy/index.cfm\r
46 \r
47 ?>