Completed
Pull Request — 1.11.x (#1622)
by José
95:13 queued 68:43
created
main/coursecopy/import_backup.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -98,21 +98,21 @@  discard block
 block discarded – undo
98 98
         $cr->set_file_option($_POST['same_file_name_option']);
99 99
         $cr->restore();
100 100
         Display::display_normal_message(get_lang('ImportFinished'));
101
-        echo '<a class="btn btn-default" href="' . api_get_path(WEB_COURSE_PATH) . api_get_course_path() . '/index.php">' . get_lang('CourseHomepage') . '</a>';
101
+        echo '<a class="btn btn-default" href="'.api_get_path(WEB_COURSE_PATH).api_get_course_path().'/index.php">'.get_lang('CourseHomepage').'</a>';
102 102
     } else {
103 103
         if (!$error) {
104 104
             Display::display_warning_message(get_lang('NoResourcesInBackupFile'));
105
-            echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>';
105
+            echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>';
106 106
         } elseif ($filename === false) {
107 107
             Display::display_error_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'));
108
-            echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>';
108
+            echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>';
109 109
         } else {
110 110
             if ($filename == '') {
111 111
                 Display::display_error_message(get_lang('SelectBackupFile'));
112
-                echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>';
112
+                echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>';
113 113
             } else {
114 114
                 Display::display_error_message(get_lang('UploadError'));
115
-                echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>';
115
+                echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>';
116 116
             }
117 117
         }
118 118
     }
@@ -142,10 +142,10 @@  discard block
 block discarded – undo
142 142
         CourseSelectForm::display_form($course, $hiddenFields);
143 143
     } elseif ($filename === false) {
144 144
         Display::display_error_message(get_lang('ArchivesDirectoryNotWriteableContactAdmin'));
145
-        echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>';
145
+        echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>';
146 146
     } else {
147 147
         Display::display_warning_message(get_lang('NoResourcesInBackupFile'));
148
-        echo '<a class="btn btn-default" href="import_backup.php?' . api_get_cidreq() . '">' . get_lang('TryAgain') . '</a>';
148
+        echo '<a class="btn btn-default" href="import_backup.php?'.api_get_cidreq().'">'.get_lang('TryAgain').'</a>';
149 149
     }
150 150
 } else {
151 151
     $user = api_get_user_info();
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
     $form = new FormValidator(
158 158
         'import_backup_form',
159 159
         'post',
160
-        api_get_path(WEB_CODE_PATH) . 'coursecopy/import_backup.php?' . api_get_cidreq(),
160
+        api_get_path(WEB_CODE_PATH).'coursecopy/import_backup.php?'.api_get_cidreq(),
161 161
         '',
162 162
         array('enctype' => 'multipart/form-data')
163 163
     );
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         );
190 190
         $options['null'] = '-';
191 191
         foreach ($backups as $index => $backup) {
192
-            $options[$backup['file']] = $backup['course_code'] . ' (' . $backup['date'] . ')';
192
+            $options[$backup['file']] = $backup['course_code'].' ('.$backup['date'].')';
193 193
         }
194 194
         $form->addElement(
195 195
             'select',
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
             'radio',
208 208
             '',
209 209
             '',
210
-            '<i>' . get_lang('NoBackupsAvailable') . '</i>',
210
+            '<i>'.get_lang('NoBackupsAvailable').'</i>',
211 211
             '',
212 212
             'disabled="true"'
213 213
         );
Please login to merge, or discard this patch.
main/social/home.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -101,8 +101,8 @@
 block discarded – undo
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(
Please login to merge, or discard this patch.
Spacing   +35 added lines, -35 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
 api_block_anonymous_users();
21 21
 
22 22
 if (api_get_setting('allow_social_tool') != 'true') {
23
-    $url = api_get_path(WEB_CODE_PATH) . 'auth/profile.php';
24
-    header('Location: ' . $url);
23
+    $url = api_get_path(WEB_CODE_PATH).'auth/profile.php';
24
+    header('Location: '.$url);
25 25
     exit;
26 26
 }
27 27
 
@@ -45,10 +45,10 @@  discard block
 block discarded – undo
45 45
     $allowed_picture_types = api_get_supported_image_extensions();
46 46
     $form->addRule(
47 47
         'picture',
48
-        get_lang('OnlyImagesAllowed') . ' (' . implode(
48
+        get_lang('OnlyImagesAllowed').' ('.implode(
49 49
             ',',
50 50
             $allowed_picture_types
51
-        ) . ')',
51
+        ).')',
52 52
         'filetype',
53 53
         $allowed_picture_types
54 54
     );
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
                 $sql = "UPDATE $table_user
69 69
                         SET 
70 70
                             picture_uri = '$new_picture' 
71
-                        WHERE user_id =  " . api_get_user_id();
71
+                        WHERE user_id =  ".api_get_user_id();
72 72
 
73 73
                 $result = Database::query($sql);
74 74
             }
@@ -95,9 +95,9 @@  discard block
 block discarded – undo
95 95
         $result['name'] = Security::remove_XSS($result['name'], STUDENT, true);
96 96
 
97 97
         if ($result['count'] == 1) {
98
-            $result['count'] = '1 ' . get_lang('Member');
98
+            $result['count'] = '1 '.get_lang('Member');
99 99
         } else {
100
-            $result['count'] = $result['count'] . ' ' . get_lang('Members');
100
+            $result['count'] = $result['count'].' '.get_lang('Members');
101 101
         }
102 102
 
103 103
         $group_url = "group_view.php?id=$id";
@@ -114,9 +114,9 @@  discard block
 block discarded – undo
114 114
             GROUP_IMAGE_SIZE_BIG
115 115
         );
116 116
 
117
-        $result['picture'] = '<img class="img-responsive" src="' . $picture['file'] . '" />';
118
-        $group_actions = '<div class="group-more"><a href="groups.php?#tab_browse-2">' . get_lang('SeeMore') . '</a></div>';
119
-        $group_info= '<div class="description"><p>' . cut($result['description'], 120, true) . "</p></div>";
117
+        $result['picture'] = '<img class="img-responsive" src="'.$picture['file'].'" />';
118
+        $group_actions = '<div class="group-more"><a href="groups.php?#tab_browse-2">'.get_lang('SeeMore').'</a></div>';
119
+        $group_info = '<div class="description"><p>'.cut($result['description'], 120, true)."</p></div>";
120 120
         $groups_newest[] = array(
121 121
             Display::url(
122 122
                 $result['picture'],
@@ -143,9 +143,9 @@  discard block
 block discarded – undo
143 143
     $group_url = "group_view.php?id=$id";
144 144
 
145 145
     if ($result['count'] == 1) {
146
-        $result['count'] = '1 ' . get_lang('Member');
146
+        $result['count'] = '1 '.get_lang('Member');
147 147
     } else {
148
-        $result['count'] = $result['count'] . ' ' . get_lang('Members');
148
+        $result['count'] = $result['count'].' '.get_lang('Members');
149 149
     }
150 150
     $result['name'] = '<div class="group-name">'.Display::url(
151 151
             api_ucwords(cut($result['name'], 40, true)), $group_url)
@@ -157,42 +157,42 @@  discard block
 block discarded – undo
157 157
         null,
158 158
         GROUP_IMAGE_SIZE_BIG
159 159
     );
160
-    $result['picture_uri'] = '<img class="img-responsive" src="' . $picture['file'] . '" />';
161
-    $group_actions = '<div class="group-more" ><a href="groups.php?#tab_browse-3">' . get_lang('SeeMore') . '</a></div>';
162
-    $group_info= '<div class="description"><p>' . cut($result['description'], 120, true) . "</p></div>";
160
+    $result['picture_uri'] = '<img class="img-responsive" src="'.$picture['file'].'" />';
161
+    $group_actions = '<div class="group-more" ><a href="groups.php?#tab_browse-3">'.get_lang('SeeMore').'</a></div>';
162
+    $group_info = '<div class="description"><p>'.cut($result['description'], 120, true)."</p></div>";
163 163
     $groups_pop[] = array(
164 164
         Display::url($result['picture_uri'], $group_url),
165
-        $result['name'],$group_info. $group_actions
165
+        $result['name'], $group_info.$group_actions
166 166
     );
167 167
 }
168 168
 
169
-$list=count($groups_newest);
169
+$list = count($groups_newest);
170 170
 $social_group_block = null;
171 171
 if ($list > 0) {
172 172
     $social_group_block .= '<div class="list-group-newest">';
173
-    $social_group_block .= '<div class="group-title">' . get_lang('Newest') . '</div>';
174
-    for ($i = 0;$i < $list; $i++) {
175
-        $social_group_block.='<div class="row">';
176
-        $social_group_block.='<div class="col-md-3">' . $groups_newest[$i][0] . '</div>';
177
-        $social_group_block.='<div class="col-md-9">' . $groups_newest[$i][1];
178
-        $social_group_block.= $groups_newest[$i][2] . '</div>';
179
-        $social_group_block.="</div>";
173
+    $social_group_block .= '<div class="group-title">'.get_lang('Newest').'</div>';
174
+    for ($i = 0; $i < $list; $i++) {
175
+        $social_group_block .= '<div class="row">';
176
+        $social_group_block .= '<div class="col-md-3">'.$groups_newest[$i][0].'</div>';
177
+        $social_group_block .= '<div class="col-md-9">'.$groups_newest[$i][1];
178
+        $social_group_block .= $groups_newest[$i][2].'</div>';
179
+        $social_group_block .= "</div>";
180 180
     }
181
-    $social_group_block.= "</div>";
181
+    $social_group_block .= "</div>";
182 182
 }
183
-$list=count($groups_pop);
183
+$list = count($groups_pop);
184 184
 if ($list > 0) {
185 185
     $social_group_block .= '<div class="list-group-newest">';
186
-    $social_group_block .= '<div class="group-title">' . get_lang('Popular') . '</div>';
187
-
188
-    for ($i = 0;$i < $list; $i++) {
189
-        $social_group_block.='<div class="row">';
190
-        $social_group_block.='<div class="col-md-3">' . $groups_pop[$i][0] . '</div>';
191
-        $social_group_block.='<div class="col-md-9">' . $groups_pop[$i][1];
192
-        $social_group_block.= $groups_pop[$i][2] . '</div>';
193
-        $social_group_block.="</div>";
186
+    $social_group_block .= '<div class="group-title">'.get_lang('Popular').'</div>';
187
+
188
+    for ($i = 0; $i < $list; $i++) {
189
+        $social_group_block .= '<div class="row">';
190
+        $social_group_block .= '<div class="col-md-3">'.$groups_pop[$i][0].'</div>';
191
+        $social_group_block .= '<div class="col-md-9">'.$groups_pop[$i][1];
192
+        $social_group_block .= $groups_pop[$i][2].'</div>';
193
+        $social_group_block .= "</div>";
194 194
     }
195
-    $social_group_block.= "</div>";
195
+    $social_group_block .= "</div>";
196 196
 }
197 197
 // My friends
198 198
 $friend_html = SocialManager::listMyFriendsBlock(
Please login to merge, or discard this patch.
main/social/vcard_export.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
main/social/profile_friends_and_groups.inc.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -32,14 +32,14 @@  discard block
 block discarded – undo
32 32
         );
33 33
         $number_friends = count($friends);
34 34
         $friend_html = '';
35
-        $friend_html .= '<div><h3>' . get_lang('SocialFriend') . '</h3></div>';
35
+        $friend_html .= '<div><h3>'.get_lang('SocialFriend').'</h3></div>';
36 36
         $friend_html .= '<div id="friend-container" class="social-friend-container">';
37 37
         $friend_html .= '<div id="friend-header" >';
38 38
 
39 39
         if ($number_friends == 1) {
40
-            $friend_html .= '<div style="float:left;width:80%">' . $number_friends . ' ' . get_lang('Friend') . '</div>';
40
+            $friend_html .= '<div style="float:left;width:80%">'.$number_friends.' '.get_lang('Friend').'</div>';
41 41
         } else {
42
-            $friend_html .= '<div style="float:left;width:80%">' . $number_friends . ' ' . get_lang('Friends') . '</div>';
42
+            $friend_html .= '<div style="float:left;width:80%">'.$number_friends.' '.get_lang('Friends').'</div>';
43 43
         }
44 44
 
45 45
         $friend_html .= '</div>'; // close div friend-header
@@ -51,14 +51,14 @@  discard block
 block discarded – undo
51 51
                     $friend['firstName'],
52 52
                     $friend['lastName']
53 53
                 );
54
-                $friend_html .= '<div id=div_' . $friend['friend_user_id'] . ' class="image_friend_network" ><span><center>';
54
+                $friend_html .= '<div id=div_'.$friend['friend_user_id'].' class="image_friend_network" ><span><center>';
55 55
 
56 56
                 $userPicture = UserManager::getUserPicture($friend['friend_user_id']);
57 57
 
58
-                $friend_html .= '<a href="profile.php?u=' . $friend['friend_user_id'].'">';
59
-                $friend_html .= '<img src="' . $userPicture . '" id="imgfriend_' . $friend['friend_user_id'] . '" title="' . $name_user . '" />';
58
+                $friend_html .= '<a href="profile.php?u='.$friend['friend_user_id'].'">';
59
+                $friend_html .= '<img src="'.$userPicture.'" id="imgfriend_'.$friend['friend_user_id'].'" title="'.$name_user.'" />';
60 60
                 $friend_html .= '</center></span>';
61
-                $friend_html .= '<center class="friend">' . $name_user . '</a></center>';
61
+                $friend_html .= '<center class="friend">'.$name_user.'</a></center>';
62 62
                 $friend_html .= '</div>';
63 63
             }
64 64
         }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             $i = 1;
74 74
             foreach ($results as $result) {
75 75
                 $id = $result['id'];
76
-                $url_open = '<a href="group_view.php?id=' . $id . '">';
76
+                $url_open = '<a href="group_view.php?id='.$id.'">';
77 77
                 $url_close = '</a>';
78 78
                 $icon = '';
79 79
                 $name = cut($result['name'], 20, true);
@@ -94,11 +94,11 @@  discard block
 block discarded – undo
94 94
                     $userGroup->get_all_users_by_group($id)
95 95
                 );
96 96
                 if ($count_users_group == 1) {
97
-                    $count_users_group = $count_users_group . ' ' . get_lang(
97
+                    $count_users_group = $count_users_group.' '.get_lang(
98 98
                             'Member'
99 99
                         );
100 100
                 } else {
101
-                    $count_users_group = $count_users_group . ' ' . get_lang(
101
+                    $count_users_group = $count_users_group.' '.get_lang(
102 102
                             'Members'
103 103
                         );
104 104
                 }
@@ -107,40 +107,40 @@  discard block
 block discarded – undo
107 107
                     $result['picture_uri'],
108 108
                     80
109 109
                 );
110
-                $item_name = '<div class="box_shared_profile_group_title">' . $url_open . api_xml_http_response_encode($name) . $icon . $url_close . '</div>';
110
+                $item_name = '<div class="box_shared_profile_group_title">'.$url_open.api_xml_http_response_encode($name).$icon.$url_close.'</div>';
111 111
                 $item_description = '';
112 112
                 if (!empty($result['description'])) {
113 113
                     $item_description = '<div class="box_shared_profile_group_description">
114 114
                         <span class="social-groups-text2">' .
115
-                        api_xml_http_response_encode(get_lang('Description')) . '</span><p class="social-groups-text4">' .
116
-                        cut(api_xml_http_response_encode($result['description']), 120, true ) . '</p></div>';
115
+                        api_xml_http_response_encode(get_lang('Description')).'</span><p class="social-groups-text4">'.
116
+                        cut(api_xml_http_response_encode($result['description']), 120, true).'</p></div>';
117 117
                 }
118 118
 
119 119
                 $result['picture_uri'] = '<div class="box_shared_profile_group_image">
120
-                                          <img class="social-groups-image" src="' . $picture['file'] . '" /></div>';
120
+                                          <img class="social-groups-image" src="' . $picture['file'].'" /></div>';
121 121
                 $item_actions = '';
122 122
                 if (api_get_user_id() == $user_id) {
123
-                    $item_actions = '<div class="box_shared_profile_group_actions"><a href="group_view.php?id=' . $id . '">' .
124
-                        get_lang('SeeMore') . $url_close . '</div>';
123
+                    $item_actions = '<div class="box_shared_profile_group_actions"><a href="group_view.php?id='.$id.'">'.
124
+                        get_lang('SeeMore').$url_close.'</div>';
125 125
                 }
126 126
                 $grid_my_groups[] = array(
127 127
                     $item_name,
128
-                    $url_open . $result['picture_uri'] . $url_close,
129
-                    $item_description . $item_actions
128
+                    $url_open.$result['picture_uri'].$url_close,
129
+                    $item_description.$item_actions
130 130
                 );
131 131
                 $i++;
132 132
             }
133 133
         }
134 134
         if (count($grid_my_groups) > 0) {
135 135
             echo '<div style="margin-top:20px">';
136
-            echo '<div><h3>' . get_lang('MyGroups') . '</h3></div>';
136
+            echo '<div><h3>'.get_lang('MyGroups').'</h3></div>';
137 137
             $count_groups = 0;
138 138
             if (count($results) == 1) {
139
-                $count_groups = count($results) . ' ' . get_lang('Group');
139
+                $count_groups = count($results).' '.get_lang('Group');
140 140
             } else {
141
-                $count_groups = count($results) . ' ' . get_lang('Groups');
141
+                $count_groups = count($results).' '.get_lang('Groups');
142 142
             }
143
-            echo '<div>' . $count_groups . '</div>';
143
+            echo '<div>'.$count_groups.'</div>';
144 144
 
145 145
             Display::display_sortable_grid(
146 146
                 'shared_profile_mygroups',
Please login to merge, or discard this patch.
main/social/skills_ranking.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 //Add the JS needed to use the jqgrid
14 14
 $htmlHeadXtra[] = api_get_jqgrid_js();
15 15
 
16
-$interbreadcrumb[] = array("url" => "index.php","name" => get_lang('Skills'));
16
+$interbreadcrumb[] = array("url" => "index.php", "name" => get_lang('Skills'));
17 17
 
18 18
 //jqgrid will use this URL to do the selects
19 19
 $url = api_get_path(WEB_AJAX_PATH).'model.ajax.php?a=get_user_skill_ranking';
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     get_lang('Rank')
29 29
 );
30 30
 
31
-$column_model   = array(
31
+$column_model = array(
32 32
     array(
33 33
         'name' => 'photo',
34 34
         'index' => 'photo',
Please login to merge, or discard this patch.
main/social/group_members.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     $group_id
118 118
 );
119 119
 $social_menu_block = SocialManager::show_social_menu('member_list', $group_id);
120
-$social_right_content = '<h2>' . $group_info['name'] . '</h2>';
120
+$social_right_content = '<h2>'.$group_info['name'].'</h2>';
121 121
 
122 122
 foreach ($users as $user) {
123 123
     switch ($user['relation_type']) {
@@ -136,24 +136,24 @@  discard block
 block discarded – undo
136 136
                 )
137 137
             )
138 138
             ) {
139
-                $user['link'] = '<a href="group_members.php?id=' . $group_id . '&u=' . $user['id'] . '&action=delete">' .
139
+                $user['link'] = '<a href="group_members.php?id='.$group_id.'&u='.$user['id'].'&action=delete">'.
140 140
                     Display::return_icon(
141 141
                         'delete.png',
142 142
                         get_lang('DeleteFromGroup')
143
-                    ) . '</a>' .
144
-                    '<a href="group_members.php?id=' . $group_id . '&u=' . $user['id'] . '&action=set_moderator">' .
143
+                    ).'</a>'.
144
+                    '<a href="group_members.php?id='.$group_id.'&u='.$user['id'].'&action=set_moderator">'.
145 145
                     Display::return_icon(
146 146
                         'social_moderator_add.png',
147 147
                         get_lang('AddModerator')
148
-                    ) . '</a>';
148
+                    ).'</a>';
149 149
             }
150 150
             break;
151 151
         case GROUP_USER_PERMISSION_PENDING_INVITATION:
152
-            $user['link'] = '<a href="group_members.php?id=' . $group_id . '&u=' . $user['id'] . '&action=add">' .
152
+            $user['link'] = '<a href="group_members.php?id='.$group_id.'&u='.$user['id'].'&action=add">'.
153 153
                 Display::return_icon(
154 154
                     'pending_invitation.png',
155 155
                     get_lang('PendingInvitation')
156
-                ) . '</a>';
156
+                ).'</a>';
157 157
             break;
158 158
         case GROUP_USER_PERMISSION_MODERATOR:
159 159
             $user['link'] = Display::return_icon(
@@ -162,17 +162,17 @@  discard block
 block discarded – undo
162 162
             );
163 163
             //only group admin can manage moderators
164 164
             if ($user_role == GROUP_USER_PERMISSION_ADMIN) {
165
-                $user['link'] .= '<a href="group_members.php?id=' . $group_id . '&u=' . $user['id'] . '&action=delete_moderator">'.
165
+                $user['link'] .= '<a href="group_members.php?id='.$group_id.'&u='.$user['id'].'&action=delete_moderator">'.
166 166
                     Display::return_icon(
167 167
                         'social_moderator_delete.png',
168 168
                         get_lang('DeleteModerator')
169
-                    ) . '</a>';
169
+                    ).'</a>';
170 170
             }
171 171
             break;
172 172
     }
173 173
 
174 174
     $userPicture = UserManager::getUserPicture($user['id']);
175
-    $user['image'] = '<img src="' . $userPicture . '"  width="50px" height="50px"  />';
175
+    $user['image'] = '<img src="'.$userPicture.'"  width="50px" height="50px"  />';
176 176
     $new_member_list[] = $user;
177 177
 }
178 178
 if (count($new_member_list) > 0) {
Please login to merge, or discard this patch.
main/social/skills_wheel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
 $url = api_get_path(WEB_AJAX_PATH)."skill.ajax.php?a=get_skills_tree_json&load_user=$userId";
58 58
 $tpl->assign('wheel_url', $url);
59 59
 
60
-$url  = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1';
60
+$url = api_get_path(WEB_AJAX_PATH).'skill.ajax.php?1=1';
61 61
 $tpl->assign('url', $url);
62 62
 
63 63
 $tpl->assign('user_info', $userInfo);
Please login to merge, or discard this patch.
main/permissions/group_permissions.inc.php 3 patches
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -15,27 +15,27 @@  discard block
 block discarded – undo
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
 block discarded – undo
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('&', '&amp;', $_SERVER['REQUEST_URI'])."\">";
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -13,9 +13,9 @@  discard block
 block discarded – undo
13 13
 // ---------------------------------------------------
14 14
 // 			ACTIONS
15 15
 // ---------------------------------------------------
16
-if ($_POST['StoreGroupPermissions'] and $setting_visualisation=='checkbox')
16
+if ($_POST['StoreGroupPermissions'] and $setting_visualisation == 'checkbox')
17 17
 {
18
-	$result_message=store_permissions('group', $group_id);
18
+	$result_message = store_permissions('group', $group_id);
19 19
 	if ($result_message)
20 20
 	{
21 21
 		Display::display_normal_message($result_message);
@@ -23,13 +23,13 @@  discard block
 block discarded – undo
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']))
26
+	if (($_GET['action'] == 'grant' OR $_GET['action'] == 'revoke') AND isset($_GET['permission']) AND isset($_GET['tool']))
27 27
 	{
28
-		$result_message=store_one_permission('group', $_GET['action'], $group_id, $_GET['tool'], $_GET['permission']);
28
+		$result_message = store_one_permission('group', $_GET['action'], $group_id, $_GET['tool'], $_GET['permission']);
29 29
 	}
30
-	if (isset($_GET['role']) AND ($_GET['action']=='grant' OR $_GET['action']=='revoke'))
30
+	if (isset($_GET['role']) AND ($_GET['action'] == 'grant' OR $_GET['action'] == 'revoke'))
31 31
 	{
32
-		$result_message=assign_role('group', $_GET['action'], $group_id, $_GET['role'], $_GET['scope']);
32
+		$result_message = assign_role('group', $_GET['action'], $group_id, $_GET['role'], $_GET['scope']);
33 33
 		echo 'hier';
34 34
 	}
35 35
 }
@@ -41,41 +41,41 @@  discard block
 block discarded – undo
41 41
 // ---------------------------------------------------
42 42
 // 			RETRIEVING THE PERMISSIONS
43 43
 // ---------------------------------------------------
44
-$current_group_permissions=array();
45
-$current_group_permissions=get_permissions('group',$group_id);
44
+$current_group_permissions = array();
45
+$current_group_permissions = get_permissions('group', $group_id);
46 46
 // @todo current group permissions and current role permissions
47 47
 
48 48
 // ---------------------------------------------------
49 49
 //   INHERITED PERMISSIONS (group roles)
50 50
 // ---------------------------------------------------
51
-$group_course_roles_permissions=get_roles_permissions('group',$group_id, 'course');
52
-$group_platform_roles_permissions=get_roles_permissions('group',$group_id, 'platform');
53
-$inherited_permissions=permission_array_merge($group_course_roles_permissions,$group_platform_roles_permissions);
51
+$group_course_roles_permissions = get_roles_permissions('group', $group_id, 'course');
52
+$group_platform_roles_permissions = get_roles_permissions('group', $group_id, 'platform');
53
+$inherited_permissions = permission_array_merge($group_course_roles_permissions, $group_platform_roles_permissions);
54 54
 
55 55
 // ---------------------------------------------------
56 56
 // 			LIMITED OR FULL
57 57
 // ---------------------------------------------------
58
-$current_group_permissions=limited_or_full($current_group_permissions);
59
-$inherited_permissions=limited_or_full($inherited_permissions);
60
-if (api_get_setting('permissions')=='limited')
58
+$current_group_permissions = limited_or_full($current_group_permissions);
59
+$inherited_permissions = limited_or_full($inherited_permissions);
60
+if (api_get_setting('permissions') == 'limited')
61 61
 {
62
-	$header_array=$rights_limited;
62
+	$header_array = $rights_limited;
63 63
 }
64
-if (api_get_setting('permissions')=='full')
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('&', '&amp;', $_SERVER['REQUEST_URI'])."\">";
70 70
 // ---------------------------------------------------
71 71
 // 		DISPLAYING THE ROLES LIST
72 72
 // ---------------------------------------------------
73
-if (api_get_setting('group_roles')=='true')
73
+if (api_get_setting('group_roles') == 'true')
74 74
 {
75 75
 	// the list of the roles for the user
76 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');
77
+	$current_group_course_roles = get_roles('group', $group_id);
78
+	$current_group_platform_roles = get_roles('group', $group_id, 'platform');
79 79
 	display_role_list($current_group_course_roles, $current_group_platform_roles);
80 80
 	echo '<br />';
81 81
 }
@@ -107,17 +107,17 @@  discard block
 block discarded – undo
107 107
 	foreach ($header_array as $key=>$value)
108 108
 	{
109 109
 		echo "\t\t<td align='center'>\n";
110
-		if (in_array($value,$rights))
110
+		if (in_array($value, $rights))
111 111
 		{
112
-			if ($setting_visualisation=='checkbox')
112
+			if ($setting_visualisation == 'checkbox')
113 113
 			{
114 114
 				//display_checkbox_matrix($current_group_permissions, $tool, $value);
115
-				display_checkbox_matrix($current_group_permissions, $tool, $value, $inherited_permissions,$course_admin);
115
+				display_checkbox_matrix($current_group_permissions, $tool, $value, $inherited_permissions, $course_admin);
116 116
 			}
117
-			if ($setting_visualisation=='image')
117
+			if ($setting_visualisation == 'image')
118 118
 			{
119 119
 				//display_image_matrix($current_group_permissions, $tool, $value);
120
-				display_image_matrix($current_group_permissions, $tool, $value,$inherited_permissions, $course_admin);
120
+				display_image_matrix($current_group_permissions, $tool, $value, $inherited_permissions, $course_admin);
121 121
 			}
122 122
 		}
123 123
 		// note: in a later stage this part will be replaced by a function
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 }
131 131
 
132 132
 echo "</table>\n";
133
-if ($setting_visualisation=='checkbox')
133
+if ($setting_visualisation == 'checkbox')
134 134
 {
135 135
 	echo "<input type=\"Submit\" name=\"StoreGroupPermissions\" value=\"".get_lang('StorePermissions')."\">";
136 136
 }
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,9 +97,11 @@
 block discarded – undo
97 97
 echo "\t</tr>\n";
98 98
 
99 99
 // the main area with the checkboxes or images
100
-foreach ($tool_rights as $tool=>$rights) // $tool_rights contains all the possible tools and their rights
100
+foreach ($tool_rights as $tool=>$rights) {
101
+    // $tool_rights contains all the possible tools and their rights
101 102
 {
102 103
 	echo "\t<tr>\n";
104
+}
103 105
 	echo "\t\t<td>\n";
104 106
 	echo get_lang($tool);
105 107
 	echo "\t\t</td>\n";
Please login to merge, or discard this patch.
main/permissions/blog_permissions.inc.php 2 patches
Indentation   +71 added lines, -71 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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('&', '&amp;', $_SERVER['REQUEST_URI'])."\">";
@@ -118,12 +118,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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";
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
 
44 44
 // Remove the blog creater because he has all the rights automatically
45 45
 // and we want to keep it that way.
46
-$tbl_course_rel_user = $table=Database::get_main_table(TABLE_MAIN_COURSE_USER);
46
+$tbl_course_rel_user = $table = Database::get_main_table(TABLE_MAIN_COURSE_USER);
47 47
 $sql = "SELECT user_id
48 48
 		FROM $tbl_course_rel_user
49 49
 		WHERE status = '1' AND c_id = '".api_get_course_int_id()."'";
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
 // ------------------------------------------------------------------
84 84
 // 			RETRIEVING THE PERMISSIONS OF THE ROLES OF THE USER
85 85
 // ------------------------------------------------------------------
86
-if (api_get_setting('user_roles')=='true') {
86
+if (api_get_setting('user_roles') == 'true') {
87 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);
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 90
 	// NOTE: deze array moet nog gemerged worden met de $inherited_permissions array
91 91
 	// (heet momenteel nog $current_group_permissions_of_user omdat voorlopig enkel de
92 92
 	// groepsge�rfde permissions in beschouwing worden genomen
@@ -96,16 +96,16 @@  discard block
 block discarded – undo
96 96
 	// NOTE: checken als de rollen brol wel degelijk geactiveerd is voordat we dit allemaal
97 97
 	// ophalen.
98 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);
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
-if (api_get_setting('group_roles')=='true') {
105
+if (api_get_setting('group_roles') == 'true') {
106 106
 	// NOTE: DIT MOET NOG VERDER UITGEWERKT WORDEN
107 107
 	foreach ($groups_of_user as $group) {
108
-		$this_current_group_role_permissions_of_user=get_roles_permissions('user',$user_id);
108
+		$this_current_group_role_permissions_of_user = get_roles_permissions('user', $user_id);
109 109
 		//$inherited_permissions[$tool][]=$permission;
110 110
 	}
111 111
 }
@@ -116,12 +116,12 @@  discard block
 block discarded – undo
116 116
 // 		DISPLAYING THE ROLES LIST
117 117
 // ---------------------------------------------------
118 118
 
119
-if (api_get_setting('user_roles')=='true')
119
+if (api_get_setting('user_roles') == 'true')
120 120
 {
121 121
 	// the list of the roles for the user
122 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');
123
+	$current_user_course_roles = get_roles('user', $user_id);
124
+	$current_user_platform_roles = get_roles('user', $user_id, 'platform');
125 125
 	display_role_list($current_user_course_roles, $current_user_platform_roles);
126 126
 	echo '<br />';
127 127
 }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 	foreach ($rights_full as $key => $value) {
170 170
 
171 171
 		echo "\t\t<td align='center'>\n";
172
-		if (in_array($value,$rights_blog)) {
172
+		if (in_array($value, $rights_blog)) {
173 173
 			display_image_matrix_for_blogs(
174 174
 				$current_user_permissions,
175 175
 				$user_id,
Please login to merge, or discard this patch.