Explorar o código

Minor - format code.

Julio Montoya %!s(int64=9) %!d(string=hai) anos
pai
achega
35313bc560

+ 6 - 1
main/exercice/exercise.class.php

@@ -1608,6 +1608,7 @@ class Exercise
 
         // if we want to delete attempts before date $cleanResultBeforeDate
         // $cleanResultBeforeDate must be a valid UTC-0 date yyyy-mm-dd
+
         if (!empty($cleanResultBeforeDate)) {
             $cleanResultBeforeDate = Database::escape_string($cleanResultBeforeDate);
             if (api_is_valid_date($cleanResultBeforeDate)) {
@@ -1633,7 +1634,8 @@ class Exercise
         $i = 0;
         if (is_array($exe_list) && count($exe_list) > 0) {
             foreach ($exe_list as $item) {
-                $sql = "DELETE FROM $table_track_e_attempt WHERE exe_id = '".$item['exe_id']."'";
+                $sql = "DELETE FROM $table_track_e_attempt
+                        WHERE exe_id = '".$item['exe_id']."'";
                 Database::query($sql);
                 $i++;
             }
@@ -1901,6 +1903,9 @@ class Exercise
 
     /**
      * So the time control will work
+     *
+     * @param string $time_left
+     * @return string
      */
     public function show_time_control_js($time_left)
     {

+ 6 - 2
main/exercice/exercise_report.php

@@ -1,5 +1,6 @@
 <?php
 /* For licensing terms, see /license.txt */
+
 /**
  * 	Exercise list: This script shows the list of exercises for administrators and students.
  * 	@package chamilo.exercise
@@ -9,7 +10,7 @@
  *  @todo fix excel export
  *
  */
-// including the global library
+
 require_once '../inc/global.inc.php';
 
 // Setting the tabs
@@ -318,7 +319,10 @@ if (($is_allowedToEdit || $is_tutor || api_is_coach()) && isset($_GET['delete_be
     if ($check) {
         $objExerciseTmp = new Exercise();
         if ($objExerciseTmp->read($exercise_id)) {
-            $count = $objExerciseTmp->clean_results(true, $_GET['delete_before_date'].' 23:59:59');
+            $count = $objExerciseTmp->clean_results(
+                true,
+                $_GET['delete_before_date'].' 23:59:59'
+            );
             Display::display_confirmation_message(sprintf(get_lang('XResultsCleaned'), $count));
         }
     }

+ 1 - 1
main/inc/lib/api.lib.php

@@ -1847,7 +1847,7 @@ function api_format_course_array($course_data)
     $_course['department_name'] = $course_data['department_name'];
     $_course['department_url'] = $course_data['department_url'];
 
-    //Course password
+    // Course password
     $_course['registration_code'] = !empty($course_data['registration_code']) ? sha1($course_data['registration_code']) : null;
     $_course['disk_quota'] = $course_data['disk_quota'];
     $_course['course_public_url'] = api_get_path(WEB_COURSE_PATH).$course_data['directory'].'/index.php';

+ 1 - 1
main/inc/lib/exercise.lib.php

@@ -2446,7 +2446,7 @@ HTML;
             // only end is set
             $time_conditions .= " (start_time = '0000-00-00 00:00:00' AND end_time <> '0000-00-00 00:00:00' AND end_time > '$now') OR ";
             // nothing is set
-            $time_conditions .= " (start_time = '0000-00-00 00:00:00' AND end_time =  '0000-00-00 00:00:00'))  ";
+            $time_conditions .= " (start_time = '0000-00-00 00:00:00' AND end_time = '0000-00-00 00:00:00'))  ";
         }
 
         $needle_where = !empty($search) ? " AND title LIKE '?' " : '';