Completed
Push — 1.11.x ( 60645e...aacf46 )
by José
76:05 queued 37:57
created
main/admin/course_create_content.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -7,16 +7,16 @@
 block discarded – undo
7 7
  * @package chamilo.admin
8 8
  */
9 9
 include ('../inc/global.inc.php');
10
-$this_section=SECTION_PLATFORM_ADMIN;
10
+$this_section = SECTION_PLATFORM_ADMIN;
11 11
 
12 12
 api_protect_admin_script();
13 13
 $tool_name = get_lang('DummyCourseCreator');
14
-$interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
14
+$interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
15 15
 Display::display_header($tool_name);
16 16
 //api_display_tool_title($tool_name);
17 17
 if (api_get_setting('server_type') != 'test') {
18 18
 	echo get_lang('DummyCourseOnlyOnTestServer');
19
-} elseif( isset($_POST['action'])) {
19
+} elseif (isset($_POST['action'])) {
20 20
 	require_once('../coursecopy/classes/DummyCourseCreator.class.php');
21 21
 	$dcc = new DummyCourseCreator();
22 22
 	$dcc->create_dummy_course($_POST['course_code']);
Please login to merge, or discard this patch.
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -15,15 +15,15 @@
 block discarded – undo
15 15
 Display::display_header($tool_name);
16 16
 //api_display_tool_title($tool_name);
17 17
 if (api_get_setting('server_type') != 'test') {
18
-	echo get_lang('DummyCourseOnlyOnTestServer');
18
+    echo get_lang('DummyCourseOnlyOnTestServer');
19 19
 } elseif( isset($_POST['action'])) {
20
-	require_once('../coursecopy/classes/DummyCourseCreator.class.php');
21
-	$dcc = new DummyCourseCreator();
22
-	$dcc->create_dummy_course($_POST['course_code']);
23
-	echo get_lang('Done');
20
+    require_once('../coursecopy/classes/DummyCourseCreator.class.php');
21
+    $dcc = new DummyCourseCreator();
22
+    $dcc->create_dummy_course($_POST['course_code']);
23
+    echo get_lang('Done');
24 24
 } else {
25
-	echo get_lang('DummyCourseDescription');
26
-	echo '<form method="post"><input type="hidden" name="course_code" value="'.Security::remove_XSS($_GET['course_code']).'"/><input type="submit" name="action" value="'.get_lang('Ok').'"/></form>';
25
+    echo get_lang('DummyCourseDescription');
26
+    echo '<form method="post"><input type="hidden" name="course_code" value="'.Security::remove_XSS($_GET['course_code']).'"/><input type="submit" name="action" value="'.get_lang('Ok').'"/></form>';
27 27
 }
28 28
 
29 29
 Display::display_footer();
Please login to merge, or discard this patch.
main/admin/statistics.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,13 +5,13 @@
 block discarded – undo
5 5
 *   @package chamilo.admin
6 6
 */
7 7
 
8
-$cidReset=true;
8
+$cidReset = true;
9 9
 require_once '../inc/global.inc.php';
10 10
 $this_section = SECTION_PLATFORM_ADMIN;
11 11
 
12 12
 api_protect_admin_script();
13 13
 
14
-$interbreadcrumb[]=array('url' => 'index.php',"name" => get_lang('PlatformAdmin'));
14
+$interbreadcrumb[] = array('url' => 'index.php', "name" => get_lang('PlatformAdmin'));
15 15
 $tool_name = get_lang('Statistics');
16 16
 Display::display_header($tool_name);
17 17
 Display::display_footer();
Please login to merge, or discard this patch.
main/admin/settings.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     Display::addFlash(Display::return_message(get_lang('FileDeleted')));
60 60
 }
61 61
 
62
-if (isset($_GET['action']) &&  $_GET['action'] == 'delete_grading') {
62
+if (isset($_GET['action']) && $_GET['action'] == 'delete_grading') {
63 63
     $id = intval($_GET['id']);
64 64
     api_delete_setting_option($id);
65 65
 }
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         }
123 123
     }
124 124
 
125
-    if (isset($category) && $category== 'search_setting') {
125
+    if (isset($category) && $category == 'search_setting') {
126 126
         if (!empty($_REQUEST['search_field'])) {
127 127
             $settings = search_setting($_REQUEST['search_field']);
128 128
         }
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
         // Set true for allow_message_tool variable if social tool is actived
221 221
         foreach ($convert_byte_to_mega_list as $item) {
222 222
             if (isset($values[$item])) {
223
-                $values[$item] = round($values[$item]*1024*1024);
223
+                $values[$item] = round($values[$item] * 1024 * 1024);
224 224
             }
225 225
         }
226 226
 
Please login to merge, or discard this patch.
main/admin/career_dashboard.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -18,12 +18,12 @@  discard block
 block discarded – undo
18 18
 $htmlHeadXtra[] = api_get_jqgrid_js();
19 19
 
20 20
 // setting breadcrumbs
21
-$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
22
-$interbreadcrumb[]=array('url' => 'career_dashboard.php','name' => get_lang('CareersAndPromotions'));
21
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
22
+$interbreadcrumb[] = array('url' => 'career_dashboard.php', 'name' => get_lang('CareersAndPromotions'));
23 23
 
24 24
 Display :: display_header(null);
25 25
 
26
-$form = new FormValidator('filter_form','GET', api_get_self());
26
+$form = new FormValidator('filter_form', 'GET', api_get_self());
27 27
 
28 28
 $career = new Career();
29 29
 
@@ -54,11 +54,11 @@  discard block
 block discarded – undo
54 54
 // action links
55 55
 echo '<div class="actions" style="margin-bottom:20px">';
56 56
     echo  '<a href="../admin/index.php">'.
57
-            Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'),'',ICON_SIZE_MEDIUM).'</a>';
57
+            Display::return_icon('back.png', get_lang('BackTo').' '.get_lang('PlatformAdmin'), '', ICON_SIZE_MEDIUM).'</a>';
58 58
     echo '<a href="careers.php">'.
59
-            Display::return_icon('career.png',get_lang('Careers'),'',ICON_SIZE_MEDIUM).'</a>';
59
+            Display::return_icon('career.png', get_lang('Careers'), '', ICON_SIZE_MEDIUM).'</a>';
60 60
     echo '<a href="promotions.php">'.
61
-            Display::return_icon('promotion.png',get_lang('Promotions'),'',ICON_SIZE_MEDIUM).'</a>';
61
+            Display::return_icon('promotion.png', get_lang('Promotions'), '', ICON_SIZE_MEDIUM).'</a>';
62 62
 echo '</div>';
63 63
 
64 64
 $form->display();
@@ -119,22 +119,22 @@  discard block
 block discarded – undo
119 119
     foreach ($career_array as $career_id => $data) {
120 120
         $career = $data['name'];
121 121
         $promotions = $data['promotions'];
122
-        $career = Display::url($career, 'careers.php?action=edit&id=' . $career_id);
122
+        $career = Display::url($career, 'careers.php?action=edit&id='.$career_id);
123 123
         $career = Display::tag('h4', $career);
124
-        echo '<tr><td style="background-color:#ECF0F1" colspan="3">' . $career . '</td></tr>';
124
+        echo '<tr><td style="background-color:#ECF0F1" colspan="3">'.$career.'</td></tr>';
125 125
         if (!empty($promotions)) {
126 126
             foreach ($promotions as $promotion_id => $promotion) {
127 127
                 $promotion_name = $promotion['name'];
128
-                $promotion_url = Display::url($promotion_name, 'promotions.php?action=edit&id=' . $promotion_id);
128
+                $promotion_url = Display::url($promotion_name, 'promotions.php?action=edit&id='.$promotion_id);
129 129
                 $sessions = $promotion['sessions'];
130 130
                 echo '<tr>';
131 131
                 $count = count($sessions);
132 132
                 $rowspan = '';
133 133
                 if (!empty($count)) {
134 134
                     $count++;
135
-                    $rowspan = 'rowspan="' . $count . '"';
135
+                    $rowspan = 'rowspan="'.$count.'"';
136 136
                 }
137
-                echo '<td ' . $rowspan . '>';
137
+                echo '<td '.$rowspan.'>';
138 138
                 echo Display::tag('h5', $promotion_url);
139 139
                 echo '</td>';
140 140
                 echo '</tr>';
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
                         $course_list = $session['courses'];
145 145
 
146 146
                         $url = Display::url($session['data']['name'],
147
-                            '../session/resume_session.php?id_session=' . $session['data']['id']);
147
+                            '../session/resume_session.php?id_session='.$session['data']['id']);
148 148
                         echo '<tr>';
149 149
                         //Session name
150 150
                         echo Display::tag('td', $url);
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 
158 158
                                 $url = Display::url(
159 159
                                     $course['title'],
160
-                                    api_get_path(WEB_COURSE_PATH) . $course['directory'] . '/index.php?id_session=' . $session['data']['id']
160
+                                    api_get_path(WEB_COURSE_PATH).$course['directory'].'/index.php?id_session='.$session['data']['id']
161 161
                                 );
162 162
                                 echo Display::tag('td', $url);
163 163
                                 echo '</tr>';
Please login to merge, or discard this patch.
main/admin/access_url_check_user_session.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -15,18 +15,18 @@  discard block
 block discarded – undo
15 15
 
16 16
 $tool_name = get_lang('SessionOverview');
17 17
 
18
-$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
19
-$interbreadcrumb[]=array('url' => 'session_list.php','name' => get_lang('SessionList'));
18
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
19
+$interbreadcrumb[] = array('url' => 'session_list.php', 'name' => get_lang('SessionList'));
20 20
 
21 21
 // Database Table Definitions
22
-$tbl_user							= Database::get_main_table(TABLE_MAIN_USER);
23
-$tbl_session_rel_user				= Database::get_main_table(TABLE_MAIN_SESSION_USER);
22
+$tbl_user = Database::get_main_table(TABLE_MAIN_USER);
23
+$tbl_session_rel_user = Database::get_main_table(TABLE_MAIN_SESSION_USER);
24 24
 $table_access_url_user              = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
25 25
 $url_id                             = api_get_current_access_url_id();
26 26
 
27 27
 $action = $_GET['action'];
28 28
 
29
-switch($action) {
29
+switch ($action) {
30 30
     case 'add_user_to_url':
31 31
         $user_id = $_REQUEST['user_id'];
32 32
         $result = UrlManager::add_user_to_url($user_id, $url_id);
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
 }
59 59
 
60 60
 
61
-foreach($session_list  as $session_item) {
61
+foreach ($session_list  as $session_item) {
62 62
     $session_id = $session_item['id'];
63 63
     $html .= '<h3>'.$session_item['name'].'</h3>';
64 64
 
Please login to merge, or discard this patch.
main/admin/course_import.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -12,13 +12,13 @@
 block discarded – undo
12 12
  */
13 13
 function validate_data($courses)
14 14
 {
15
-    $errors = array ();
16
-    $coursecodes = array ();
15
+    $errors = array();
16
+    $coursecodes = array();
17 17
     foreach ($courses as $index => $course) {
18
-        $course['line'] = $index +1;
18
+        $course['line'] = $index + 1;
19 19
 
20 20
         // 1. Check whether mandatory fields are set.
21
-        $mandatory_fields = array ('Code', 'Title', 'CourseCategory');
21
+        $mandatory_fields = array('Code', 'Title', 'CourseCategory');
22 22
         foreach ($mandatory_fields as $field) {
23 23
             if (!isset($course[$field]) || strlen($course[$field]) == 0) {
24 24
                 $course['error'] = get_lang($field.'Mandatory');
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
 /**
152 152
  * Read the CSV-file
153 153
  * @param string $file Path to the CSV-file
154
- * @return array All course-information read from the file
154
+ * @return Ddeboer\DataImport\Reader\CsvReader All course-information read from the file
155 155
  */
156 156
 function parse_csv_data($file)
157 157
 {
Please login to merge, or discard this patch.
main/admin/subscribe_user2course.php 3 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
       <option value="">--</option>
264 264
       <?php
265 265
         echo Display :: get_alphabet_options($first_letter_user);
266
-      ?>
266
+        ?>
267 267
      </select>
268 268
     </td>
269 269
     <td width="20%">&nbsp;</td>
@@ -274,8 +274,8 @@  discard block
 block discarded – undo
274 274
      <select name="firstLetterCourse" onchange="javascript:document.formulaire.form_sent.value='2'; document.formulaire.submit();">
275 275
       <option value="">--</option>
276 276
       <?php
277
-      echo Display :: get_alphabet_options($first_letter_course);
278
-      ?>
277
+        echo Display :: get_alphabet_options($first_letter_course);
278
+        ?>
279 279
      </select>
280 280
     </td>
281 281
    </tr>
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
         }
296 296
 
297 297
         echo $userName;
298
-      ?>
298
+        ?>
299 299
       </option>
300 300
 <?php
301 301
 }
Please login to merge, or discard this patch.
Braces   +8 added lines, -2 removed lines patch added patch discarded remove patch
@@ -287,7 +287,10 @@  discard block
 block discarded – undo
287 287
     <td width="40%" align="center">
288 288
      <select name="UserList[]" multiple="multiple" size="20" style="width:300px;">
289 289
     <?php foreach ($db_users as $user) { ?>
290
-          <option value="<?php echo $user['user_id']; ?>" <?php if(in_array($user['user_id'],$users)) echo 'selected="selected"'; ?>>
290
+          <option value="<?php echo $user['user_id']; ?>" <?php if(in_array($user['user_id'],$users)) {
291
+    echo 'selected="selected"';
292
+}
293
+?>>
291 294
       <?php
292 295
         $userName = api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].')';
293 296
         if ($showOfficialCode) {
@@ -308,7 +311,10 @@  discard block
 block discarded – undo
308 311
    <td width="40%" align="center">
309 312
     <select name="CourseList[]" multiple="multiple" size="20" style="width:300px;">
310 313
     <?php foreach ($db_courses as $course) { ?>
311
-         <option value="<?php echo $course['code']; ?>" <?php if(in_array($course['code'],$courses)) echo 'selected="selected"'; ?>>
314
+         <option value="<?php echo $course['code']; ?>" <?php if(in_array($course['code'],$courses)) {
315
+    echo 'selected="selected"';
316
+}
317
+?>>
312 318
              <?php echo '('.$course['visual_code'].') '.$course['title']; ?>
313 319
          </option>
314 320
     <?php } ?>
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 /* Header */
32 32
 $tool_name = get_lang('AddUsersToACourse');
33
-$interbreadcrumb[] = array ("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
33
+$interbreadcrumb[] = array("url" => 'index.php', "name" => get_lang('PlatformAdmin'));
34 34
 
35 35
 $htmlHeadXtra[] = '<script>
36 36
 function validate_filter() {
@@ -142,12 +142,12 @@  discard block
 block discarded – undo
142 142
                 if (isset($_POST[$varname]) && $_POST[$varname] != '0') {
143 143
                     $use_extra_fields = true;
144 144
                     if ($fieldtype == ExtraField::FIELD_TYPE_TAG) {
145
-                        $extra_field_result[]= UserManager::get_extra_user_data_by_tags(
145
+                        $extra_field_result[] = UserManager::get_extra_user_data_by_tags(
146 146
                             intval($_POST['field_id']),
147 147
                             $_POST[$varname]
148 148
                         );
149 149
                     } else {
150
-                        $extra_field_result[]= UserManager::get_extra_user_data_by_value(
150
+                        $extra_field_result[] = UserManager::get_extra_user_data_by_value(
151 151
                             $new_field['variable'],
152 152
                             $_POST[$varname]
153 153
                         );
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
     $final_result = array();
164 164
     if (count($extra_field_result) > 1) {
165 165
         for ($i = 0; $i < count($extra_field_result) - 1; $i++) {
166
-            if (is_array($extra_field_result[$i+1])) {
167
-                $final_result  = array_intersect($extra_field_result[$i], $extra_field_result[$i+1]);
166
+            if (is_array($extra_field_result[$i + 1])) {
167
+                $final_result = array_intersect($extra_field_result[$i], $extra_field_result[$i + 1]);
168 168
             }
169 169
         }
170 170
     } else {
@@ -172,14 +172,14 @@  discard block
 block discarded – undo
172 172
     }
173 173
 
174 174
     if (api_is_multiple_url_enabled()) {
175
-        if (is_array($final_result) && count($final_result)>0) {
176
-            $where_filter = " AND u.user_id IN  ('".implode("','",$final_result)."') ";
175
+        if (is_array($final_result) && count($final_result) > 0) {
176
+            $where_filter = " AND u.user_id IN  ('".implode("','", $final_result)."') ";
177 177
         } else {
178 178
             //no results
179 179
             $where_filter = " AND u.user_id  = -1";
180 180
         }
181 181
     } else {
182
-        if (is_array($final_result) && count($final_result)>0) {
182
+        if (is_array($final_result) && count($final_result) > 0) {
183 183
             $where_filter = " AND user_id IN  ('".implode("','", $final_result)."') ";
184 184
         } else {
185 185
             //no results
@@ -200,10 +200,10 @@  discard block
 block discarded – undo
200 200
 $sql = "SELECT user_id, lastname, firstname, username, official_code
201 201
         FROM $tbl_user
202 202
         WHERE user_id<>2 AND ".$target_name." LIKE '".$first_letter_user."%' $where_filter
203
-        ORDER BY ". (count($users) > 0 ? "(user_id IN(".implode(',', $users).")) DESC," : "")." ".$orderBy;
203
+        ORDER BY ".(count($users) > 0 ? "(user_id IN(".implode(',', $users).")) DESC," : "")." ".$orderBy;
204 204
 
205 205
 if (api_is_multiple_url_enabled()) {
206
-    $tbl_user_rel_access_url= Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
206
+    $tbl_user_rel_access_url = Database::get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER);
207 207
     $access_url_id = api_get_current_access_url_id();
208 208
     if ($access_url_id != -1) {
209 209
         $sql = "SELECT u.user_id,lastname,firstname,username, official_code
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
                     access_url_id =  $access_url_id AND
216 216
                     (".$target_name." LIKE '".$first_letter_user."%' )
217 217
                     $where_filter
218
-                ORDER BY ". (count($users) > 0 ? "(u.user_id IN(".implode(',', $users).")) DESC," : "")." ".$orderBy;
218
+                ORDER BY ".(count($users) > 0 ? "(u.user_id IN(".implode(',', $users).")) DESC," : "")." ".$orderBy;
219 219
     }
220 220
 }
221 221
 
@@ -258,8 +258,8 @@  discard block
 block discarded – undo
258 258
             $fieldtype = $new_field['type'];
259 259
             echo '&nbsp;<select name="'.$varname.'">';
260 260
             echo '<option value="0">--'.get_lang('Select').'--</option>';
261
-            foreach	($new_field['data'] as $option) {
262
-                $checked='';
261
+            foreach ($new_field['data'] as $option) {
262
+                $checked = '';
263 263
                 if ($fieldtype == ExtraField::FIELD_TYPE_TAG) {
264 264
                     if (isset($_POST[$varname])) {
265 265
                         if ($_POST[$varname] == $option['tag']) {
@@ -317,7 +317,7 @@  discard block
 block discarded – undo
317 317
     <td width="40%" align="center">
318 318
      <select name="UserList[]" multiple="multiple" size="20" style="width:300px;">
319 319
     <?php foreach ($db_users as $user) { ?>
320
-          <option value="<?php echo $user['user_id']; ?>" <?php if(in_array($user['user_id'],$users)) echo 'selected="selected"'; ?>>
320
+          <option value="<?php echo $user['user_id']; ?>" <?php if (in_array($user['user_id'], $users)) echo 'selected="selected"'; ?>>
321 321
       <?php
322 322
         $userName = api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].')';
323 323
         if ($showOfficialCode) {
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
    <td width="40%" align="center">
339 339
     <select name="CourseList[]" multiple="multiple" size="20" style="width:300px;">
340 340
     <?php foreach ($db_courses as $course) { ?>
341
-         <option value="<?php echo $course['code']; ?>" <?php if(in_array($course['code'],$courses)) echo 'selected="selected"'; ?>>
341
+         <option value="<?php echo $course['code']; ?>" <?php if (in_array($course['code'], $courses)) echo 'selected="selected"'; ?>>
342 342
              <?php echo '('.$course['visual_code'].') '.$course['title']; ?>
343 343
          </option>
344 344
     <?php } ?>
Please login to merge, or discard this patch.
main/admin/teacher_time_report.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -295,7 +295,7 @@
 block discarded – undo
295 295
 if (isset($_GET['export'])) {
296 296
     $dataToExport = $timeReport->prepareDataToExport($withFilter);
297 297
 
298
-    $fileName = get_lang('TeacherTimeReport') . ' ' . api_get_local_time();
298
+    $fileName = get_lang('TeacherTimeReport').' '.api_get_local_time();
299 299
 
300 300
     switch ($_GET['export']) {
301 301
         case 'pdf':
Please login to merge, or discard this patch.
main/admin/skills_gradebook.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
                         array('name'=>'certificate',    'index'=>'certificate', 'width'=>'25', 'align'=>'left', 'sortable'=>'false'),
51 51
                         array('name'=>'skills',         'index'=>'skills',      'width'=>'300', 'align'=>'left', 'sortable'=>'false'),
52 52
                         array('name'=>'actions',        'index'=>'actions',     'width'=>'30', 'align'=>'left','formatter'=>'action_formatter','sortable'=>'false')
53
-                       );
53
+                        );
54 54
 //Autowidth
55 55
 $extra_params['autowidth'] = 'true';
56 56
 //height auto
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
 // setting breadcrumbs
26 26
 
27 27
 $tool_name = get_lang('SkillsAndGradebooks');
28
-$interbreadcrumb[]=array('url' => 'index.php','name' => get_lang('PlatformAdmin'));
28
+$interbreadcrumb[] = array('url' => 'index.php', 'name' => get_lang('PlatformAdmin'));
29 29
 if ($action == 'add_skill') {
30
-    $interbreadcrumb[]=array('url' => 'skills_gradebook.php','name' => get_lang('SkillsAndGradebooks'));
30
+    $interbreadcrumb[] = array('url' => 'skills_gradebook.php', 'name' => get_lang('SkillsAndGradebooks'));
31 31
     $tool_name = get_lang('Add');
32 32
 }
33 33
 
@@ -46,10 +46,10 @@  discard block
 block discarded – undo
46 46
 
47 47
 //Column config
48 48
 $column_model   = array(
49
-                        array('name'=>'name',           'index'=>'name',        'width'=>'150', 'align'=>'left'),
50
-                        array('name'=>'certificate',    'index'=>'certificate', 'width'=>'25', 'align'=>'left', 'sortable'=>'false'),
51
-                        array('name'=>'skills',         'index'=>'skills',      'width'=>'300', 'align'=>'left', 'sortable'=>'false'),
52
-                        array('name'=>'actions',        'index'=>'actions',     'width'=>'30', 'align'=>'left','formatter'=>'action_formatter','sortable'=>'false')
49
+                        array('name'=>'name', 'index'=>'name', 'width'=>'150', 'align'=>'left'),
50
+                        array('name'=>'certificate', 'index'=>'certificate', 'width'=>'25', 'align'=>'left', 'sortable'=>'false'),
51
+                        array('name'=>'skills', 'index'=>'skills', 'width'=>'300', 'align'=>'left', 'sortable'=>'false'),
52
+                        array('name'=>'actions', 'index'=>'actions', 'width'=>'30', 'align'=>'left', 'formatter'=>'action_formatter', 'sortable'=>'false')
53 53
                        );
54 54
 //Autowidth
55 55
 $extra_params['autowidth'] = 'true';
@@ -60,9 +60,9 @@  discard block
 block discarded – undo
60 60
 $action_links = 'function action_formatter(cellvalue, options, rowObject) {
61 61
                         //certificates
62 62
                         if (rowObject[4] == 1) {
63
-                            return \'<a href="?action=add_skill&id=\'+options.rowId+\'">'.Display::return_icon('add.png', get_lang('AddSkill'),'',ICON_SIZE_SMALL).'</a>'.'\';
63
+                            return \'<a href="?action=add_skill&id=\'+options.rowId+\'">'.Display::return_icon('add.png', get_lang('AddSkill'), '', ICON_SIZE_SMALL).'</a>'.'\';
64 64
                         } else {
65
-                            return \''.Display::return_icon('add_na.png', get_lang('YourGradebookFirstNeedsACertificateInOrderToBeLinkedToASkill'),'',ICON_SIZE_SMALL).''.'\';
65
+                            return \''.Display::return_icon('add_na.png', get_lang('YourGradebookFirstNeedsACertificateInOrderToBeLinkedToASkill'), '', ICON_SIZE_SMALL).''.'\';
66 66
                         }
67 67
                  }';
68 68
 ?>
@@ -70,14 +70,14 @@  discard block
 block discarded – undo
70 70
 $(function() {
71 71
 <?php
72 72
     // grid definition see the $career->display() function
73
-    echo Display::grid_js('gradebooks', $url, $columns, $column_model, $extra_params, array(), $action_links,true);
73
+    echo Display::grid_js('gradebooks', $url, $columns, $column_model, $extra_params, array(), $action_links, true);
74 74
 ?>
75 75
 });
76 76
 </script>
77 77
 <?php
78 78
 $gradebook = new Gradebook();
79 79
 
80
-switch($action) {
80
+switch ($action) {
81 81
     case 'display':
82 82
         $gradebook->display();
83 83
         break;
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         $id = isset($_REQUEST['id']) ? $_REQUEST['id'] : null;
86 86
         $gradebook_info = $gradebook->get($id);
87 87
         $url  = api_get_self().'?action='.$action.'&id='.$id;
88
-        $form =  $gradebook->show_skill_form($id, $url, $gradebook_info['name']);
88
+        $form = $gradebook->show_skill_form($id, $url, $gradebook_info['name']);
89 89
         if ($form->validate()) {
90 90
             $values = $form->exportValues();
91 91
             $res    = $gradebook->update_skills_to_gradebook($values['id'], $values['skill']);
Please login to merge, or discard this patch.