changed git call from https to git readonly
[atutor.git] / mods / wordpress / module.php
1 <?php
2 /*******
3  * doesn't allow this file to be loaded with a browser.
4  */
5 if (!defined('AT_INCLUDE_PATH')) { exit; }
6
7 /******
8  * this file must only be included within a Module obj
9  */
10 if (!isset($this) || (isset($this) && (strtolower(get_class($this)) != 'module'))) { exit(__FILE__ . ' is not a Module'); }
11
12 /*******
13  * assign the instructor and admin privileges to the constants.
14  */
15 define('AT_PRIV_WORDPRESS',       $this->getPrivilege());
16 define('AT_ADMIN_PRIV_WORDPRESS', $this->getAdminPrivilege());
17
18 /*******
19  * create a side menu box/stack.
20  */
21 //$this->_stacks['wordpress'] = array('title_var'=>'wordpress', 'file'=>'mods/wordpress/side_menu.inc.php');
22 // ** possible alternative: **
23 // $this->addStack('wordpress', array('title_var' => 'wordpress', 'file' => './side_menu.inc.php');
24
25 /*******
26  * create optional sublinks for module "detail view" on course home page
27  * when this line is uncommented, "mods/wordpress/sublinks.php" need to be created to return an array of content to be displayed
28  */
29 $this->_list['wordpress'] = array('title_var'=>'wordpress','file'=>'mods/wordpress/sublinks.php');
30
31 // Uncomment for tiny list bullet icon for module sublinks "icon view" on course home page
32 $this->_pages['mods/wordpress/index.php']['icon']      = 'mods/wordpress/wordpress_icon_sm.png';
33
34 // Uncomment for big icon for module sublinks "detail view" on course home page
35 //$this->_pages['mods/wordpress/index.php']['img']      = 'mods/wordpress/wordpress.jpg';
36
37 // ** possible alternative: **
38 // the text to display on module "detail view" when sublinks are not available
39 $this->_pages['mods/wordpress/index.php']['text']      = _AT('wordpress_text');
40
41 /*******
42  * if this module is to be made available to students on the Home or Main Navigation.
43  */
44 $_group_tool = $_student_tool = 'mods/wordpress/index.php';
45
46 /*******
47  * add the admin pages when needed.
48  */
49 if (admin_authenticate(AT_ADMIN_PRIV_WORDPRESS, TRUE) || admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) {
50         $this->_pages[AT_NAV_ADMIN] = array('mods/wordpress/index_admin.php');
51         $this->_pages['mods/wordpress/index_admin.php']['title_var'] = 'wordpress';
52         $this->_pages['mods/wordpress/index_admin.php']['parent']    = AT_NAV_ADMIN;
53 }
54
55 /*******
56  * instructor Manage section:
57  */
58 $this->_pages['mods/wordpress/index_instructor.php']['title_var'] = 'wordpress';
59 $this->_pages['mods/wordpress/index_instructor.php']['parent']   = 'tools/index.php';
60 // ** possible alternative: **
61 // $this->pages['./index_instructor.php']['title_var'] = 'wordpress';
62 // $this->pages['./index_instructor.php']['parent']    = 'tools/index.php';
63
64 /*******
65  * student page.
66  */
67 $this->_pages['mods/wordpress/index.php']['title_var'] = 'wordpress';
68 $this->_pages['mods/wordpress/index.php']['img']       = 'mods/wordpress/wordpress_logo.png';
69
70 /* public pages */
71 //$this->_pages[AT_NAV_PUBLIC] = array('mods/wordpress/index_public.php');
72 //$this->_pages['mods/wordpress/index_public.php']['title_var'] = 'wordpress';
73 //$this->_pages['mods/wordpress/index_public.php']['parent'] = AT_NAV_PUBLIC;
74
75 /* my start page pages */
76 $this->_pages[AT_NAV_START]  = array('mods/wordpress/index_mystart.php');
77 $this->_pages['mods/wordpress/index_mystart.php']['title_var'] = 'wordpress';
78 $this->_pages['mods/wordpress/index_mystart.php']['parent'] = AT_NAV_START;
79
80 function wordpress_get_group_url($group_id) {
81         return 'mods/wordpress/index.php';
82 }
83
84 ?>