Passed
Push — 1.10.x ( 6bd950...f9cbcd )
by Yannick
619:37 queued 578:35
created
main/newscorm/lp_ajax_save_item.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -458,7 +458,7 @@
 block discarded – undo
458 458
     }
459 459
 
460 460
     if ($myLP->get_type() == 2) {
461
-         $return .= "update_stats();";
461
+            $return .= "update_stats();";
462 462
     }
463 463
 
464 464
     // To be sure progress is updated.
Please login to merge, or discard this patch.
main/newscorm/lp_edit_item_prereq.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For licensing terms, see /license.txt */
3 3
 /**
4
- * This is a learning path creation and player tool in Chamilo - previously learnpath_handler.php
5
- *
6
- * @author Patrick Cool
7
- * @author Denes Nagy
8
- * @author Roan Embrechts, refactoring and code cleaning
9
- * @author Yannick Warnier <[email protected]> - cleaning and update for new SCORM tool
10
- * @package chamilo.learnpath
11
- */
4
+     * This is a learning path creation and player tool in Chamilo - previously learnpath_handler.php
5
+     *
6
+     * @author Patrick Cool
7
+     * @author Denes Nagy
8
+     * @author Roan Embrechts, refactoring and code cleaning
9
+     * @author Yannick Warnier <[email protected]> - cleaning and update for new SCORM tool
10
+     * @package chamilo.learnpath
11
+     */
12 12
 $this_section = SECTION_COURSES;
13 13
 
14 14
 api_protect_course_script();
Please login to merge, or discard this patch.
main/newscorm/openoffice_document.class.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
         // Create the directory
50 50
         $result = $this->generate_lp_folder($_course, $this->file_name);
51 51
 
52
-         // Create the directory
52
+            // Create the directory
53 53
         $this->base_work_dir = api_get_path(SYS_COURSE_PATH).$_course['path'].'/document';
54 54
         ///learning_path/ppt_dirname directory
55 55
         $this->created_dir = substr($result['dir'], 0, strlen($result['dir']) -1);
Please login to merge, or discard this patch.
main/newscorm/scorm.class.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -310,7 +310,7 @@
 block discarded – undo
310 310
             $myname = api_utf8_decode($myname);
311 311
 
312 312
             $sql = "INSERT INTO $new_lp (c_id, lp_type, name, ref, description, path, force_commit, default_view_mod, default_encoding, js_lib,display_order, session_id, use_max_score)" .
313
-                   "VALUES ($courseId , 2,'".$myname."', '".$oOrganization->get_ref()."','','".$this->subdir."', 0, 'embedded', '".$this->manifest_encoding."', 'scorm_api.php', $dsp, $sessionId, $userMaxScore)";
313
+                    "VALUES ($courseId , 2,'".$myname."', '".$oOrganization->get_ref()."','','".$this->subdir."', 0, 'embedded', '".$this->manifest_encoding."', 'scorm_api.php', $dsp, $sessionId, $userMaxScore)";
314 314
             if ($this->debug > 1) { error_log('New LP - In import_manifest(), inserting path: '. $sql, 0); }
315 315
 
316 316
             Database::query($sql);
Please login to merge, or discard this patch.
main/cron/cleanup.php 1 patch
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Automatic cleanup procedure. Cleans the archive directory of anything
4
- * older than 7 days
5
- * @package chamilo.cron
6
- * @author Yannick Warnier <[email protected]>
7
- */
3
+     * Automatic cleanup procedure. Cleans the archive directory of anything
4
+     * older than 7 days
5
+     * @package chamilo.cron
6
+     * @author Yannick Warnier <[email protected]>
7
+     */
8 8
 /**
9
- * Initialization
10
- */
9
+     * Initialization
10
+     */
11 11
 if (php_sapi_name() != 'cli') { 
12 12
     exit; //do not run from browser
13 13
 }
Please login to merge, or discard this patch.
main/cron/remind_course_expiration.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,10 +1,10 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For licensing terms, see /license.txt */
3 3
 /**
4
- * Course expiration reminder.
5
- * @package chamilo.cron
6
- * @author Imanol Losada <[email protected]>
7
- */
4
+     * Course expiration reminder.
5
+     * @package chamilo.cron
6
+     * @author Imanol Losada <[email protected]>
7
+     */
8 8
 require_once __DIR__ . '/../inc/global.inc.php';
9 9
 
10 10
 /**
Please login to merge, or discard this patch.
main/cron/document/finddoc.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -1,26 +1,26 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Script to find a document with a specific title or path in all courses
4
- */
3
+     * Script to find a document with a specific title or path in all courses
4
+     */
5 5
 /**
6
- * Code init - comment die() call to enable
7
- */
6
+     * Code init - comment die() call to enable
7
+     */
8 8
 die();
9 9
 require '../../inc/global.inc.php';
10 10
 if (empty($_GET['doc'])) {
11
-  echo "To add a document name to search, add ?doc=abc to the URL";
11
+    echo "To add a document name to search, add ?doc=abc to the URL";
12 12
 } else {
13
-  echo "Received param ".Security::remove_XSS($_GET['doc'])."<br />";
13
+    echo "Received param ".Security::remove_XSS($_GET['doc'])."<br />";
14 14
 }
15 15
 $courses_list =  CourseManager::get_courses_list();
16 16
 foreach ($courses_list as $course) {
17
-  $title = Database::escape_string($_GET['doc']);
18
-  $td = Database::get_course_table(TABLE_DOCUMENT);
19
-  $sql = "SELECT id, path FROM $td WHERE c_id = ".$course['id']." AND path LIKE '%$title%' OR title LIKE '%$title%'";
20
-  $res = Database::query($sql);
21
-  if (Database::num_rows($res)>0) {
17
+    $title = Database::escape_string($_GET['doc']);
18
+    $td = Database::get_course_table(TABLE_DOCUMENT);
19
+    $sql = "SELECT id, path FROM $td WHERE c_id = ".$course['id']." AND path LIKE '%$title%' OR title LIKE '%$title%'";
20
+    $res = Database::query($sql);
21
+    if (Database::num_rows($res)>0) {
22 22
     while ($row = Database::fetch_array($res)) {
23
-      echo "Found doc ".$row['id']."-> ".$row['path']." in course ".$course['code']."<br />";
23
+        echo "Found doc ".$row['id']."-> ".$row['path']." in course ".$course['code']."<br />";
24
+    }
24 25
     }
25
-  }
26 26
 }
Please login to merge, or discard this patch.
main/cron/user_import/get_data_from_mail.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1,13 +1,13 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * This script gets users details of a given list of users
4
- * (given by e-mail) and prints the details in /tmp/list.txt
5
- * To enable script, prefix the first die(); with //
6
- * @package chamilo.cron.user_import
7
- */
3
+     * This script gets users details of a given list of users
4
+     * (given by e-mail) and prints the details in /tmp/list.txt
5
+     * To enable script, prefix the first die(); with //
6
+     * @package chamilo.cron.user_import
7
+     */
8 8
 /**
9
- * Initialization
10
- */
9
+     * Initialization
10
+     */
11 11
 /* Example of input file:
12 12
 [email protected]
13 13
 [email protected]
@@ -20,16 +20,16 @@  discard block
 block discarded – undo
20 20
 $users = Database::get_main_table(TABLE_MAIN_USER);
21 21
 $string='';
22 22
 foreach ($list as $mail) {
23
-  $mail = trim($mail);
24
-  $sql = "SELECT user_id, official_code, firstname, lastname, email FROM $users WHERE email = '$mail'\n";
25
-  $res = Database::query($sql);
26
-  if ($res === false) { die(mysql_error());}
27
-  if (Database::num_rows($res) == 0) {
23
+    $mail = trim($mail);
24
+    $sql = "SELECT user_id, official_code, firstname, lastname, email FROM $users WHERE email = '$mail'\n";
25
+    $res = Database::query($sql);
26
+    if ($res === false) { die(mysql_error());}
27
+    if (Database::num_rows($res) == 0) {
28 28
     $string .= 'No encontrado;'.$row['email'];
29
-  } else {
29
+    } else {
30 30
     $row = Database::fetch_assoc($res);
31
-   $string .= $row['user_id'].';'.$row['email'].';'.$row['firstname'].';'.$row['lastname'].';'.$row['official_code']."\r\n";
32
-  }
31
+    $string .= $row['user_id'].';'.$row['email'].';'.$row['firstname'].';'.$row['lastname'].';'.$row['official_code']."\r\n";
32
+    }
33 33
 }
34 34
 echo $string;
35 35
 file_put_contents('/tmp/list.txt',$string);
Please login to merge, or discard this patch.
main/cron/create_course_sessions.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For licensing terms, see /license.txt */
3 3
 /**
4
- * Create course sessions procedure. It creates sessions for courses that haven't it yet.
5
- * If today is greater than OFFSET, it will create them also for the next quarter
6
- * @package chamilo.cron
7
- * @author Imanol Losada <[email protected]>
8
- */
4
+     * Create course sessions procedure. It creates sessions for courses that haven't it yet.
5
+     * If today is greater than OFFSET, it will create them also for the next quarter
6
+     * @package chamilo.cron
7
+     * @author Imanol Losada <[email protected]>
8
+     */
9 9
 
10 10
 /**
11 11
  * Initialization
Please login to merge, or discard this patch.