@@ -36,8 +36,8 @@ |
||
36 | 36 | |
37 | 37 | function count_courses() |
38 | 38 | { |
39 | - global $nb_courses; |
|
40 | - return $nb_courses; |
|
39 | + global $nb_courses; |
|
40 | + return $nb_courses; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | //checking if the current coach is the admin coach |
@@ -457,8 +457,8 @@ |
||
457 | 457 | |
458 | 458 | // The post has been displayed => it can be removed from the what's new array |
459 | 459 | if (isset($whatsnew_post_info[$forumId][$threadId][$row['post_id']])) { |
460 | - unset($whatsnew_post_info[$forumId][$threadId][$row['post_id']]); |
|
461 | - unset($_SESSION['whatsnew_post_info'][$forumId][$threadId][$row['post_id']]); |
|
460 | + unset($whatsnew_post_info[$forumId][$threadId][$row['post_id']]); |
|
461 | + unset($_SESSION['whatsnew_post_info'][$forumId][$threadId][$row['post_id']]); |
|
462 | 462 | } |
463 | 463 | echo "</table>"; |
464 | 464 |
@@ -500,7 +500,7 @@ |
||
500 | 500 | $html .= '</div>'; |
501 | 501 | $html .= '</div></div>'; |
502 | 502 | } |
503 | - echo $html; |
|
503 | + echo $html; |
|
504 | 504 | } |
505 | 505 | } |
506 | 506 | if (count($forum_list) == 0) { |
@@ -62,7 +62,7 @@ |
||
62 | 62 | |
63 | 63 | if (api_is_allowed_to_edit() || api_is_coach()) { |
64 | 64 | //Search for all files that are not deleted => visibility != 2 |
65 | - $sql = "SELECT DISTINCT |
|
65 | + $sql = "SELECT DISTINCT |
|
66 | 66 | url, |
67 | 67 | title, |
68 | 68 | description, |
@@ -101,8 +101,8 @@ |
||
101 | 101 | $group_url = "group_view.php?id=$id"; |
102 | 102 | |
103 | 103 | $result['name'] = '<div class="group-name">'.Display::url( |
104 | - api_ucwords(cut($result['name'], 40, true)), $group_url) |
|
105 | - .'</div><div class="count-username">'. |
|
104 | + api_ucwords(cut($result['name'], 40, true)), $group_url) |
|
105 | + .'</div><div class="count-username">'. |
|
106 | 106 | Display::returnFontAwesomeIcon('user').$result['count'].'</div>'; |
107 | 107 | |
108 | 108 | $picture = $userGroup->get_picture_group( |
@@ -14,7 +14,7 @@ |
||
14 | 14 | api_block_anonymous_users(); |
15 | 15 | |
16 | 16 | if (isset($_REQUEST['userId'])) { |
17 | - $userId = intval($_REQUEST['userId']); |
|
17 | + $userId = intval($_REQUEST['userId']); |
|
18 | 18 | } else { |
19 | 19 | api_not_allowed(); |
20 | 20 | } |
@@ -128,7 +128,7 @@ |
||
128 | 128 | if (isset($friends[$j])) { |
129 | 129 | $friend = $friends[$j]; |
130 | 130 | $user_name = api_xml_http_response_encode($friend['firstName'].' '.$friend['lastName']); |
131 | - $userPicture = UserManager::getUserPicture($friend['friend_user_id']); |
|
131 | + $userPicture = UserManager::getUserPicture($friend['friend_user_id']); |
|
132 | 132 | |
133 | 133 | $friend_html .= ' |
134 | 134 | <div class="col-md-3"> |
@@ -15,27 +15,27 @@ discard block |
||
15 | 15 | // --------------------------------------------------- |
16 | 16 | if ($_POST['StoreGroupPermissions'] and $setting_visualisation=='checkbox') |
17 | 17 | { |
18 | - $result_message=store_permissions('group', $group_id); |
|
19 | - if ($result_message) |
|
20 | - { |
|
21 | - Display::display_normal_message($result_message); |
|
22 | - } |
|
18 | + $result_message=store_permissions('group', $group_id); |
|
19 | + if ($result_message) |
|
20 | + { |
|
21 | + Display::display_normal_message($result_message); |
|
22 | + } |
|
23 | 23 | } |
24 | 24 | if (isset($_GET['action'])) |
25 | 25 | { |
26 | - if (($_GET['action']=='grant' OR $_GET['action']=='revoke') AND isset($_GET['permission']) AND isset($_GET['tool'])) |
|
27 | - { |
|
28 | - $result_message=store_one_permission('group', $_GET['action'], $group_id, $_GET['tool'], $_GET['permission']); |
|
29 | - } |
|
30 | - if (isset($_GET['role']) AND ($_GET['action']=='grant' OR $_GET['action']=='revoke')) |
|
31 | - { |
|
32 | - $result_message=assign_role('group', $_GET['action'], $group_id, $_GET['role'], $_GET['scope']); |
|
33 | - echo 'hier'; |
|
34 | - } |
|
26 | + if (($_GET['action']=='grant' OR $_GET['action']=='revoke') AND isset($_GET['permission']) AND isset($_GET['tool'])) |
|
27 | + { |
|
28 | + $result_message=store_one_permission('group', $_GET['action'], $group_id, $_GET['tool'], $_GET['permission']); |
|
29 | + } |
|
30 | + if (isset($_GET['role']) AND ($_GET['action']=='grant' OR $_GET['action']=='revoke')) |
|
31 | + { |
|
32 | + $result_message=assign_role('group', $_GET['action'], $group_id, $_GET['role'], $_GET['scope']); |
|
33 | + echo 'hier'; |
|
34 | + } |
|
35 | 35 | } |
36 | 36 | if (isset($result_message)) |
37 | 37 | { |
38 | - Display::display_normal_message($result_message); |
|
38 | + Display::display_normal_message($result_message); |
|
39 | 39 | } |
40 | 40 | |
41 | 41 | // --------------------------------------------------- |
@@ -59,11 +59,11 @@ discard block |
||
59 | 59 | $inherited_permissions=limited_or_full($inherited_permissions); |
60 | 60 | if (api_get_setting('permissions')=='limited') |
61 | 61 | { |
62 | - $header_array=$rights_limited; |
|
62 | + $header_array=$rights_limited; |
|
63 | 63 | } |
64 | 64 | if (api_get_setting('permissions')=='full') |
65 | 65 | { |
66 | - $header_array=$rights_full; |
|
66 | + $header_array=$rights_full; |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | echo "<form method=\"post\" action=\"".str_replace('&', '&', $_SERVER['REQUEST_URI'])."\">"; |
@@ -72,12 +72,12 @@ discard block |
||
72 | 72 | // --------------------------------------------------- |
73 | 73 | if (api_get_setting('group_roles')=='true') |
74 | 74 | { |
75 | - // the list of the roles for the user |
|
76 | - echo '<strong>'.get_lang('GroupRoles').'</strong><br />'; |
|
77 | - $current_group_course_roles=get_roles('group',$group_id); |
|
78 | - $current_group_platform_roles=get_roles('group',$group_id, 'platform'); |
|
79 | - display_role_list($current_group_course_roles, $current_group_platform_roles); |
|
80 | - echo '<br />'; |
|
75 | + // the list of the roles for the user |
|
76 | + echo '<strong>'.get_lang('GroupRoles').'</strong><br />'; |
|
77 | + $current_group_course_roles=get_roles('group',$group_id); |
|
78 | + $current_group_platform_roles=get_roles('group',$group_id, 'platform'); |
|
79 | + display_role_list($current_group_course_roles, $current_group_platform_roles); |
|
80 | + echo '<br />'; |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | |
@@ -92,47 +92,47 @@ discard block |
||
92 | 92 | echo "\t\t<th>".get_lang('Module')."</th>\n"; |
93 | 93 | foreach ($header_array as $header_key=>$header_value) |
94 | 94 | { |
95 | - echo "\t\t<th>".get_lang($header_value)."</th>\n"; |
|
95 | + echo "\t\t<th>".get_lang($header_value)."</th>\n"; |
|
96 | 96 | } |
97 | 97 | echo "\t</tr>\n"; |
98 | 98 | |
99 | 99 | // the main area with the checkboxes or images |
100 | 100 | foreach ($tool_rights as $tool=>$rights) // $tool_rights contains all the possible tools and their rights |
101 | 101 | { |
102 | - echo "\t<tr>\n"; |
|
103 | - echo "\t\t<td>\n"; |
|
104 | - echo get_lang($tool); |
|
105 | - echo "\t\t</td>\n"; |
|
102 | + echo "\t<tr>\n"; |
|
103 | + echo "\t\t<td>\n"; |
|
104 | + echo get_lang($tool); |
|
105 | + echo "\t\t</td>\n"; |
|
106 | 106 | |
107 | - foreach ($header_array as $key=>$value) |
|
108 | - { |
|
109 | - echo "\t\t<td align='center'>\n"; |
|
110 | - if (in_array($value,$rights)) |
|
111 | - { |
|
112 | - if ($setting_visualisation=='checkbox') |
|
113 | - { |
|
114 | - //display_checkbox_matrix($current_group_permissions, $tool, $value); |
|
115 | - display_checkbox_matrix($current_group_permissions, $tool, $value, $inherited_permissions,$course_admin); |
|
116 | - } |
|
117 | - if ($setting_visualisation=='image') |
|
118 | - { |
|
119 | - //display_image_matrix($current_group_permissions, $tool, $value); |
|
120 | - display_image_matrix($current_group_permissions, $tool, $value,$inherited_permissions, $course_admin); |
|
121 | - } |
|
122 | - } |
|
123 | - // note: in a later stage this part will be replaced by a function |
|
124 | - // so that we can easily switch between a checkbox approach or an image approach |
|
125 | - // where every click is in fact a change of status. In the checkbox approach you first have to |
|
126 | - // do the changes and then store them by clicking the submit button. |
|
127 | - echo "\t\t</td>\n"; |
|
128 | - } |
|
129 | - echo "\t</tr>\n"; |
|
107 | + foreach ($header_array as $key=>$value) |
|
108 | + { |
|
109 | + echo "\t\t<td align='center'>\n"; |
|
110 | + if (in_array($value,$rights)) |
|
111 | + { |
|
112 | + if ($setting_visualisation=='checkbox') |
|
113 | + { |
|
114 | + //display_checkbox_matrix($current_group_permissions, $tool, $value); |
|
115 | + display_checkbox_matrix($current_group_permissions, $tool, $value, $inherited_permissions,$course_admin); |
|
116 | + } |
|
117 | + if ($setting_visualisation=='image') |
|
118 | + { |
|
119 | + //display_image_matrix($current_group_permissions, $tool, $value); |
|
120 | + display_image_matrix($current_group_permissions, $tool, $value,$inherited_permissions, $course_admin); |
|
121 | + } |
|
122 | + } |
|
123 | + // note: in a later stage this part will be replaced by a function |
|
124 | + // so that we can easily switch between a checkbox approach or an image approach |
|
125 | + // where every click is in fact a change of status. In the checkbox approach you first have to |
|
126 | + // do the changes and then store them by clicking the submit button. |
|
127 | + echo "\t\t</td>\n"; |
|
128 | + } |
|
129 | + echo "\t</tr>\n"; |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | echo "</table>\n"; |
133 | 133 | if ($setting_visualisation=='checkbox') |
134 | 134 | { |
135 | - echo "<input type=\"Submit\" name=\"StoreGroupPermissions\" value=\"".get_lang('StorePermissions')."\">"; |
|
135 | + echo "<input type=\"Submit\" name=\"StoreGroupPermissions\" value=\"".get_lang('StorePermissions')."\">"; |
|
136 | 136 | } |
137 | 137 | echo "</form>"; |
138 | 138 |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | WHERE status = '1' AND c_id = '".api_get_course_int_id()."'"; |
50 | 50 | $result = Database::query($sql); |
51 | 51 | while ($user = Database::fetch_assoc($result)) { |
52 | - unset($blog_users[$user['user_id']]); |
|
52 | + unset($blog_users[$user['user_id']]); |
|
53 | 53 | } |
54 | 54 | |
55 | 55 | //$user_id=$userIdViewed; |
@@ -84,30 +84,30 @@ discard block |
||
84 | 84 | // RETRIEVING THE PERMISSIONS OF THE ROLES OF THE USER |
85 | 85 | // ------------------------------------------------------------------ |
86 | 86 | if (api_get_setting('user_roles')=='true') { |
87 | - // course roles that are assigned to the user |
|
88 | - $current_user_role_permissions_of_user=get_roles_permissions('user',$user_id); |
|
89 | - $inherited_permissions=permission_array_merge($inherited_permissions,$current_user_role_permissions_of_user); |
|
90 | - // NOTE: deze array moet nog gemerged worden met de $inherited_permissions array |
|
91 | - // (heet momenteel nog $current_group_permissions_of_user omdat voorlopig enkel de |
|
92 | - // groepsge�rfde permissions in beschouwing worden genomen |
|
93 | - // dit moet ook de rol permissies van rollen die toegekend worden aan een gebruiker |
|
94 | - // en de rol permissies van rollen die toegekend worden aan de groepen van een gebruiker |
|
95 | - // omvatten. |
|
96 | - // NOTE: checken als de rollen brol wel degelijk geactiveerd is voordat we dit allemaal |
|
97 | - // ophalen. |
|
98 | - // platform roles that are assigned to the user |
|
99 | - $current_user_role_permissions_of_user=get_roles_permissions('user',$user_id, 'platform'); |
|
100 | - $inherited_permissions=permission_array_merge($inherited_permissions,$current_user_role_permissions_of_user); |
|
87 | + // course roles that are assigned to the user |
|
88 | + $current_user_role_permissions_of_user=get_roles_permissions('user',$user_id); |
|
89 | + $inherited_permissions=permission_array_merge($inherited_permissions,$current_user_role_permissions_of_user); |
|
90 | + // NOTE: deze array moet nog gemerged worden met de $inherited_permissions array |
|
91 | + // (heet momenteel nog $current_group_permissions_of_user omdat voorlopig enkel de |
|
92 | + // groepsge�rfde permissions in beschouwing worden genomen |
|
93 | + // dit moet ook de rol permissies van rollen die toegekend worden aan een gebruiker |
|
94 | + // en de rol permissies van rollen die toegekend worden aan de groepen van een gebruiker |
|
95 | + // omvatten. |
|
96 | + // NOTE: checken als de rollen brol wel degelijk geactiveerd is voordat we dit allemaal |
|
97 | + // ophalen. |
|
98 | + // platform roles that are assigned to the user |
|
99 | + $current_user_role_permissions_of_user=get_roles_permissions('user',$user_id, 'platform'); |
|
100 | + $inherited_permissions=permission_array_merge($inherited_permissions,$current_user_role_permissions_of_user); |
|
101 | 101 | } |
102 | 102 | // ------------------------------------------------------------------ |
103 | 103 | // RETRIEVING THE PERMISSIONS OF THE ROLES OF THE GROUPS OF THE USER |
104 | 104 | // ------------------------------------------------------------------ |
105 | 105 | if (api_get_setting('group_roles')=='true') { |
106 | - // NOTE: DIT MOET NOG VERDER UITGEWERKT WORDEN |
|
107 | - foreach ($groups_of_user as $group) { |
|
108 | - $this_current_group_role_permissions_of_user=get_roles_permissions('user',$user_id); |
|
109 | - //$inherited_permissions[$tool][]=$permission; |
|
110 | - } |
|
106 | + // NOTE: DIT MOET NOG VERDER UITGEWERKT WORDEN |
|
107 | + foreach ($groups_of_user as $group) { |
|
108 | + $this_current_group_role_permissions_of_user=get_roles_permissions('user',$user_id); |
|
109 | + //$inherited_permissions[$tool][]=$permission; |
|
110 | + } |
|
111 | 111 | } |
112 | 112 | |
113 | 113 | echo "<form method=\"post\" action=\"".str_replace('&', '&', $_SERVER['REQUEST_URI'])."\">"; |
@@ -118,12 +118,12 @@ discard block |
||
118 | 118 | |
119 | 119 | if (api_get_setting('user_roles')=='true') |
120 | 120 | { |
121 | - // the list of the roles for the user |
|
122 | - echo '<strong>'.get_lang('UserRoles').'</strong><br />'; |
|
123 | - $current_user_course_roles=get_roles('user',$user_id); |
|
124 | - $current_user_platform_roles=get_roles('user',$user_id, 'platform'); |
|
125 | - display_role_list($current_user_course_roles, $current_user_platform_roles); |
|
126 | - echo '<br />'; |
|
121 | + // the list of the roles for the user |
|
122 | + echo '<strong>'.get_lang('UserRoles').'</strong><br />'; |
|
123 | + $current_user_course_roles=get_roles('user',$user_id); |
|
124 | + $current_user_platform_roles=get_roles('user',$user_id, 'platform'); |
|
125 | + display_role_list($current_user_course_roles, $current_user_platform_roles); |
|
126 | + echo '<br />'; |
|
127 | 127 | } |
128 | 128 | |
129 | 129 | // --------------------------------------------------- |
@@ -133,59 +133,59 @@ discard block |
||
133 | 133 | |
134 | 134 | // the header |
135 | 135 | echo "\t<tr>\n"; |
136 | - echo "\t\t<th rowspan=\"2\">".get_lang('Module')."</th>\n"; |
|
137 | - echo "\t\t<th colspan=\"4\">".get_lang('ArticleManager')."</th>\n"; |
|
138 | - echo "\t\t<th colspan=\"3\">".get_lang('CommentManager')."</th>\n"; |
|
139 | - echo "\t\t<th colspan=\"3\">".get_lang('BlogManager')."</th>\n"; |
|
136 | + echo "\t\t<th rowspan=\"2\">".get_lang('Module')."</th>\n"; |
|
137 | + echo "\t\t<th colspan=\"4\">".get_lang('ArticleManager')."</th>\n"; |
|
138 | + echo "\t\t<th colspan=\"3\">".get_lang('CommentManager')."</th>\n"; |
|
139 | + echo "\t\t<th colspan=\"3\">".get_lang('BlogManager')."</th>\n"; |
|
140 | 140 | echo "\t</tr>\n"; |
141 | 141 | |
142 | 142 | // Subheader |
143 | 143 | echo "\t<tr>\n"; |
144 | - echo "\t\t<th align='center'>".get_lang('Add')."</th>\n"; |
|
145 | - echo "\t\t<th align='center'>".get_lang('Delete')."</th>\n"; |
|
146 | - echo "\t\t<th align='center'>".get_lang('Edit')."</th>\n"; |
|
147 | - echo "\t\t<th align='center'>".get_lang('Rate')."</th>\n"; |
|
148 | - echo "\t\t<th align='center'>".get_lang('Add')."</th>\n"; |
|
149 | - echo "\t\t<th align='center'>".get_lang('Delete')."</th>\n"; |
|
150 | - echo "\t\t<th align='center'>".get_lang('Rate')."</th>\n"; |
|
151 | - echo "\t\t<th align='center'>".get_lang('Tasks')."</th>\n"; |
|
152 | - echo "\t\t<th align='center'>".get_lang('Members')."</th>\n"; |
|
153 | - echo "\t\t<th align='center'>".get_lang('Roles')."</th>\n"; |
|
144 | + echo "\t\t<th align='center'>".get_lang('Add')."</th>\n"; |
|
145 | + echo "\t\t<th align='center'>".get_lang('Delete')."</th>\n"; |
|
146 | + echo "\t\t<th align='center'>".get_lang('Edit')."</th>\n"; |
|
147 | + echo "\t\t<th align='center'>".get_lang('Rate')."</th>\n"; |
|
148 | + echo "\t\t<th align='center'>".get_lang('Add')."</th>\n"; |
|
149 | + echo "\t\t<th align='center'>".get_lang('Delete')."</th>\n"; |
|
150 | + echo "\t\t<th align='center'>".get_lang('Rate')."</th>\n"; |
|
151 | + echo "\t\t<th align='center'>".get_lang('Tasks')."</th>\n"; |
|
152 | + echo "\t\t<th align='center'>".get_lang('Members')."</th>\n"; |
|
153 | + echo "\t\t<th align='center'>".get_lang('Roles')."</th>\n"; |
|
154 | 154 | echo "\t</tr>\n"; |
155 | 155 | |
156 | 156 | // the main area with the checkboxes or images |
157 | 157 | foreach ($blog_users as $user_id => $user_name) { // $blog_users contains all the users in this blog |
158 | - // --------------------------------------------------- |
|
159 | - // RETRIEVING THE PERMISSIONS OF THE USER |
|
160 | - // --------------------------------------------------- |
|
161 | - $current_user_permissions = array(); |
|
162 | - $current_user_permissions = get_permissions('user', $user_id); |
|
163 | - |
|
164 | - echo "\t<tr>\n"; |
|
165 | - echo "\t\t<td>\n"; |
|
166 | - echo $user_name; |
|
167 | - echo "\t\t</td>\n"; |
|
168 | - |
|
169 | - foreach ($rights_full as $key => $value) { |
|
170 | - |
|
171 | - echo "\t\t<td align='center'>\n"; |
|
172 | - if (in_array($value,$rights_blog)) { |
|
173 | - display_image_matrix_for_blogs( |
|
174 | - $current_user_permissions, |
|
175 | - $user_id, |
|
176 | - 'BLOG_'.$blog_id, |
|
177 | - $value, |
|
178 | - (isset($inherited_permissions) ? $inherited_permissions : null), |
|
179 | - (isset($course_admin) ? $course_admin : null) |
|
180 | - ); |
|
181 | - } |
|
182 | - // note: in a later stage this part will be replaced by a function |
|
183 | - // so that we can easily switch between a checkbox approach or an image approach |
|
184 | - // where every click is in fact a change of status. In the checkbox approach you first have to |
|
185 | - // do the changes and then store them by clicking the submit button. |
|
186 | - echo "\t\t</td>\n"; |
|
187 | - } |
|
188 | - echo "\t</tr>\n"; |
|
158 | + // --------------------------------------------------- |
|
159 | + // RETRIEVING THE PERMISSIONS OF THE USER |
|
160 | + // --------------------------------------------------- |
|
161 | + $current_user_permissions = array(); |
|
162 | + $current_user_permissions = get_permissions('user', $user_id); |
|
163 | + |
|
164 | + echo "\t<tr>\n"; |
|
165 | + echo "\t\t<td>\n"; |
|
166 | + echo $user_name; |
|
167 | + echo "\t\t</td>\n"; |
|
168 | + |
|
169 | + foreach ($rights_full as $key => $value) { |
|
170 | + |
|
171 | + echo "\t\t<td align='center'>\n"; |
|
172 | + if (in_array($value,$rights_blog)) { |
|
173 | + display_image_matrix_for_blogs( |
|
174 | + $current_user_permissions, |
|
175 | + $user_id, |
|
176 | + 'BLOG_'.$blog_id, |
|
177 | + $value, |
|
178 | + (isset($inherited_permissions) ? $inherited_permissions : null), |
|
179 | + (isset($course_admin) ? $course_admin : null) |
|
180 | + ); |
|
181 | + } |
|
182 | + // note: in a later stage this part will be replaced by a function |
|
183 | + // so that we can easily switch between a checkbox approach or an image approach |
|
184 | + // where every click is in fact a change of status. In the checkbox approach you first have to |
|
185 | + // do the changes and then store them by clicking the submit button. |
|
186 | + echo "\t\t</td>\n"; |
|
187 | + } |
|
188 | + echo "\t</tr>\n"; |
|
189 | 189 | } |
190 | 190 | |
191 | 191 | echo "</table>\n"; |