6a2322c13056300c51c226748ed8c6bd952c6b85
[atutor.git] / mods / terms_and_conditions / 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_ADMIN_TERMS_AND_CONDITIONS', $this->getAdminPrivilege());\r
16 \r
17 /*******\r
18  * add the admin pages when needed.\r
19  */\r
20 if (admin_authenticate(AT_ADMIN_TERMS_AND_CONDITION, TRUE) || admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) {\r
21          $this->_pages['admin/config_edit.php']['children'][] = 'mods/terms_and_conditions/tac_edit.php';\r
22          $this->_pages['mods/terms_and_conditions/tac_edit.php']['title_var']  = 'terms_and_conditions';\r
23          $this->_pages['mods/terms_and_conditions/tac_edit.php']['parent']       = 'admin/config_edit.php';\r
24 }\r
25 ?>