2 /***********************************************************************/
\r
4 /***********************************************************************/
\r
5 /* Copyright (c) 2002-2009 */
\r
6 /* Adaptive Technology Resource Centre / Inclusive Design Institution */
\r
7 /* http://atutor.ca */
\r
9 /* This program is free software. You can redistribute it and/or */
\r
10 /* modify it under the terms of the GNU General Public License */
\r
11 /* as published by the Free Software Foundation. */
\r
12 /***********************************************************************/
\r
16 * doesn't allow this file to be loaded with a browser.
\r
18 if (!defined('AT_INCLUDE_PATH')) { exit; }
\r
21 * add savant variable
\r
24 require(AT_INCLUDE_PATH.'../mods/photos/include/constants.inc.php'); //load constant file right away.
\r
25 $savant->addPath('template', AT_PA_INCLUDE.'html/');
\r
28 * this file must only be included within a Module obj
\r
30 if (!isset($this) || (isset($this) && (strtolower(get_class($this)) != 'module'))) { exit(__FILE__ . ' is not a Module'); }
\r
33 * assign the instructor and admin privileges to the constants.
\r
35 define('AT_PRIV_PHOTO_ALBUM', $this->getPrivilege());
\r
36 define('AT_ADMIN_PRIV_PHOTO_ALBUM', $this->getAdminPrivilege());
\r
39 * create a side menu box/stack.
\r
41 $this->_stacks['pa_photo_gallery'] = array('title_var'=>'pa_photo_gallery', 'file'=>AT_INCLUDE_PATH.'../mods/photos/side_menu.inc.php');
\r
42 // ** possible alternative: **
\r
43 // $this->addStack('social', array('title_var' => 'social', 'file' => './side_menu.inc.php');
\r
46 * if this module is to be made available to students on the Home or Main Navigation.
\r
48 $_group_tool = $_student_tool = AT_PA_BASENAME.'index.php';
\r
50 $this->_list['pa_photo_gallery'] = array('title_var'=>'pa_photo_gallery','file'=>AT_PA_BASE.'sublinks.php');
\r
51 $this->_pages[AT_PA_BASENAME.'index.php']['icon'] = 'images/home-directory_sm.png';
\r
54 * add the admin pages when needed.
\r
56 if (admin_authenticate(AT_ADMIN_PRIV_PHOTO_ALBUM, TRUE) || admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) {
\r
57 $this->_pages[AT_NAV_ADMIN] = array('mods/photos/index_admin.php');
\r
58 $this->_pages[AT_PA_BASENAME.'index_admin.php']['title_var'] = 'pa_photo_gallery';
\r
59 $this->_pages[AT_PA_BASENAME.'index_admin.php']['parent'] = AT_NAV_ADMIN;
\r
60 $this->_pages[AT_PA_BASENAME.'index_admin.php']['children'] = array(AT_PA_BASENAME.'admin/preferences.php');
\r
61 $this->_pages[AT_PA_BASENAME.'admin/preferences.php']['title_var'] = 'pa_preferences';
\r
62 $this->_pages[AT_PA_BASENAME.'admin/preferences.php']['parent'] = AT_PA_BASENAME.'index_admin.php';
\r
67 * instructor Manage section:
\r
69 //$this->_pages[AT_SOCIAL_BASENAME.'index_instructor.php']['title_var'] = 'social';
\r
70 //$this->_pages[AT_SOCIAL_BASENAME.'index_instructor.php']['parent'] = 'tools/index.php';
\r
72 // ** possible alternative: **
\r
73 // $this->pages['./index_instructor.php']['title_var'] = 'social';
\r
74 // $this->pages['./index_instructor.php']['parent'] = 'tools/index.php';
\r
80 $this->_pages[AT_SOCIAL_BASENAME.'index.php']['children'] = array(AT_PA_BASENAME.'index.php');
\r
83 //$this->_pages[AT_PA_BASENAME.'index.php']['title_var'] = _AT('test');
\r
84 //$this->_pages[AT_PA_BASENAME.'index.php']['parent'] = AT_SOCIAL_BASENAME.'index.php';
\r
85 //$this->_pages[AT_SOCIAL_BASENAME.'index_mystart.php']['children'] = array_push($this->_pages[AT_SOCIAL_BASENAME.'index_mystart.php']['children'], AT_PA_BASENAME.'index.php');
\r
88 $this->_pages[AT_PA_BASENAME.'index.php']['title_var'] = 'pa_photo_gallery';
\r
89 $this->_pages[AT_PA_BASENAME.'index.php']['img'] = AT_PA_BASENAME.'images/photo_gallery.png';
\r
91 if($_SESSION['course_id'] < 1){
\r
92 $this->_pages[AT_PA_BASENAME.'index.php']['children'] = array(AT_PA_BASENAME.'profile_album.php', AT_PA_BASENAME.'create_album.php');
\r
94 $this->_pages[AT_PA_BASENAME.'index.php']['children'] = array(AT_PA_BASENAME.'profile_album.php', AT_PA_BASENAME.'course_albums.php', AT_PA_BASENAME.'shared_albums.php', AT_PA_BASENAME.'create_album.php');
\r
95 $this->_pages[AT_PA_BASENAME.'course_albums.php']['title_var'] = 'pa_course_albums';
\r
96 $this->_pages[AT_PA_BASENAME.'course_albums.php']['parent'] = AT_PA_BASENAME.'index.php';
\r
97 $this->_pages[AT_PA_BASENAME.'course_albums.php']['guide'] = 'general/?p=pa_index.php';
\r
100 $this->_pages[AT_PA_BASENAME.'index.php']['guide'] = 'general/?p=pa_index.php';
\r
101 $this->_pages[AT_PA_BASENAME.'index.php']['parent'] = AT_SOCIAL_BASENAME.'index_mystart.php';
\r
102 $this->_pages[AT_SOCIAL_BASENAME.'index_mystart.php']['children'] = array_merge(isset($this->_pages[AT_SOCIAL_BASENAME.'index_mystart.php']['children']) ? $this->_pages[AT_SOCIAL_BASENAME.'index_mystart.php']['children'] : array(), array(AT_PA_BASENAME.'index.php'));
\r
104 //$this->_pages[AT_PA_BASENAME.'my_albums.php']['title_var'] = 'pa_my_albums';
\r
105 //$this->_pages[AT_PA_BASENAME.'my_albums.php']['parent'] = AT_PA_BASENAME.'index.php';
\r
107 $this->_pages[AT_PA_BASENAME.'create_album.php']['title_var'] = 'pa_create_album';
\r
108 $this->_pages[AT_PA_BASENAME.'create_album.php']['parent'] = AT_PA_BASENAME.'index.php';
\r
109 $this->_pages[AT_PA_BASENAME.'create_album.php']['guide'] = 'general/?p=pa_index.php';
\r
111 $this->_pages[AT_PA_BASENAME.'profile_album.php']['title_var'] = 'pa_profile_album';
\r
112 $this->_pages[AT_PA_BASENAME.'profile_album.php']['parent'] = AT_PA_BASENAME.'index.php';
\r
113 $this->_pages[AT_PA_BASENAME.'profile_album.php']['guide'] = 'general/?p=pa_albums.php';
\r
115 $this->_pages[AT_PA_BASENAME.'shared_albums.php']['title_var'] = 'pa_shared_albums';
\r
116 $this->_pages[AT_PA_BASENAME.'shared_albums.php']['parent'] = AT_PA_BASENAME.'index.php';
\r
117 $this->_pages[AT_PA_BASENAME.'shared_albums.php']['guide'] = 'general/?p=pa_albums.php';
\r
119 $this->_pages[AT_PA_BASENAME.'search.php']['title_var'] = 'search';
\r
120 $this->_pages[AT_PA_BASENAME.'search.php']['parent'] = AT_PA_BASENAME.'index.php';
\r
121 $this->_pages[AT_PA_BASENAME.'search.php']['guide'] = 'general/?p=pa_albums.php';
\r
123 $this->_pages[AT_PA_BASENAME.'edit_album.php']['title_var'] = 'pa_edit_album';
\r
124 $this->_pages[AT_PA_BASENAME.'edit_album.php']['parent'] = AT_PA_BASENAME.'index.php';
\r
125 $this->_pages[AT_PA_BASENAME.'edit_album.php']['guide'] = 'general/?p=pa_albums.php';
\r
127 $this->_pages[AT_PA_BASENAME.'delete_album.php']['title_var'] = 'pa_delete_album';
\r
128 $this->_pages[AT_PA_BASENAME.'delete_album.php']['parent'] = AT_PA_BASENAME.'index.php';
\r
130 $this->_pages[AT_PA_BASENAME.'albums.php']['title_var'] = 'pa_albums';
\r
131 $this->_pages[AT_PA_BASENAME.'albums.php']['parent'] = AT_PA_BASENAME.'index.php';
\r
132 $this->_pages[AT_PA_BASENAME.'albums.php']['guide'] = 'general/?p=pa_albums.php';
\r
133 //$this->_pages[AT_PA_BASENAME.'albums.php']['children'] = array(AT_PA_BASENAME.'photo.php');
\r
135 $this->_pages[AT_PA_BASENAME.'photo.php']['title_var'] = 'pa_photo';
\r
136 $this->_pages[AT_PA_BASENAME.'photo.php']['parent'] = AT_PA_BASENAME.'albums.php';
\r
137 $this->_pages[AT_PA_BASENAME.'photo.php']['guide'] = 'general/?p=pa_photo.php';
\r
138 $this->_pages[AT_PA_BASENAME.'delete_photo.php']['title_var'] = 'pa_delete_photo';
\r
139 $this->_pages[AT_PA_BASENAME.'delete_photo.php']['parent'] = AT_PA_BASENAME.'photo.php';
\r
141 $this->_pages[AT_PA_BASENAME.'edit_photos.php']['title_var'] = 'pa_edit_photos';
\r
142 $this->_pages[AT_PA_BASENAME.'edit_photos.php']['parent'] = AT_PA_BASENAME.'albums.php';
\r
143 $this->_pages[AT_PA_BASENAME.'edit_photos.php']['guide'] = 'general/?p=pa_albums.php';
\r
145 $this->_pages[AT_PA_BASENAME.'delete_comment.php']['title_var'] = 'pa_delete_comment';
\r
146 $this->_pages[AT_PA_BASENAME.'delete_comment.php']['parent'] = AT_PA_BASENAME.'photo.php';
\r