Forráskód Böngészése

Minor - Format code

jmontoyaa 7 éve
szülő
commit
48eaf907e7

+ 3 - 1
main/admin/course_intro_pdf_import.php

@@ -73,7 +73,9 @@ Display::display_header($tool_name);
         </div>
         <div class="control-group">
             <div class="control">
-                <button type="submit" class="save" value="<?php echo get_lang('Import'); ?>"><?php echo get_lang('Import'); ?></button>
+                <button type="submit" class="save" value="<?php echo get_lang('Import'); ?>">
+                    <?php echo get_lang('Import'); ?>
+                </button>
             </div>
         </div>
         <input type="hidden" name="formSent" value="1"/>

+ 9 - 2
main/admin/course_request_edit.php

@@ -76,7 +76,12 @@ if ($course_validation_feature) {
         $form->addRule('wanted_code', get_lang('ThisFieldIsRequired'), 'required');
 
         // The teacher.
-        $titular = $form->addText('tutor_name', get_lang('Professor'), null, ['size' => '60', 'disabled' => 'disabled']);
+        $titular = $form->addText(
+            'tutor_name',
+            get_lang('Professor'),
+            null,
+            ['size' => '60', 'disabled' => 'disabled']
+        );
 
         // Description of the requested course.
         $form->addElement('textarea', 'description', get_lang('Description'));
@@ -101,7 +106,9 @@ if ($course_validation_feature) {
         if ($course_request_info['status'] != COURSE_REQUEST_ACCEPTED) {
             $submit_buttons[] = $form->addButtonSave(get_lang('Accept'), 'accept_button', true);
         }
-        if ($course_request_info['status'] != COURSE_REQUEST_ACCEPTED && $course_request_info['status'] != COURSE_REQUEST_REJECTED) {
+        if ($course_request_info['status'] != COURSE_REQUEST_ACCEPTED &&
+            $course_request_info['status'] != COURSE_REQUEST_REJECTED
+        ) {
             $submit_buttons[] = $form->addButtonCancel(get_lang('Reject'), 'reject_button', true);
         }
         if ($course_request_info['status'] != COURSE_REQUEST_ACCEPTED && intval($course_request_info['info']) <= 0) {

+ 10 - 5
main/cron/import_csv.php

@@ -131,7 +131,8 @@ class ImportCsv
             foreach ($files as $file) {
                 $fileInfo = pathinfo($file);
                 if (isset($fileInfo['extension']) && $fileInfo['extension'] === 'csv') {
-                    // Checking teachers_yyyymmdd.csv, courses_yyyymmdd.csv, students_yyyymmdd.csv and sessions_yyyymmdd.csv
+                    // Checking teachers_yyyymmdd.csv,
+                    // courses_yyyymmdd.csv, students_yyyymmdd.csv and sessions_yyyymmdd.csv
                     $parts = explode('_', $fileInfo['filename']);
                     $preMethod = ucwords($parts[1]);
                     $preMethod = str_replace('-static', 'Static', $preMethod);
@@ -178,9 +179,9 @@ class ImportCsv
                     } else {
                         echo "Error - This file '$file' can't be processed.".PHP_EOL;
                         echo "Trying to call $method".PHP_EOL;
-
                         echo "The file have to has this format:".PHP_EOL;
-                        echo "prefix_students_ddmmyyyy.csv, prefix_teachers_ddmmyyyy.csv, prefix_courses_ddmmyyyy.csv, prefix_sessions_ddmmyyyy.csv ".PHP_EOL;
+                        echo "prefix_students_ddmmyyyy.csv, prefix_teachers_ddmmyyyy.csv, 
+                        prefix_courses_ddmmyyyy.csv, prefix_sessions_ddmmyyyy.csv ".PHP_EOL;
                         exit;
                     }
                 }
@@ -785,8 +786,12 @@ class ImportCsv
             $language = $this->defaultLanguage;
             $this->logger->addInfo(count($data)." records found.");
 
-            $expirationDateOnCreate = api_get_utc_datetime(strtotime("+".intval($this->expirationDateInUserCreation)."years"));
-            $expirationDateOnUpdate = api_get_utc_datetime(strtotime("+".intval($this->expirationDateInUserUpdate)."years"));
+            $expirationDateOnCreate = api_get_utc_datetime(
+                strtotime("+".intval($this->expirationDateInUserCreation)."years")
+            );
+            $expirationDateOnUpdate = api_get_utc_datetime(
+                strtotime("+".intval($this->expirationDateInUserUpdate)."years")
+            );
 
             $counter = 1;
             $secondsInYear = 365 * 24 * 60 * 60;