3 This is the main pLog blog module file for ATutor. See the README_ATUTOR_MODULE for
\r
8 * doesn't allow this file to be loaded with a browser.
\r
10 if (!defined('AT_INCLUDE_PATH')) { exit; }
\r
13 * this file must only be included within a Module obj
\r
15 if (!isset($this) || (isset($this) && (strtolower(get_class($this)) != 'module'))) { exit(__FILE__ . ' is not a Module'); }
\r
18 * assign the instructor and admin privileges to the constants.
\r
20 define('AT_PRIV_PLOG', $this->getPrivilege());
\r
21 define('AT_ADMIN_PRIV_PLOG', $this->getAdminPrivilege());
\r
24 * create a side menu box/stack.
\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
31 * if this module is to be made available to students on the Home or Main Navigation.
\r
34 $_student_tool = 'mods/plog/index.php';
\r
36 // ** possible alternative: **
\r
37 // $this->addTool('./index.php');
\r
40 * add the admin pages when needed.
\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
53 * instructor Manage section:
\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
58 // Instructor and student plogs are the same, so grant access to sync dabatases only if the user is the course instructor.
\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
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
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
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