changed git call from https to git readonly
[atutor.git] / mods / job_board / module.php
1 <?php
2 /***********************************************************************/
3 /* ATutor                                                                                                                          */
4 /***********************************************************************/
5 /* Copyright (c) 2002-2009                                                                                         */
6 /* Adaptive Technology Resource Centre / Inclusive Design Institute        */
7 /* http://atutor.ca                                                                                                        */
8 /*                                                                                                                                         */
9 /* This program is free software. You can redistribute it and/or           */
10 /* modify it under the terms of the GNU General Public License             */
11 /* as published by the Free Software Foundation.                                           */
12 /***********************************************************************/
13 // $Id$
14
15 /*******
16  * doesn't allow this file to be loaded with a browser.
17  */
18 if (!defined('AT_INCLUDE_PATH')) { exit; }
19
20 /*******
21  * add savant variable
22  */
23 global $savant;
24 require(AT_INCLUDE_PATH.'../mods/job_board/include/constants.inc.php'); //load constant file right away.
25 $savant->addPath('template', AT_JB_INCLUDE.'html/');
26
27 /******
28  * this file must only be included within a Module obj
29  */
30 if (!isset($this) || (isset($this) && (strtolower(get_class($this)) != 'module'))) { exit(__FILE__ . ' is not a Module'); }
31
32 /*******
33  * assign the instructor and admin privileges to the constants.
34  */
35 define('AT_PRIV_JOB_BOARD',       $this->getPrivilege());
36 define('AT_ADMIN_PRIV_JOB_BOARD', $this->getAdminPrivilege());
37
38 /*******
39  * create a side menu box/stack.
40  */
41 //$this->_stacks['pa_photo_gallery'] = array('title_var'=>'pa_photo_gallery', 'file'=>AT_PA_BASE.'side_menu.inc.php');
42 // ** possible alternative: **
43 // $this->addStack('social', array('title_var' => 'social', 'file' => './side_menu.inc.php');
44
45 /*******
46  * if this module is to be made available to students on the Home or Main Navigation.
47  */
48 $_group_tool = $_student_tool = AT_JB_BASENAME.'index.php';
49
50 $this->_list['job_board'] = array('title_var'=>'job_board','file'=>AT_JB_BASENAME.'sublinks.php');
51 $this->_pages[AT_JB_BASENAME.'index.php']['icon']      = 'images/pin.png';
52
53 /*******
54  * add the admin pages when needed.
55  */
56  if (admin_authenticate(AT_ADMIN_PRIV_JOB_BOARD, TRUE) || admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) {
57         $this->_pages[AT_NAV_ADMIN] = array(AT_JB_BASENAME.'index_admin.php');
58         $this->_pages[AT_JB_BASENAME.'index_admin.php']['title_var'] = 'job_board';
59         $this->_pages[AT_JB_BASENAME.'index_admin.php']['parent']    = AT_NAV_ADMIN;
60         $this->_pages[AT_JB_BASENAME.'index_admin.php']['children']    = array(AT_JB_BASENAME.'admin/preferences.php', AT_JB_BASENAME.'admin/categories.php', AT_JB_BASENAME.'admin/employers.php');
61                 $this->_pages[AT_JB_BASENAME.'admin/preferences.php']['title_var'] = 'jb_preferences';
62                 $this->_pages[AT_JB_BASENAME.'admin/preferences.php']['parent'] = AT_JB_BASENAME.'index_admin.php';
63                 $this->_pages[AT_JB_BASENAME.'admin/categories.php']['title_var'] = 'jb_categories';
64                 $this->_pages[AT_JB_BASENAME.'admin/categories.php']['parent'] = AT_JB_BASENAME.'index_admin.php';
65                 $this->_pages[AT_JB_BASENAME.'admin/employers.php']['title_var'] = 'jb_employers';
66                 $this->_pages[AT_JB_BASENAME.'admin/employers.php']['parent'] = AT_JB_BASENAME.'index_admin.php';
67                 $this->_pages[AT_JB_BASENAME.'admin/view_post.php']['title_var'] = 'jb_view_post';
68                 $this->_pages[AT_JB_BASENAME.'admin/view_post.php']['parent'] = AT_JB_BASENAME.'index_admin.php';
69                 $this->_pages[AT_JB_BASENAME.'admin/edit_post.php']['title_var'] = 'jb_edit_post';
70                 $this->_pages[AT_JB_BASENAME.'admin/edit_post.php']['parent'] = AT_JB_BASENAME.'index_admin.php';
71                 $this->_pages[AT_JB_BASENAME.'admin/edit_employer.php']['title_var'] = 'jb_edit_employer';
72                 $this->_pages[AT_JB_BASENAME.'admin/edit_employer.php']['parent'] = AT_JB_BASENAME.'admin/employers.php';
73 }
74
75 /*******
76  * instructor Manage section:
77  */
78 //$this->_pages[AT_JB_BASENAME.'index_instructor.php']['title_var'] = 'social';
79 //$this->_pages[AT_JB_BASENAME.'index_instructor.php']['parent']   = 'tools/index.php';
80
81 // ** possible alternative: **
82 // $this->pages['./index_instructor.php']['title_var'] = 'social';
83 // $this->pages['./index_instructor.php']['parent']    = 'tools/index.php';
84
85 /*******
86  * student page.
87  */
88 $this->_pages[AT_JB_BASENAME.'index.php']['title_var'] = 'job_board';
89 $this->_pages[AT_JB_BASENAME.'index.php']['img']       = AT_JB_BASENAME.'images/jb_icon.png';
90 //$this->_pages[AT_JB_BASENAME.'index.php']['children'] = array(AT_JB_BASENAME.'view_post.php');
91 $this->_pages[AT_JB_BASENAME.'employer/login.php']['title_var'] = 'jb_employer_login';
92 $this->_pages[AT_JB_BASENAME.'employer/login.php']['parent'] = AT_JB_BASENAME.'index.php';
93 $this->_pages[AT_JB_BASENAME.'employer/registration.php']['title_var'] = 'jb_employer_registration';
94 $this->_pages[AT_JB_BASENAME.'employer/registration.php']['parent'] = AT_JB_BASENAME.'index.php';
95 $this->_pages[AT_JB_BASENAME.'employer/password_reminder.php']['title_var'] = 'password_reminder';
96 $this->_pages[AT_JB_BASENAME.'employer/password_reminder.php']['parent'] = AT_JB_BASENAME.'index.php';
97
98 $this->_pages[AT_JB_BASENAME.'employer/home.php']['title_var'] = 'jb_employer_home';
99 $this->_pages[AT_JB_BASENAME.'employer/home.php']['parent'] = AT_JB_BASENAME.'index.php';
100 $this->_pages[AT_JB_BASENAME.'employer/home.php']['children'] = array(AT_JB_BASENAME.'employer/add_new_post.php', AT_JB_BASENAME.'employer/profile.php');
101 $this->_pages[AT_JB_BASENAME.'employer/view_post.php']['title_var'] = 'jb_view_post';
102 $this->_pages[AT_JB_BASENAME.'employer/view_post.php']['parent'] = AT_JB_BASENAME.'employer/home.php';
103 $this->_pages[AT_JB_BASENAME.'employer/edit_post.php']['title_var'] = 'jb_edit_post';
104 $this->_pages[AT_JB_BASENAME.'employer/edit_post.php']['parent'] = AT_JB_BASENAME.'employer/home.php';
105 $this->_pages[AT_JB_BASENAME.'employer/add_new_post.php']['title_var'] = 'jb_add_new_post';
106 $this->_pages[AT_JB_BASENAME.'employer/add_new_post.php']['parent'] = AT_JB_BASENAME.'employer/home.php';
107 $this->_pages[AT_JB_BASENAME.'employer/profile.php']['title_var'] = 'jb_edit_profile';
108 $this->_pages[AT_JB_BASENAME.'employer/profile.php']['parent'] = AT_JB_BASENAME.'employer/home.php';
109
110 $this->_pages[AT_JB_BASENAME.'view_post.php']['title_var'] = 'jb_view_post';
111 $this->_pages[AT_JB_BASENAME.'view_post.php']['parent'] = AT_JB_BASENAME.'index.php';
112
113 $this->_pages[AT_JB_BASENAME.'subscribe.php']['title_var'] = 'jb_subscribe';
114 $this->_pages[AT_JB_BASENAME.'subscribe.php']['parent'] = AT_JB_BASENAME.'index.php';
115
116 /* public pages */
117 $this->_pages[AT_NAV_PUBLIC] = array(AT_JB_BASENAME.'index.php');
118 $this->_pages[AT_JB_BASENAME.'index.php']['parent'] = AT_NAV_PUBLIC;
119
120 /* my start page pages */
121 if(isset($_SESSION['member_id']) && $_SESSION['member_id']>0) {
122 $this->_pages[AT_NAV_START]  = array(AT_JB_BASENAME.'index.php');
123 $this->_pages[AT_JB_BASENAME.'index.php']['parent'] = AT_NAV_START;
124 }
125 ?>