changed git call from https to git readonly
[atutor.git] / mods / plog / module.php
1 <?php\r
2 /*\r
3 This is the main pLog blog module file for ATutor. See the README_ATUTOR_MODULE for\r
4 documentation\r
5 */\r
6 \r
7 /*******\r
8  * doesn't allow this file to be loaded with a browser.\r
9  */\r
10 if (!defined('AT_INCLUDE_PATH')) { exit; }\r
11 \r
12 /******\r
13  * this file must only be included within a Module obj\r
14  */\r
15 if (!isset($this) || (isset($this) && (strtolower(get_class($this)) != 'module'))) { exit(__FILE__ . ' is not a Module'); }\r
16 \r
17 /*******\r
18  * assign the instructor and admin privileges to the constants.\r
19  */\r
20 define('AT_PRIV_PLOG',       $this->getPrivilege());\r
21 define('AT_ADMIN_PRIV_PLOG', $this->getAdminPrivilege());\r
22 \r
23 /*******\r
24  * create a side menu box/stack.\r
25  */\r
26 $this->_stacks['plog'] = array('title_var'=>'plog', 'file'=>dirname(__FILE__).'/side_menu.inc.php');\r
27 // ** possible alternative: **\r
28 // $this->addStack('hello_world', array('title_var' => 'hello_world', 'file' => './side_menu.inc.php');\r
29 \r
30 /*******\r
31  * if this module is to be made available to students on the Home or Main Navigation.\r
32  */\r
33 \r
34 $_student_tool = 'mods/plog/index.php';\r
35 \r
36 // ** possible alternative: **\r
37 // $this->addTool('./index.php');\r
38 \r
39 /*******\r
40  * add the admin pages when needed.\r
41  */\r
42 if (admin_authenticate(AT_ADMIN_PRIV_PLOG, TRUE) || admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) {\r
43         $this->_pages[AT_NAV_ADMIN] = array('mods/plog/index_admin.php');\r
44         $this->_pages['mods/plog/index_admin.php']['parent']    = AT_NAV_ADMIN;\r
45         $this->_pages['mods/plog/index_admin.php']['title_var'] = 'plog';\r
46         $this->_pages['mods/plog/admin_plog.php']['title_var'] = 'plog_admin';\r
47         $this->_pages['mods/plog/index_admin.php']['children'] = array('mods/plog/admin_plog.php');\r
48         $this->_pages['mods/plog/admin_plog.php']['parent']    = 'mods/plog/index_admin.php';\r
49 \r
50 }\r
51 \r
52 /*******\r
53  * instructor Manage section:\r
54  */\r
55 $this->_pages['mods/plog/index_instructor.php']['title_var'] = 'plog';\r
56 $this->_pages['mods/plog/index_instructor.php']['parent']   = 'tools/index.php';\r
57 \r
58 // Instructor and student plogs are the same, so grant access to sync dabatases only if the user is the course instructor.\r
59 /*\r
60 if($_SESSION['is_admin']){\r
61         $this->_pages['mods/plog/sync_plog.php']['title_var'] = 'plog_sync_dbs';\r
62         $this->_pages['mods/plog/index_instructor.php']['children'] = array('mods/plog/sync_plog.php');\r
63         $this->_pages['mods/plog/sync_plog.php']['parent']    = 'mods/plog/index_instructor.php';\r
64 }*/\r
65 // ** possible alternative: **\r
66 // $this->pages['./index_instructor.php']['title_var'] = 'hello_world';\r
67 // $this->pages['./index_instructor.php']['parent']    = 'tools/index.php';\r
68 \r
69 /*******\r
70  * student page.\r
71  */\r
72 $this->_pages['mods/plog/index.php']['title_var'] = 'plog';\r
73 $this->_pages['mods/plog/index.php']['img']       = 'mods/plog/plog_logo.gif';\r
74 \r
75 // If pLog was installed with something other than the default database table prefix "plog_"\r
76 // adjust this setting below\r
77 define('PLOG_PREFIX', "lt_");\r
78 \r
79 \r
80 \r
81 ?>