tagging as ATutor 1.5.4-release
[atutor.git] / mods / hello_world / 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 define('AT_PRIV_HELLO_WORLD',       $this->getPrivilege());\r
16 define('AT_ADMIN_PRIV_HELLO_WORLD', $this->getAdminPrivilege());\r
17 \r
18 /*******\r
19  * create a side menu box/stack.\r
20  */\r
21 $this->_stacks['hello_world'] = array('title_var'=>'hello_world', 'file'=>'mods/hello_world/side_menu.inc.php');\r
22 // ** possible alternative: **\r
23 // $this->addStack('hello_world', array('title_var' => 'hello_world', 'file' => './side_menu.inc.php');\r
24 \r
25 /*******\r
26  * if this module is to be made available to students on the Home or Main Navigation.\r
27  */\r
28 $_student_tool = 'mods/hello_world/index.php';\r
29 // ** possible alternative: **\r
30 // $this->addTool('./index.php');\r
31 \r
32 /*******\r
33  * add the admin pages when needed.\r
34  */\r
35 if (admin_authenticate(AT_ADMIN_PRIV_HELLO_WORLD, TRUE) || admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) {\r
36         $this->_pages[AT_NAV_ADMIN] = array('mods/hello_world/index_admin.php');\r
37         $this->_pages['mods/hello_world/index_admin.php']['title_var'] = 'hello_world';\r
38         $this->_pages['mods/hello_world/index_admin.php']['parent']    = AT_NAV_ADMIN;\r
39 }\r
40 \r
41 /*******\r
42  * instructor Manage section:\r
43  */\r
44 $this->_pages['mods/hello_world/index_instructor.php']['title_var'] = 'hello_world';\r
45 $this->_pages['mods/hello_world/index_instructor.php']['parent']   = 'tools/index.php';\r
46 // ** possible alternative: **\r
47 // $this->pages['./index_instructor.php']['title_var'] = 'hello_world';\r
48 // $this->pages['./index_instructor.php']['parent']    = 'tools/index.php';\r
49 \r
50 /*******\r
51  * student page.\r
52  */\r
53 $this->_pages['mods/hello_world/index.php']['title_var'] = 'hello_world';\r
54 $this->_pages['mods/hello_world/index.php']['img']       = 'mods/hello_world/hello_world.jpg';\r
55 \r
56 \r
57 /* public pages */\r
58 $this->_pages[AT_NAV_PUBLIC] = array('mods/hello_world/index_public.php');\r
59 $this->_pages['mods/hello_world/index_public.php']['title_var'] = 'hello_world';\r
60 $this->_pages['mods/hello_world/index_public.php']['parent'] = AT_NAV_PUBLIC;\r
61 \r
62 /* my start page pages */\r
63 $this->_pages[AT_NAV_START]  = array('mods/hello_world/index_mystart.php');\r
64 $this->_pages['mods/hello_world/index_mystart.php']['title_var'] = 'hello_world';\r
65 $this->_pages['mods/hello_world/index_mystart.php']['parent'] = AT_NAV_START;\r
66 ?>