Completed
Push — master ( 5da9ea...eef579 )
by Angel Fernando Quiroz
50:18 queued 17:36
created
src/Chamilo/CoreBundle/Settings/DisplaySettingsSchema.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -43,8 +43,8 @@
 block discarded – undo
43 43
                     'user_name_order' => '', // ?
44 44
                     'user_name_sort_by' => '', // ?
45 45
                     'use_virtual_keyboard' => '', //?
46
-                    'disable_copy_paste' => '',//?
47
-                    'breadcrumb_navigation_display' => '',//?
46
+                    'disable_copy_paste' => '', //?
47
+                    'breadcrumb_navigation_display' => '', //?
48 48
                     'bug_report_link' => '', //?
49 49
                     'hide_home_top_when_connected' => 'false',
50 50
                     'hide_logout_button' => 'false',
Please login to merge, or discard this patch.
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Basic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -209,7 +209,7 @@
 block discarded – undo
209 209
         return [
210 210
             $this->getNewPageBlock(),
211 211
             ['Undo', 'Redo'],
212
-            ['Link', 'Image', 'Video', 'Oembed','Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
212
+            ['Link', 'Image', 'Video', 'Oembed', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
213 213
             ['BulletedList', 'NumberedList', 'HorizontalRule'],
214 214
             ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
215 215
             ['Styles', 'Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
Please login to merge, or discard this patch.
main/social/home.php 1 patch
Spacing   +32 added lines, -32 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";
@@ -117,9 +117,9 @@  discard block
 block discarded – undo
117 117
             GROUP_IMAGE_SIZE_BIG
118 118
         );
119 119
 
120
-        $result['picture'] = '<img class="img-responsive" src="' . $picture['file'] . '" />';
121
-        $group_actions = '<div class="group-more"><a class="btn btn-default" href="groups.php?#tab_browse-2">' . get_lang('SeeMore') . '</a></div>';
122
-        $group_info= '<div class="description"><p>' . cut($result['description'], 120, true) . "</p></div>";
120
+        $result['picture'] = '<img class="img-responsive" src="'.$picture['file'].'" />';
121
+        $group_actions = '<div class="group-more"><a class="btn btn-default" href="groups.php?#tab_browse-2">'.get_lang('SeeMore').'</a></div>';
122
+        $group_info = '<div class="description"><p>'.cut($result['description'], 120, true)."</p></div>";
123 123
         $groups_newest[] = array(
124 124
             Display::url(
125 125
                 $result['picture'],
@@ -146,9 +146,9 @@  discard block
 block discarded – undo
146 146
     $group_url = "group_view.php?id=$id";
147 147
 
148 148
     if ($result['count'] == 1) {
149
-        $result['count'] = '1 ' . get_lang('Member');
149
+        $result['count'] = '1 '.get_lang('Member');
150 150
     } else {
151
-        $result['count'] = $result['count'] . ' ' . get_lang('Members');
151
+        $result['count'] = $result['count'].' '.get_lang('Members');
152 152
     }
153 153
     $result['name'] = '<div class="group-name">'.Display::url(
154 154
             api_ucwords(cut($result['name'], 40, true)), $group_url)
@@ -160,42 +160,42 @@  discard block
 block discarded – undo
160 160
         null,
161 161
         GROUP_IMAGE_SIZE_BIG
162 162
     );
163
-    $result['picture_uri'] = '<img class="img-responsive" src="' . $picture['file'] . '" />';
164
-    $group_actions = '<div class="group-more"><a class="btn btn-default" href="groups.php?#tab_browse-3">' . get_lang('SeeMore') . '</a></div>';
165
-    $group_info= '<div class="description"><p>' . cut($result['description'], 120, true) . "</p></div>";
163
+    $result['picture_uri'] = '<img class="img-responsive" src="'.$picture['file'].'" />';
164
+    $group_actions = '<div class="group-more"><a class="btn btn-default" href="groups.php?#tab_browse-3">'.get_lang('SeeMore').'</a></div>';
165
+    $group_info = '<div class="description"><p>'.cut($result['description'], 120, true)."</p></div>";
166 166
     $groups_pop[] = array(
167 167
         Display::url($result['picture_uri'], $group_url),
168
-        $result['name'],$group_info. $group_actions
168
+        $result['name'], $group_info.$group_actions
169 169
     );
170 170
 }
171 171
 
172
-$list=count($groups_newest);
172
+$list = count($groups_newest);
173 173
 $social_group_block = null;
174 174
 if ($list > 0) {
175 175
     $social_group_block .= '<div class="list-group-newest">';
176
-    $social_group_block .= '<div class="group-title">' . get_lang('Newest') . '</div>';
176
+    $social_group_block .= '<div class="group-title">'.get_lang('Newest').'</div>';
177 177
     for ($i = 0; $i < $list; $i++) {
178
-        $social_group_block.='<div class="row">';
179
-        $social_group_block.='<div class="col-md-3">' . $groups_newest[$i][0] . '</div>';
180
-        $social_group_block.='<div class="col-md-9">' . $groups_newest[$i][1];
181
-        $social_group_block.= $groups_newest[$i][2] . '</div>';
182
-        $social_group_block.="</div>";
178
+        $social_group_block .= '<div class="row">';
179
+        $social_group_block .= '<div class="col-md-3">'.$groups_newest[$i][0].'</div>';
180
+        $social_group_block .= '<div class="col-md-9">'.$groups_newest[$i][1];
181
+        $social_group_block .= $groups_newest[$i][2].'</div>';
182
+        $social_group_block .= "</div>";
183 183
     }
184
-    $social_group_block.= "</div>";
184
+    $social_group_block .= "</div>";
185 185
 }
186
-$list=count($groups_pop);
186
+$list = count($groups_pop);
187 187
 if ($list > 0) {
188 188
     $social_group_block .= '<div class="list-group-newest">';
189
-    $social_group_block .= '<div class="group-title">' . get_lang('Popular') . '</div>';
189
+    $social_group_block .= '<div class="group-title">'.get_lang('Popular').'</div>';
190 190
 
191 191
     for ($i = 0; $i < $list; $i++) {
192
-        $social_group_block.='<div class="row">';
193
-        $social_group_block.='<div class="col-md-3">' . $groups_pop[$i][0] . '</div>';
194
-        $social_group_block.='<div class="col-md-9">' . $groups_pop[$i][1];
195
-        $social_group_block.= $groups_pop[$i][2] . '</div>';
196
-        $social_group_block.="</div>";
192
+        $social_group_block .= '<div class="row">';
193
+        $social_group_block .= '<div class="col-md-3">'.$groups_pop[$i][0].'</div>';
194
+        $social_group_block .= '<div class="col-md-9">'.$groups_pop[$i][1];
195
+        $social_group_block .= $groups_pop[$i][2].'</div>';
196
+        $social_group_block .= "</div>";
197 197
     }
198
-    $social_group_block.= "</div>";
198
+    $social_group_block .= "</div>";
199 199
 }
200 200
 // My friends
201 201
 $friend_html = SocialManager::listMyFriendsBlock(
Please login to merge, or discard this patch.
main/admin/add_users_to_usergroup.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -18,8 +18,8 @@  discard block
 block discarded – undo
18 18
 api_protect_admin_script(true);
19 19
 
20 20
 // setting breadcrumbs
21
-$interbreadcrumb[]= array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
22
-$interbreadcrumb[]= array('url' => 'usergroups.php','name' => get_lang('Classes'));
21
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
22
+$interbreadcrumb[] = array('url' => 'usergroups.php', 'name' => get_lang('Classes'));
23 23
 
24 24
 // Database Table Definitions
25 25
 
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
 </script>';
92 92
 
93
-$form_sent  = 0;
93
+$form_sent = 0;
94 94
 
95 95
 $extra_field_list = UserManager::get_extra_fields();
96 96
 $new_field_list = array();
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
         foreach ($users as $user) {
145 145
             $data[] = array($user['username'], $groupInfo['name']);
146 146
         }
147
-        $filename = 'export_user_class_' . api_get_local_time();
147
+        $filename = 'export_user_class_'.api_get_local_time();
148 148
         Export::arrayToCsv($data, $filename);
149 149
         exit;
150 150
     }
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         foreach ($new_field_list as $new_field) {
158 158
             $varname = 'field_'.$new_field['variable'];
159 159
             if (UserManager::is_extra_field_available($new_field['variable'])) {
160
-                if (isset($_POST[$varname]) && $_POST[$varname]!='0') {
160
+                if (isset($_POST[$varname]) && $_POST[$varname] != '0') {
161 161
                     $use_extra_fields = true;
162 162
                     $extra_field_result[] = UserManager::get_extra_user_data_by_value(
163 163
                         $new_field['variable'],
@@ -171,10 +171,10 @@  discard block
 block discarded – undo
171 171
 
172 172
 if ($use_extra_fields) {
173 173
     $final_result = array();
174
-    if (count($extra_field_result)>1) {
175
-        for ($i=0; $i<count($extra_field_result)-1; $i++) {
176
-            if (is_array($extra_field_result[$i+1])) {
177
-                $final_result = array_intersect($extra_field_result[$i], $extra_field_result[$i+1]);
174
+    if (count($extra_field_result) > 1) {
175
+        for ($i = 0; $i < count($extra_field_result) - 1; $i++) {
176
+            if (is_array($extra_field_result[$i + 1])) {
177
+                $final_result = array_intersect($extra_field_result[$i], $extra_field_result[$i + 1]);
178 178
             }
179 179
         }
180 180
     } else {
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 
194 194
 $searchForm = new FormValidator('search', 'get', api_get_self().'?id='.$id);
195 195
 $searchForm->addHeader(get_lang('AdvancedSearch'));
196
-$renderer =& $searchForm->defaultRenderer();
196
+$renderer = & $searchForm->defaultRenderer();
197 197
 
198 198
 $searchForm->addElement('hidden', 'id', $id);
199 199
 foreach ($filters as $param) {
@@ -341,12 +341,12 @@  discard block
 block discarded – undo
341 341
 $searchForm->display();
342 342
 echo '</div>';
343 343
 ?>
344
-<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if(!empty($_GET['add'])) echo '&add=true' ; ?>" style="margin:0px;">
344
+<form name="formulaire" method="post" action="<?php echo api_get_self(); ?>?id=<?php echo $id; if (!empty($_GET['add'])) echo '&add=true'; ?>" style="margin:0px;">
345 345
 <?php
346 346
 echo '<legend>'.$tool_name.': '.$data['name'].'</legend>';
347 347
 
348 348
 if (is_array($extra_field_list)) {
349
-    if (is_array($new_field_list) && count($new_field_list)>0) {
349
+    if (is_array($new_field_list) && count($new_field_list) > 0) {
350 350
         echo '<h3>'.get_lang('FilterByUser').'</h3>';
351 351
         foreach ($new_field_list as $new_field) {
352 352
             echo $new_field['name'];
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
             echo '&nbsp;<select name="'.$varname.'">';
355 355
             echo '<option value="0">--'.get_lang('Select').'--</option>';
356 356
             foreach ($new_field['data'] as $option) {
357
-                $checked='';
357
+                $checked = '';
358 358
                 if (isset($_POST[$varname])) {
359 359
                     if ($_POST[$varname] == $option[1]) {
360 360
                         $checked = 'selected="true"';
@@ -380,15 +380,15 @@  discard block
 block discarded – undo
380 380
         <?php if ($data['group_type'] == UserGroup::SOCIAL_CLASS) { ?>
381 381
         <select name="relation" id="relation">
382 382
             <option value=""><?php echo get_lang('SelectARelationType')?></option>
383
-            <option value="<?php echo GROUP_USER_PERMISSION_ADMIN ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_ADMIN)?'selected=selected':'') ?> >
383
+            <option value="<?php echo GROUP_USER_PERMISSION_ADMIN ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_ADMIN) ? 'selected=selected' : '') ?> >
384 384
                 <?php echo get_lang('Admin') ?></option>
385
-            <option value="<?php echo GROUP_USER_PERMISSION_READER ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_READER)?'selected=selected':'') ?> >
385
+            <option value="<?php echo GROUP_USER_PERMISSION_READER ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_READER) ? 'selected=selected' : '') ?> >
386 386
                 <?php echo get_lang('Reader') ?></option>
387
-            <option value="<?php echo GROUP_USER_PERMISSION_PENDING_INVITATION ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_PENDING_INVITATION)?'selected=selected':'') ?> >
387
+            <option value="<?php echo GROUP_USER_PERMISSION_PENDING_INVITATION ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_PENDING_INVITATION) ? 'selected=selected' : '') ?> >
388 388
                 <?php echo get_lang('PendingInvitation') ?></option>
389
-            <option value="<?php echo GROUP_USER_PERMISSION_MODERATOR ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_MODERATOR)?'selected=selected':'') ?> >
389
+            <option value="<?php echo GROUP_USER_PERMISSION_MODERATOR ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_MODERATOR) ? 'selected=selected' : '') ?> >
390 390
                 <?php echo get_lang('Moderator') ?></option>
391
-            <option value="<?php echo GROUP_USER_PERMISSION_HRM ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_HRM)?'selected=selected':'') ?> >
391
+            <option value="<?php echo GROUP_USER_PERMISSION_HRM ?>" <?php echo ((isset($relation) && $relation == GROUP_USER_PERMISSION_HRM) ? 'selected=selected' : '') ?> >
392 392
                 <?php echo get_lang('Drh') ?></option>
393 393
         </select>
394 394
         <?php } ?>
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
     ?>
420 420
     <br />
421 421
       <label class="control-label">
422
-          <input type="checkbox" <?php if ($user_with_any_group) echo 'checked="checked"';?> onchange="checked_in_no_group(this.checked);" name="user_with_any_group" id="user_with_any_group_id">
422
+          <input type="checkbox" <?php if ($user_with_any_group) echo 'checked="checked"'; ?> onchange="checked_in_no_group(this.checked);" name="user_with_any_group" id="user_with_any_group_id">
423 423
           <?php echo get_lang('UsersRegisteredInAnyGroup'); ?>
424 424
       </label>
425 425
     </div>
Please login to merge, or discard this patch.
main/lp/lp_build.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -24,8 +24,8 @@  discard block
 block discarded – undo
24 24
 $tbl_lp_item = Database::get_course_table(TABLE_LP_ITEM);
25 25
 $tbl_lp_view = Database::get_course_table(TABLE_LP_VIEW);
26 26
 
27
-$isStudentView = (int)$_REQUEST['isStudentView'];
28
-$learnpath_id = (int)$_REQUEST['lp_id'];
27
+$isStudentView = (int) $_REQUEST['isStudentView'];
28
+$learnpath_id = (int) $_REQUEST['lp_id'];
29 29
 $submit = $_POST['submit_button'];
30 30
 
31 31
 /* MAIN CODE */
@@ -65,8 +65,8 @@  discard block
 block discarded – undo
65 65
 }
66 66
 
67 67
 if (!empty($gradebook) && $gradebook == 'view') {
68
-    $interbreadcrumb[] = array (
69
-        'url' => '../gradebook/' . $_SESSION['gradebook_dest'],
68
+    $interbreadcrumb[] = array(
69
+        'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
70 70
         'name' => get_lang('ToolGradebook')
71 71
     );
72 72
 }
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 $interbreadcrumb[] = array('url' => '#', "name" => $therow['name']);
75 75
 
76 76
 // Theme calls.
77
-$lp_theme_css=$_SESSION['oLP']->get_theme();
77
+$lp_theme_css = $_SESSION['oLP']->get_theme();
78 78
 $show_learn_path = true;
79 79
 Display::display_header('', 'Path');
80 80
 $suredel = trim(get_lang('AreYouSureToDeleteJS'));
@@ -143,15 +143,15 @@  discard block
 block discarded – undo
143 143
 
144 144
 function show_block($link, $title, $subtitle, $icon) {
145 145
     $html = '<li class="col-md-4">';
146
-    $html .=  '<div class="thumbnail">';
147
-    $html .=  '<a href="'.$link.'" title="'.$title.'">';
148
-    $html .=  Display::return_icon($icon, $title, array(), ICON_SIZE_BIG);
149
-    $html .=  '</a>';
150
-    $html .=  '<div class="caption">';
151
-    $html .=  '<strong>'.$title.'</strong></a> '.$subtitle;
152
-    $html .=  '</div>';
153
-    $html .=  '</div>';
154
-    $html .=  '</li>';
146
+    $html .= '<div class="thumbnail">';
147
+    $html .= '<a href="'.$link.'" title="'.$title.'">';
148
+    $html .= Display::return_icon($icon, $title, array(), ICON_SIZE_BIG);
149
+    $html .= '</a>';
150
+    $html .= '<div class="caption">';
151
+    $html .= '<strong>'.$title.'</strong></a> '.$subtitle;
152
+    $html .= '</div>';
153
+    $html .= '</div>';
154
+    $html .= '</li>';
155 155
     return $html;
156 156
 }
157 157
 
Please login to merge, or discard this patch.
main/exercise/export/exercise_import.inc.php 1 patch
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     global $questionTempDir;
70 70
     global $resourcesLinks;
71 71
 
72
-    $baseWorkDir = api_get_path(SYS_ARCHIVE_PATH) . 'qti2';
72
+    $baseWorkDir = api_get_path(SYS_ARCHIVE_PATH).'qti2';
73 73
 
74 74
     if (!is_dir($baseWorkDir)) {
75 75
         mkdir($baseWorkDir, api_get_permissions_for_new_directories(), true);
@@ -111,35 +111,35 @@  discard block
 block discarded – undo
111 111
     // The assets-related code is a bit fragile as it has to deal with files renamed by Chamilo and it only works if
112 112
     // the imsmanifest.xml file is read.
113 113
     while (false !== ($file = readdir($exerciseHandle))) {
114
-        if (is_dir($baseWorkDir . '/' . $file) && $file != "." && $file != "..") {
114
+        if (is_dir($baseWorkDir.'/'.$file) && $file != "." && $file != "..") {
115 115
             // Find each manifest for each question repository found
116
-            $questionHandle = opendir($baseWorkDir . '/' . $file);
116
+            $questionHandle = opendir($baseWorkDir.'/'.$file);
117 117
             // Only analyse one level of subdirectory - no recursivity here
118 118
             while (false !== ($questionFile = readdir($questionHandle))) {
119 119
                 if (preg_match('/.xml$/i', $questionFile)) {
120
-                    $isQti = isQtiQuestionBank($baseWorkDir . '/' . $file . '/' . $questionFile);
120
+                    $isQti = isQtiQuestionBank($baseWorkDir.'/'.$file.'/'.$questionFile);
121 121
                     if ($isQti) {
122 122
                         $result = qti_parse_file($baseWorkDir, $file, $questionFile);
123
-                        $filePath = $baseWorkDir . $file;
123
+                        $filePath = $baseWorkDir.$file;
124 124
                         $file_found = true;
125 125
                     } else {
126
-                        $isManifest = isQtiManifest($baseWorkDir . '/' . $file . '/' . $questionFile);
126
+                        $isManifest = isQtiManifest($baseWorkDir.'/'.$file.'/'.$questionFile);
127 127
                         if ($isManifest) {
128
-                            $resourcesLinks = qtiProcessManifest($baseWorkDir . '/' . $file . '/' . $questionFile);
128
+                            $resourcesLinks = qtiProcessManifest($baseWorkDir.'/'.$file.'/'.$questionFile);
129 129
                         }
130 130
                     }
131 131
                 }
132 132
             }
133 133
         } elseif (preg_match('/.xml$/i', $file)) {
134
-            $isQti = isQtiQuestionBank($baseWorkDir . '/' . $file);
134
+            $isQti = isQtiQuestionBank($baseWorkDir.'/'.$file);
135 135
             if ($isQti) {
136 136
                 $result = qti_parse_file($baseWorkDir, '', $file);
137
-                $filePath = $baseWorkDir . '/' . $file;
137
+                $filePath = $baseWorkDir.'/'.$file;
138 138
                 $file_found = true;
139 139
             } else {
140
-                $isManifest = isQtiManifest($baseWorkDir . '/' . $file);
140
+                $isManifest = isQtiManifest($baseWorkDir.'/'.$file);
141 141
                 if ($isManifest) {
142
-                    $resourcesLinks = qtiProcessManifest($baseWorkDir . '/' . $file);
142
+                    $resourcesLinks = qtiProcessManifest($baseWorkDir.'/'.$file);
143 143
                 }
144 144
             }
145 145
 
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
             $question->setAnswer();
180 180
             $description = '';
181 181
             if (strlen($question_array['title']) < 50) {
182
-                $question->updateTitle(formatText(strip_tags($question_array['title'])) . '...');
182
+                $question->updateTitle(formatText(strip_tags($question_array['title'])).'...');
183 183
             } else {
184 184
                 $question->updateTitle(formatText(substr(strip_tags($question_array['title']), 0, 50)));
185 185
                 $description .= $question_array['title'];
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
         }
250 250
 
251 251
         // delete the temp dir where the exercise was unzipped
252
-        my_delete($baseWorkDir . $uploadPath);
252
+        my_delete($baseWorkDir.$uploadPath);
253 253
         return $last_exercise_id;
254 254
     }
255 255
 
@@ -277,8 +277,8 @@  discard block
 block discarded – undo
277 277
     global $record_item_body;
278 278
     global $questionTempDir;
279 279
 
280
-    $questionTempDir = $exercisePath . '/' . $file . '/';
281
-    $questionFilePath = $questionTempDir . $questionFile;
280
+    $questionTempDir = $exercisePath.'/'.$file.'/';
281
+    $questionFilePath = $questionTempDir.$questionFile;
282 282
 
283 283
     if (!($fp = fopen($questionFilePath, 'r'))) {
284 284
         Display::addFlash(Display::return_message(get_lang('Error opening question\'s XML file'), 'error'));
@@ -333,7 +333,7 @@  discard block
 block discarded – undo
333 333
         $error = xml_get_error_code();
334 334
         Display::addFlash(
335 335
             Display::return_message(
336
-                get_lang('Error reading XML file') . sprintf('[%d:%d]', xml_get_current_line_number($xml_parser), xml_get_current_column_number($xml_parser)),
336
+                get_lang('Error reading XML file').sprintf('[%d:%d]', xml_get_current_line_number($xml_parser), xml_get_current_column_number($xml_parser)),
337 337
                 'error'
338 338
             )
339 339
         );
@@ -393,9 +393,9 @@  discard block
 block discarded – undo
393 393
 
394 394
     if ($record_item_body) {
395 395
         if ((!in_array($current_element, $non_HTML_tag_to_avoid))) {
396
-            $current_question_item_body .= "<" . $name;
396
+            $current_question_item_body .= "<".$name;
397 397
             foreach ($attributes as $attribute_name => $attribute_value) {
398
-                $current_question_item_body .= " " . $attribute_name . "=\"" . $attribute_value . "\"";
398
+                $current_question_item_body .= " ".$attribute_name."=\"".$attribute_value."\"";
399 399
             }
400 400
             $current_question_item_body .= ">";
401 401
         } else {
@@ -403,11 +403,11 @@  discard block
 block discarded – undo
403 403
             //we first save with claroline tags ,then when the answer will be parsed, the claroline tags will be replaced
404 404
 
405 405
             if ($current_element == 'INLINECHOICEINTERACTION') {
406
-                $current_question_item_body .= "**claroline_start**" . $attributes['RESPONSEIDENTIFIER'] . "**claroline_end**";
406
+                $current_question_item_body .= "**claroline_start**".$attributes['RESPONSEIDENTIFIER']."**claroline_end**";
407 407
             }
408 408
             if ($current_element == 'TEXTENTRYINTERACTION') {
409 409
                 $correct_answer_value = $exercise_info['question'][$current_question_ident]['correct_answers'][$current_answer_id];
410
-                $current_question_item_body .= "[" . $correct_answer_value . "]";
410
+                $current_question_item_body .= "[".$correct_answer_value."]";
411 411
 
412 412
             }
413 413
             if ($current_element == 'BR') {
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
     //treat the record of the full content of itembody tag :
542 542
 
543 543
     if ($record_item_body && (!in_array($current_element, $non_HTML_tag_to_avoid))) {
544
-        $current_question_item_body .= "</" . $name . ">";
544
+        $current_question_item_body .= "</".$name.">";
545 545
     }
546 546
 
547 547
     switch ($name) {
@@ -604,14 +604,14 @@  discard block
 block discarded – undo
604 604
             if (!isset ($exercise_info['question'][$current_question_ident]['answer'][$current_answer_id]['value'])) {
605 605
                 $exercise_info['question'][$current_question_ident]['answer'][$current_answer_id]['value'] = trim($data);
606 606
             } else {
607
-                $exercise_info['question'][$current_question_ident]['answer'][$current_answer_id]['value'] .= '' . trim($data);
607
+                $exercise_info['question'][$current_question_ident]['answer'][$current_answer_id]['value'] .= ''.trim($data);
608 608
             }
609 609
             break;
610 610
         case 'FEEDBACKINLINE':
611 611
             if (!isset ($exercise_info['question'][$current_question_ident]['answer'][$current_answer_id]['feedback'])) {
612 612
                 $exercise_info['question'][$current_question_ident]['answer'][$current_answer_id]['feedback'] = trim($data);
613 613
             } else {
614
-                $exercise_info['question'][$current_question_ident]['answer'][$current_answer_id]['feedback'] .= ' ' . trim($data);
614
+                $exercise_info['question'][$current_question_ident]['answer'][$current_answer_id]['feedback'] .= ' '.trim($data);
615 615
             }
616 616
             break;
617 617
         case 'SIMPLEASSOCIABLECHOICE':
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
             // $resourcesLinks is only defined by qtiProcessManifest()
632 632
             if (isset($resourcesLinks) && isset($resourcesLinks['manifest']) && isset($resourcesLinks['web'])) {
633 633
                 foreach ($resourcesLinks['manifest'] as $key => $value) {
634
-                    $data = preg_replace('|' . $value . '|', $resourcesLinks['web'][$key], $data);
634
+                    $data = preg_replace('|'.$value.'|', $resourcesLinks['web'][$key], $data);
635 635
                 }
636 636
             }
637 637
             $current_question_item_body .= $data;
@@ -641,8 +641,8 @@  discard block
 block discarded – undo
641 641
             $answer_identifier = $exercise_info['question'][$current_question_ident]['correct_answers'][$current_answer_id];
642 642
             if ($current_inlinechoice_id == $answer_identifier) {
643 643
                 $current_question_item_body = str_replace(
644
-                    "**claroline_start**" . $current_answer_id . "**claroline_end**",
645
-                    "[" . $data . "]",
644
+                    "**claroline_start**".$current_answer_id."**claroline_end**",
645
+                    "[".$data."]",
646 646
                     $current_question_item_body
647 647
                 );
648 648
             } else {
@@ -708,20 +708,20 @@  discard block
 block discarded – undo
708 708
 
709 709
     if ($record_item_body) {
710 710
         if ((!in_array($current_element, $non_HTML_tag_to_avoid))) {
711
-            $current_question_item_body .= "<" . $name;
711
+            $current_question_item_body .= "<".$name;
712 712
             foreach ($attributes as $attribute_name => $attribute_value) {
713
-                $current_question_item_body .= " " . $attribute_name . "=\"" . $attribute_value . "\"";
713
+                $current_question_item_body .= " ".$attribute_name."=\"".$attribute_value."\"";
714 714
             }
715 715
             $current_question_item_body .= ">";
716 716
         } else {
717 717
             //in case of FIB question, we replace the IMS-QTI tag b y the correct answer between "[" "]",
718 718
             //we first save with claroline tags ,then when the answer will be parsed, the claroline tags will be replaced
719 719
             if ($current_element == 'INLINECHOICEINTERACTION') {
720
-                $current_question_item_body .= "**claroline_start**" . $attributes['RESPONSEIDENTIFIER'] . "**claroline_end**";
720
+                $current_question_item_body .= "**claroline_start**".$attributes['RESPONSEIDENTIFIER']."**claroline_end**";
721 721
             }
722 722
             if ($current_element == 'TEXTENTRYINTERACTION') {
723 723
                 $correct_answer_value = $exercise_info['question'][$current_question_ident]['correct_answers'][$current_answer_id];
724
-                $current_question_item_body .= "[" . $correct_answer_value . "]";
724
+                $current_question_item_body .= "[".$correct_answer_value."]";
725 725
 
726 726
             }
727 727
             if ($current_element == 'BR') {
@@ -840,7 +840,7 @@  discard block
 block discarded – undo
840 840
     //treat the record of the full content of itembody tag :
841 841
 
842 842
     if ($record_item_body && (!in_array($current_element, $non_HTML_tag_to_avoid))) {
843
-        $current_question_item_body .= "</" . $name . ">";
843
+        $current_question_item_body .= "</".$name.">";
844 844
     }
845 845
 
846 846
     switch ($name) {
@@ -957,7 +957,7 @@  discard block
 block discarded – undo
957 957
             // $resourcesLinks is only defined by qtiProcessManifest()
958 958
             if (isset($resourcesLinks) && isset($resourcesLinks['manifest']) && isset($resourcesLinks['web'])) {
959 959
                 foreach ($resourcesLinks['manifest'] as $key => $value) {
960
-                    $data = preg_replace('|' . $value . '|', $resourcesLinks['web'][$key], $data);
960
+                    $data = preg_replace('|'.$value.'|', $resourcesLinks['web'][$key], $data);
961 961
                 }
962 962
             }
963 963
             if (!empty($current_question_item_body)) {
@@ -1032,9 +1032,9 @@  discard block
 block discarded – undo
1032 1032
     $sessionId = api_get_session_id();
1033 1033
     $courseDir = $course['path'];
1034 1034
     $sysPath = api_get_path(SYS_COURSE_PATH);
1035
-    $exercisesSysPath = $sysPath . $courseDir . '/document/';
1035
+    $exercisesSysPath = $sysPath.$courseDir.'/document/';
1036 1036
     $webPath = api_get_path(WEB_CODE_PATH);
1037
-    $exercisesWebPath = $webPath . 'document/document.php?' . api_get_cidreq() . '&action=download&id=';
1037
+    $exercisesWebPath = $webPath.'document/document.php?'.api_get_cidreq().'&action=download&id=';
1038 1038
     $links = array(
1039 1039
         'manifest' => array(),
1040 1040
         'system' => array(),
@@ -1042,7 +1042,7 @@  discard block
 block discarded – undo
1042 1042
     );
1043 1043
     $tableDocuments = Database::get_course_table(TABLE_DOCUMENT);
1044 1044
     $countResources = count($xml->resources->resource->file);
1045
-    for ($i=0; $i < $countResources; $i++) {
1045
+    for ($i = 0; $i < $countResources; $i++) {
1046 1046
         $file = $xml->resources->resource->file[$i];
1047 1047
         $href = '';
1048 1048
         foreach ($file->attributes() as $key => $value) {
@@ -1054,21 +1054,21 @@  discard block
 block discarded – undo
1054 1054
         }
1055 1055
         if (!empty($href)) {
1056 1056
             $links['manifest'][] = (string) $href;
1057
-            $links['system'][] = $exercisesSysPath . strtolower($href);
1057
+            $links['system'][] = $exercisesSysPath.strtolower($href);
1058 1058
             $specialHref = Database::escape_string(preg_replace('/_/', '-', strtolower($href)));
1059 1059
             $specialHref = preg_replace('/(-){2,8}/', '-', $specialHref);
1060 1060
 
1061
-            $sql = "SELECT iid FROM " . $tableDocuments . " 
1061
+            $sql = "SELECT iid FROM ".$tableDocuments." 
1062 1062
                     WHERE
1063
-                        c_id = " . $course['real_id'] . " AND 
1063
+                        c_id = " . $course['real_id']." AND 
1064 1064
                         session_id = $sessionId AND 
1065
-                        path = '/" . $specialHref . "'";
1065
+                        path = '/".$specialHref."'";
1066 1066
             $result = Database::query($sql);
1067 1067
             $documentId = 0;
1068 1068
             while ($row = Database::fetch_assoc($result)) {
1069 1069
                 $documentId = $row['iid'];
1070 1070
             }
1071
-            $links['web'][] = $exercisesWebPath . $documentId;
1071
+            $links['web'][] = $exercisesWebPath.$documentId;
1072 1072
         }
1073 1073
     }
1074 1074
     return $links;
Please login to merge, or discard this patch.
main/admin/user_export.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -29,16 +29,16 @@  discard block
 block discarded – undo
29 29
 
30 30
 $coursesSessions = array_merge($coursesSessions, $allCoursesFromSessions);
31 31
 
32
-$courses = array ();
32
+$courses = array();
33 33
 $courses[''] = '--';
34 34
 $sql = "SELECT code,visual_code,title FROM $course_table ORDER BY visual_code";
35 35
 
36 36
 global $_configuration;
37 37
 
38 38
 if (api_is_multiple_url_enabled()) {
39
-	$tbl_course_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
39
+	$tbl_course_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_COURSE);
40 40
 	$access_url_id = api_get_current_access_url_id();
41
-	if ($access_url_id != -1){
41
+	if ($access_url_id != -1) {
42 42
 	$sql = "SELECT code,visual_code,title
43 43
 		FROM $course_table as c
44 44
 		INNER JOIN $tbl_course_rel_access_url as course_rel_url
@@ -53,11 +53,11 @@  discard block
 block discarded – undo
53 53
 }
54 54
 $form = new FormValidator('export_users');
55 55
 $form->addElement('header', $tool_name);
56
-$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'XML','xml');
56
+$form->addElement('radio', 'file_type', get_lang('OutputFileType'), 'XML', 'xml');
57 57
 $form->addElement('radio', 'file_type', null, 'CSV', 'csv');
58 58
 $form->addElement('radio', 'file_type', null, 'XLS', 'xls');
59 59
 
60
-$form->addElement('checkbox', 'addcsvheader', get_lang('AddCSVHeader'), get_lang('YesAddCSVHeader'),'1');
60
+$form->addElement('checkbox', 'addcsvheader', get_lang('AddCSVHeader'), get_lang('YesAddCSVHeader'), '1');
61 61
 $form->addElement('select', 'course_code', get_lang('OnlyUsersFromCourse'), $courses);
62 62
 $form->addElement('select', 'course_session', get_lang('OnlyUsersFromCourseSession'), $coursesSessions);
63 63
 $form->addButtonExport(get_lang('Export'));
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 	if (is_array($courseSessionValue) && isset($courseSessionValue[1])) {
80 80
         $courseSessionCode = $courseSessionValue[0];
81 81
         $sessionId = $courseSessionValue[1];
82
-        $courseSessionInfo= api_get_course_info($courseSessionCode);
82
+        $courseSessionInfo = api_get_course_info($courseSessionCode);
83 83
         $courseSessionId = $courseSessionInfo['real_id'];
84 84
         $sessionInfo = api_get_session_info($sessionId);
85 85
     }
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 				u.firstname 	AS FirstName,
91 91
 				u.email 		AS Email,
92 92
 				u.username	AS UserName,
93
-				".(($_configuration['password_encryption']!='none')?" ":"u.password AS Password, ")."
93
+				".(($_configuration['password_encryption'] != 'none') ? " " : "u.password AS Password, ")."
94 94
 				u.auth_source	AS AuthSource,
95 95
 				u.status		AS Status,
96 96
 				u.official_code	AS OfficialCode,
@@ -113,10 +113,10 @@  discard block
 block discarded – undo
113 113
         $filename = 'export_users_'.$courseSessionCode.'_'.$sessionInfo['name'].'_'.api_get_local_time();
114 114
     } else {
115 115
 		if (api_is_multiple_url_enabled()) {
116
-			$tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
116
+			$tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
117 117
 			$access_url_id = api_get_current_access_url_id();
118 118
 			if ($access_url_id != -1) {
119
-			$sql.= " FROM $user_table u
119
+			$sql .= " FROM $user_table u
120 120
 					INNER JOIN $tbl_user_rel_access_url as user_rel_url
121 121
 				ON (u.user_id= user_rel_url.user_id)
122 122
 				WHERE access_url_id = $access_url_id
@@ -128,8 +128,8 @@  discard block
 block discarded – undo
128 128
 		$filename = 'export_users_'.api_get_local_time();
129 129
 	}
130 130
 	$data = array();
131
-	$extra_fields = UserManager::get_extra_fields(0, 0, 5, 'ASC',false);
132
-	if ($export['addcsvheader']=='1' AND $export['file_type']=='csv') {
131
+	$extra_fields = UserManager::get_extra_fields(0, 0, 5, 'ASC', false);
132
+	if ($export['addcsvheader'] == '1' AND $export['file_type'] == 'csv') {
133 133
 		if ($_configuration['password_encryption'] != 'none') {
134 134
 			$data[] = array(
135 135
 				'UserId',
@@ -157,27 +157,27 @@  discard block
 block discarded – undo
157 157
 			);
158 158
 		}
159 159
 
160
-		foreach($extra_fields as $extra) {
161
-			$data[0][]=$extra[1];
160
+		foreach ($extra_fields as $extra) {
161
+			$data[0][] = $extra[1];
162 162
 		}
163 163
 	}
164 164
 
165 165
 	$res = Database::query($sql);
166
-	while($user = Database::fetch_array($res,'ASSOC')) {
166
+	while ($user = Database::fetch_array($res, 'ASSOC')) {
167 167
 		$student_data = UserManager:: get_extra_user_data(
168 168
 			$user['UserId'],
169 169
 			true,
170 170
 			false
171 171
 		);
172
-		foreach($student_data as $key=>$value) {
172
+		foreach ($student_data as $key=>$value) {
173 173
 			$key = substr($key, 6);
174 174
 			if (is_array($value)) {
175
-				$user[$key] = $value['extra_' . $key];
175
+				$user[$key] = $value['extra_'.$key];
176 176
 			} else {
177 177
 				$user[$key] = $value;
178 178
 			}
179 179
 		}
180
-		$data[] = $user	;
180
+		$data[] = $user;
181 181
 	}
182 182
 
183 183
 	switch ($file_type) {
Please login to merge, or discard this patch.
main/lp/lp_view_item.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
 
20 20
 if (isset($_GET['lp_item_id'])) {
21 21
     // Get parameter only came from lp_view.php.
22
-    $lp_item_id  = intval($_GET['lp_item_id']);
22
+    $lp_item_id = intval($_GET['lp_item_id']);
23 23
     if (isset($_SESSION['lpobject'])) {
24 24
         $oLP = unserialize($_SESSION['lpobject']);
25 25
     }
@@ -69,12 +69,12 @@  discard block
 block discarded – undo
69 69
 $course_id = api_get_course_int_id();
70 70
 $sql = "SELECT * FROM $tbl_lp 
71 71
         WHERE c_id = $course_id AND id = $learnpath_id";
72
-$result=Database::query($sql);
72
+$result = Database::query($sql);
73 73
 $therow = Database::fetch_array($result);
74 74
 
75 75
 /* SHOWING THE ADMIN TOOLS	*/
76 76
 if (api_is_in_gradebook()) {
77
-    $interbreadcrumb[] = array (
77
+    $interbreadcrumb[] = array(
78 78
         'url' => api_get_path(WEB_CODE_PATH).'gradebook/index.php?'.api_get_cidreq(),
79 79
         'name' => get_lang('ToolGradebook')
80 80
     );
Please login to merge, or discard this patch.
main/exercise/tests_category.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 {
201 201
     $action = Security::remove_XSS($action);
202 202
     // initiate the object
203
-    $form = new FormValidator('note', 'post', api_get_self() . '?action=' . $action.'&'.api_get_cidreq());
203
+    $form = new FormValidator('note', 'post', api_get_self().'?action='.$action.'&'.api_get_cidreq());
204 204
     // Setting the form elements
205 205
     $form->addElement('header', get_lang('AddACategory'));
206 206
     $form->addElement('text', 'category_name', get_lang('CategoryName'), array('size' => '95'));
@@ -242,23 +242,23 @@  discard block
 block discarded – undo
242 242
 function displayActionBar()
243 243
 {
244 244
     echo '<div class="actions">';
245
-    echo '<a href="'.api_get_path(WEB_CODE_PATH).'exercise/exercise.php?' . api_get_cidreq() . '">' .
246
-            Display::return_icon('back.png', get_lang('GoBackToQuestionList'), '', ICON_SIZE_MEDIUM) . '</a>';
245
+    echo '<a href="'.api_get_path(WEB_CODE_PATH).'exercise/exercise.php?'.api_get_cidreq().'">'.
246
+            Display::return_icon('back.png', get_lang('GoBackToQuestionList'), '', ICON_SIZE_MEDIUM).'</a>';
247 247
 
248
-    echo '<a href="' . api_get_self() . '?action=addcategory&'.api_get_cidreq().'">' .
249
-        Display::return_icon('new_folder.png', get_lang('AddACategory'), null, ICON_SIZE_MEDIUM) . '</a>';
248
+    echo '<a href="'.api_get_self().'?action=addcategory&'.api_get_cidreq().'">'.
249
+        Display::return_icon('new_folder.png', get_lang('AddACategory'), null, ICON_SIZE_MEDIUM).'</a>';
250 250
 
251 251
     echo Display::url(
252 252
         Display::return_icon('export_csv.png', get_lang('ExportAsCSV'), [], ICON_SIZE_MEDIUM),
253
-        api_get_self() . '?action=export_category&'.api_get_cidreq()
253
+        api_get_self().'?action=export_category&'.api_get_cidreq()
254 254
     );
255 255
 
256 256
     echo Display::url(
257 257
         Display::return_icon('import_csv.png', get_lang('ImportAsCSV'), [], ICON_SIZE_MEDIUM),
258
-        api_get_self() . '?action=import_category&'.api_get_cidreq()
258
+        api_get_self().'?action=import_category&'.api_get_cidreq()
259 259
     );
260 260
 
261 261
     echo '</div>';
262 262
     echo "<br/>";
263
-    echo "<fieldset><legend>" . get_lang('QuestionCategory') . "</legend></fieldset>";
263
+    echo "<fieldset><legend>".get_lang('QuestionCategory')."</legend></fieldset>";
264 264
 }
Please login to merge, or discard this patch.