Passed
Push — 1.10.x ( 6bd950...f9cbcd )
by Yannick
619:37 queued 578:35
created
main/newscorm/resourcelinker.inc.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -286,14 +286,14 @@  discard block
 block discarded – undo
286 286
             $ext = strtolower($ext[sizeof($ext)-1]);
287 287
             $myrow['path'] = rawurlencode($myrow['path']);
288 288
 
289
-			$array_ext=array('htm', 'html', 'gif', 'jpg', 'jpeg', 'png');
289
+            $array_ext=array('htm', 'html', 'gif', 'jpg', 'jpeg', 'png');
290 290
 
291
-			if (api_browser_support('svg')){
292
-				$array_ext[]='svg';
293
-			}
294
-			if (api_browser_support('ogg')){
295
-				$array_ext[]='ogg';
296
-			}
291
+            if (api_browser_support('svg')){
292
+                $array_ext[]='svg';
293
+            }
294
+            if (api_browser_support('ogg')){
295
+                $array_ext[]='ogg';
296
+            }
297 297
 
298 298
             $in_frames = in_array($ext, $array_ext);
299 299
 
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
             $result = Database::query($sql);
393 393
             $row = Database::fetch_array($result);
394 394
             if ($row['title'] != '') {
395
-                 $myrow['content'] = $row['title'];
395
+                    $myrow['content'] = $row['title'];
396 396
             }
397 397
             $desc = $row['description'];
398 398
             $ann_id = $row['item_id'];
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
             if ($icon == 'nolink') { return(shorten($myrow['title'], $length)); }
470 470
             if ($icon == 'icon') {
471 471
                 if ($linktype == 'Link _self') { echo "<img src='../img/links.gif' align=\"absmiddle\" alt='links'>"; }
472
-                   else { echo "<img src='../img/link_blank.gif' align=\"absmiddle\" alt='blank links'>"; }
472
+                    else { echo "<img src='../img/link_blank.gif' align=\"absmiddle\" alt='blank links'>"; }
473 473
             }
474 474
             $thelink = $myrow['url'];
475 475
             if ($builder != 'builder') {
@@ -494,7 +494,7 @@  discard block
 block discarded – undo
494 494
             $myrow = Database::fetch_array($result);
495 495
 
496 496
             if ($builder == 'builder') { $origin = 'builder'; }
497
-              // This is needed for the exercise_submit.php can delete the session info about tests.
497
+                // This is needed for the exercise_submit.php can delete the session info about tests.
498 498
 
499 499
             $sql = "select * from $tbl_lp_item where id=$id_in_path";
500 500
             $result = Database::query($sql);
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
             $name = GetQuizName($path, $documentPath);
547 547
 
548 548
             if ($builder == 'builder') { $origin='builder'; }
549
-              // This is needed for the exercise_submit.php can delete the session info about tests.
549
+                // This is needed for the exercise_submit.php can delete the session info about tests.
550 550
 
551 551
             $sql = "select * from $tbl_lp_item where id=$id_in_path";
552 552
             $result = Database::query($sql);	$row = Database::fetch_array($result);
@@ -1106,7 +1106,7 @@  discard block
 block discarded – undo
1106 1106
             $myrow = Database::fetch_array($result);
1107 1107
 
1108 1108
             if ($builder == 'builder') { $origin = 'builder'; }
1109
-              // This is needed for the exercise_submit.php can delete the session info about tests.
1109
+                // This is needed for the exercise_submit.php can delete the session info about tests.
1110 1110
 
1111 1111
             $sql = "select * from $tbl_lp_item where c_id = $course_id AND id=$id_in_path";
1112 1112
             $result = Database::query($sql);	$row = Database::fetch_array($result);
@@ -1330,10 +1330,10 @@  discard block
 block discarded – undo
1330 1330
  */
1331 1331
 function delete_all_resources_type($type)
1332 1332
 {
1333
-  $course_id = api_get_course_int_id();
1334
-  $TABLERESOURCE = Database::get_course_table(TABLE_LINKED_RESOURCES);
1335
-  $sql = "DELETE FROM $TABLERESOURCE WHERE c_id = $course_id AND source_type='$type'";
1336
-  Database::query($sql);
1333
+    $course_id = api_get_course_int_id();
1334
+    $TABLERESOURCE = Database::get_course_table(TABLE_LINKED_RESOURCES);
1335
+    $sql = "DELETE FROM $TABLERESOURCE WHERE c_id = $course_id AND source_type='$type'";
1336
+    Database::query($sql);
1337 1337
 }
1338 1338
 
1339 1339
 /**
Please login to merge, or discard this patch.
main/newscorm/lp_edit_item.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -28,21 +28,21 @@  discard block
 block discarded – undo
28 28
 <script>'.$_SESSION['oLP']->get_js_dropdown_array().
29 29
 
30 30
 'function load_cbo(id){' ."\n" .
31
-  'if (!id) {return false;}'.
32
-  'var cbo = document.getElementById(\'previous\');' .
33
-  'for(var i = cbo.length - 1; i > 0; i--) {' .
31
+    'if (!id) {return false;}'.
32
+    'var cbo = document.getElementById(\'previous\');' .
33
+    'for(var i = cbo.length - 1; i > 0; i--) {' .
34 34
     'cbo.options[i] = null;' .
35
-  '}' ."\n" .
36
-  'var k=0;' .
37
-  'for(var i = 1; i <= child_name[id].length; i++){' ."\n" .
38
-  '  cbo.options[i] = new Option(child_name[id][i-1], child_value[id][i-1]);' ."\n" .
39
-  '  k=i;' ."\n" .
40
-  '}' ."\n" .
41
-  //'if( typeof cbo != "undefined" ) {'."\n" .
42
-  'cbo.options[k].selected = true;'."\n" .
43
-   //'}'."\n" .
44
-
45
-   '$(\'#previous\').selectpicker(\'refresh\');' .
35
+    '}' ."\n" .
36
+    'var k=0;' .
37
+    'for(var i = 1; i <= child_name[id].length; i++){' ."\n" .
38
+    '  cbo.options[i] = new Option(child_name[id][i-1], child_value[id][i-1]);' ."\n" .
39
+    '  k=i;' ."\n" .
40
+    '}' ."\n" .
41
+    //'if( typeof cbo != "undefined" ) {'."\n" .
42
+    'cbo.options[k].selected = true;'."\n" .
43
+    //'}'."\n" .
44
+
45
+    '$(\'#previous\').selectpicker(\'refresh\');' .
46 46
 '}
47 47
 
48 48
 $(document).on("ready", function() {
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
 // Using the resource linker as a tool for adding resources to the learning path.
67 67
 if ($action == 'add' && $type == 'learnpathitem') {
68
-     $htmlHeadXtra[] = "<script language='JavaScript' type='text/javascript'> window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; </script>";
68
+        $htmlHeadXtra[] = "<script language='JavaScript' type='text/javascript'> window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; </script>";
69 69
 }
70 70
 if ((!$is_allowed_to_edit) || ($isStudentView)) {
71 71
     error_log('New LP - User not authorized in lp_add_item.php');
Please login to merge, or discard this patch.
main/newscorm/audiorecorder.inc.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -58,11 +58,11 @@
 block discarded – undo
58 58
 if (!empty($path_to_lzx)) {
59 59
     $recorder_content = sprintf("<object type=\"application/x-shockwave-flash\" data=\"%s\" ".
60 60
             "width='$width' height='$height'>".
61
-             "<param name=\"movie\" value=\"%s\">".
62
-         "<param name=\"quality\" value=\"high\">".
63
-         "<param name=\"scale\" value=\"noscale\">".
64
-         "<param name=\"salign\" value=\"LT\">".
65
-         "<param name=\"menu\" value=\"false\"></object>", $path_to_lzx, $path_to_lzx);
61
+                "<param name=\"movie\" value=\"%s\">".
62
+            "<param name=\"quality\" value=\"high\">".
63
+            "<param name=\"scale\" value=\"noscale\">".
64
+            "<param name=\"salign\" value=\"LT\">".
65
+            "<param name=\"menu\" value=\"false\"></object>", $path_to_lzx, $path_to_lzx);
66 66
     if ($audio_recorder_studentview == 'false') {
67 67
         echo '<script type="text/javascript">
68 68
         function show_audiorecorder() {
Please login to merge, or discard this patch.
main/newscorm/lp_add_item.php 1 patch
Indentation   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -27,21 +27,21 @@  discard block
 block discarded – undo
27 27
 $learnPath->get_js_dropdown_array() .
28 28
 
29 29
 'function load_cbo(id){' ."\n" .
30
-  'if (!id) {return false;}'.
31
-  'var cbo = document.getElementById(\'previous\');' .
32
-  'for(var i = cbo.length - 1; i > 0; i--) {' .
30
+    'if (!id) {return false;}'.
31
+    'var cbo = document.getElementById(\'previous\');' .
32
+    'for(var i = cbo.length - 1; i > 0; i--) {' .
33 33
     'cbo.options[i] = null;' .
34
-  '}' ."\n" .
35
-  'var k=0;' .
36
-  'for(var i = 1; i <= child_name[id].length; i++){' ."\n" .
37
-  '  cbo.options[i] = new Option(child_name[id][i-1], child_value[id][i-1]);' ."\n" .
38
-  '  k=i;' ."\n" .
39
-  '}' ."\n" .
40
-  //'if( typeof cbo != "undefined" ) {'."\n" .
41
-  'cbo.options[k].selected = true;'."\n" .
42
-   //'}'."\n" .
43
-
44
-   '$(\'#previous\').selectpicker(\'refresh\');' .
34
+    '}' ."\n" .
35
+    'var k=0;' .
36
+    'for(var i = 1; i <= child_name[id].length; i++){' ."\n" .
37
+    '  cbo.options[i] = new Option(child_name[id][i-1], child_value[id][i-1]);' ."\n" .
38
+    '  k=i;' ."\n" .
39
+    '}' ."\n" .
40
+    //'if( typeof cbo != "undefined" ) {'."\n" .
41
+    'cbo.options[k].selected = true;'."\n" .
42
+    //'}'."\n" .
43
+
44
+    '$(\'#previous\').selectpicker(\'refresh\');' .
45 45
 '}
46 46
 
47 47
 $(function() {
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
 // Using the resource linker as a tool for adding resources to the learning path.
75 75
 if ($action == 'add' && $type == 'learnpathitem') {
76
-     $htmlHeadXtra[] = "<script type='text/javascript'> window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; </script>";
76
+        $htmlHeadXtra[] = "<script type='text/javascript'> window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; </script>";
77 77
 }
78 78
 if ((!$is_allowed_to_edit)) {
79 79
     error_log('New LP - User not authorized in lp_add_item.php');
Please login to merge, or discard this patch.
main/newscorm/lp_build.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
 
36 36
 // Using the resource linker as a tool for adding resources to the learning path.
37 37
 if ($action=="add" and $type=="learnpathitem") {
38
-     $htmlHeadXtra[] = "<script language='JavaScript' type='text/javascript'> window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; </script>";
38
+        $htmlHeadXtra[] = "<script language='JavaScript' type='text/javascript'> window.location=\"../resourcelinker/resourcelinker.php?source_id=5&action=$action&learnpath_id=$learnpath_id&chapter_id=$chapter_id&originalresource=no\"; </script>";
39 39
 }
40 40
 if ((!$is_allowed_to_edit) || ($isStudentView)) {
41 41
     error_log('New LP - User not authorized in lp_build.php');
Please login to merge, or discard this patch.
main/newscorm/aiccItem.class.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
                 default:
49 49
                      //if($first_item->type == XML_ELEMENT_NODE) this is already check prior to the call to this function
50 50
                      foreach ($params as $a => $value) {
51
-                         switch ($a) {
51
+                            switch ($a) {
52 52
                             case 'system_id':
53 53
                                 $this->identifier = Database::escape_string(strtolower($value));
54 54
                                 break;
@@ -82,8 +82,8 @@  discard block
 block discarded – undo
82 82
                             case 'web_launch':
83 83
                                 $this->parameters = Database::escape_string($value);
84 84
                                 break;
85
-                         }
86
-                     }
85
+                            }
86
+                        }
87 87
 
88 88
                     return true;
89 89
             }
Please login to merge, or discard this patch.
main/newscorm/openoffice_text_document.class.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,23 +1,23 @@
 block discarded – undo
1 1
 <?php
2 2
 /* For licensing terms, see /license.txt */
3 3
 /**
4
- * Defines the OpenOfficeDocument class, which is meant as a conversion
5
- * tool from Office text documents (.doc, .sxw, .odt, .docx) to
6
- * learning paths
7
- * @package chamilo.learnpath
8
- * @author  Eric Marguin <[email protected]>
9
- * @license GNU/GPL
10
- */
4
+     * Defines the OpenOfficeDocument class, which is meant as a conversion
5
+     * tool from Office text documents (.doc, .sxw, .odt, .docx) to
6
+     * learning paths
7
+     * @package chamilo.learnpath
8
+     * @author  Eric Marguin <[email protected]>
9
+     * @license GNU/GPL
10
+     */
11 11
 /**
12
- * Defines the "OpenOfficeTextDocument" child of class "learnpath"
13
- */
12
+     * Defines the "OpenOfficeTextDocument" child of class "learnpath"
13
+     */
14 14
 require_once 'openoffice_document.class.php';
15 15
 require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php';
16 16
 require_once api_get_path(LIBRARY_PATH).'search/ChamiloIndexer.class.php';
17 17
 require_once api_get_path(LIBRARY_PATH).'search/IndexableChunk.class.php';
18 18
 /**
19
- * @package chamilo.learnpath.openofficedocument
20
- */
19
+     * @package chamilo.learnpath.openofficedocument
20
+     */
21 21
 class OpenOfficeTextDocument extends OpenofficeDocument {
22 22
 
23 23
     public $split_steps;
Please login to merge, or discard this patch.
main/newscorm/resourcelinker.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -308,11 +308,11 @@
 block discarded – undo
308 308
         //$_SESSION['addedresourceid']=null;
309 309
         // cleaning up the session once again
310 310
         $_SESSION['addedresource'] = null;
311
-           $_SESSION['addedresourceid'] = null;
312
-           $_SESSION['addedresourceassigned'] = null;
313
-           unset ($_SESSION['addedresource']);
314
-           unset ($_SESSION['addedresourceid']);
315
-           unset ($_SESSION['addedresourceassigned']);
311
+            $_SESSION['addedresourceid'] = null;
312
+            $_SESSION['addedresourceassigned'] = null;
313
+            unset ($_SESSION['addedresource']);
314
+            unset ($_SESSION['addedresourceid']);
315
+            unset ($_SESSION['addedresourceassigned']);
316 316
     }
317 317
 }
318 318
 
Please login to merge, or discard this patch.
main/newscorm/scorm_api.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -458,8 +458,8 @@
 block discarded – undo
458 458
     } else if(param == 'cmi.core.student_name'){
459 459
         // ---- cmi.core.student_name
460 460
         <?php
461
-          $who = addslashes($user['complete_name']);
462
-          echo "result='$who';";
461
+            $who = addslashes($user['complete_name']);
462
+            echo "result='$who';";
463 463
         ?>
464 464
     } else if(param == 'cmi.core.lesson_location'){
465 465
         // ---- cmi.core.lesson_location
Please login to merge, or discard this patch.