Passed
Push — 1.10.x ( 380db0...64f6cc )
by Angel Fernando Quiroz
164:01 queued 102:07
created
main/newscorm/scormItem.class.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
                                         }
101 101
                                         break;
102 102
                                     case 'item':
103
-                                        $oItem = new scormItem('manifest',$child);
103
+                                        $oItem = new scormItem('manifest', $child);
104 104
                                         if ($oItem->identifier != '') {
105 105
                                             $this->sub_items[$oItem->identifier] = $oItem;
106 106
                                         }
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
                         $attributes = $element->attributes;
120 120
                         //$keep_href = '';
121 121
                         foreach ($attributes as $attrib) {
122
-                            switch($attrib->name){
122
+                            switch ($attrib->name) {
123 123
                                 case 'identifier':
124 124
                                     $this->identifier = $attrib->value;
125 125
                                     break;
@@ -172,8 +172,8 @@  discard block
 block discarded – undo
172 172
         );
173 173
         $abs_order++;
174 174
         $i = 1;
175
-        foreach($this->sub_items as $id => $dummy) {
176
-            $oSubitem =& $this->sub_items[$id];
175
+        foreach ($this->sub_items as $id => $dummy) {
176
+            $oSubitem = & $this->sub_items[$id];
177 177
             $oSubitem->get_flat_list($list, $abs_order, $i, $level + 1);
178 178
             $i++;
179 179
         }
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
         parent::save($from_outside, $prereqs_complete);
189 189
         // Under certain conditions, the scorm_contact should not be set, because no scorm signal was sent.
190 190
         $this->scorm_contact = true;
191
-        if (!$this->scorm_contact){
191
+        if (!$this->scorm_contact) {
192 192
             //error_log('New LP - was expecting SCORM message but none received', 0);
193 193
         }
194 194
     }
Please login to merge, or discard this patch.
main/newscorm/lp_controller.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 // Including the global initialization file.
27 27
 require_once '../inc/global.inc.php';
28
-$current_course_tool  = TOOL_LEARNPATH;
28
+$current_course_tool = TOOL_LEARNPATH;
29 29
 $_course = api_get_course_info();
30 30
 
31 31
 $glossaryExtraTools = api_get_setting('show_glossary_in_extra_tools');
@@ -37,11 +37,11 @@  discard block
 block discarded – undo
37 37
     ) {
38 38
         $htmlHeadXtra[] = '<script>
39 39
     <!--
40
-        var jQueryFrameReadyConfigPath = \'' . api_get_jquery_web_path() . '\';
40
+        var jQueryFrameReadyConfigPath = \'' . api_get_jquery_web_path().'\';
41 41
     -->
42 42
     </script>';
43
-    $htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/jquery.frameready.js" type="text/javascript" language="javascript"></script>';
44
-    $htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_PATH) . 'javascript/jquery.highlight.js" type="text/javascript" language="javascript"></script>';
43
+    $htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.frameready.js" type="text/javascript" language="javascript"></script>';
44
+    $htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.highlight.js" type="text/javascript" language="javascript"></script>';
45 45
     }
46 46
 }
47 47
 
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
 
269 269
 $course_id = api_get_course_int_id();
270 270
 
271
-if ($debug>0) error_log('New LP - Passed data remains check', 0);
271
+if ($debug > 0) error_log('New LP - Passed data remains check', 0);
272 272
 
273 273
 if (!$lp_found || (!empty($_REQUEST['lp_id']) && $_SESSION['oLP']->get_id() != $_REQUEST['lp_id'])) {
274 274
     if ($debug > 0) error_log('New LP - oLP is not object, has changed or refresh been asked, getting new', 0);
@@ -292,7 +292,7 @@  discard block
 block discarded – undo
292 292
             if (Database::num_rows($res)) {
293 293
                 $row = Database::fetch_array($res);
294 294
                 $type = $row['lp_type'];
295
-                if ($debug > 0) error_log('New LP - found row - type '.$type. ' - Calling constructor with '.api_get_course_id().' - '.$lp_id.' - '.api_get_user_id(), 0);
295
+                if ($debug > 0) error_log('New LP - found row - type '.$type.' - Calling constructor with '.api_get_course_id().' - '.$lp_id.' - '.api_get_user_id(), 0);
296 296
                 switch ($type) {
297 297
                     case 1:
298 298
                         if ($debug > 0) error_log('New LP - found row - type dokeos - Calling constructor with '.api_get_course_id().' - '.$lp_id.' - '.api_get_user_id(), 0);
@@ -687,8 +687,8 @@  discard block
 block discarded – undo
687 687
                 $editPrerequisite = $_SESSION['oLP']->edit_item_prereq(
688 688
                     $_GET['id'],
689 689
                     $_POST['prerequisites'],
690
-                    $_POST['min_' . $_POST['prerequisites']],
691
-                    $_POST['max_' . $_POST['prerequisites']]
690
+                    $_POST['min_'.$_POST['prerequisites']],
691
+                    $_POST['max_'.$_POST['prerequisites']]
692 692
                 );
693 693
 
694 694
                 if ($editPrerequisite) {
@@ -937,7 +937,7 @@  discard block
 block discarded – undo
937 937
             $_SESSION['oLP']->setSubscribeUsers($_REQUEST['subscribe_users']);
938 938
 
939 939
             if (isset($_REQUEST['activate_start_date_check']) && $_REQUEST['activate_start_date_check'] == 1) {
940
-            	$publicated_on  = $_REQUEST['publicated_on'];
940
+            	$publicated_on = $_REQUEST['publicated_on'];
941 941
             } else {
942 942
             	$publicated_on = null;
943 943
             }
@@ -1008,7 +1008,7 @@  discard block
 block discarded – undo
1008 1008
         else {
1009 1009
             $_SESSION['refresh'] = 1;
1010 1010
             if (!empty($_REQUEST['parent_item_id'])) {
1011
-                $_SESSION['from_learnpath']='yes';
1011
+                $_SESSION['from_learnpath'] = 'yes';
1012 1012
                 $_SESSION['origintoolurl'] = 'lp_controller.php?action=admin_view&lp_id='.Security::remove_XSS($_REQUEST['lp_id']);
1013 1013
                 require 'resourcelinker.php';
1014 1014
             } else {
@@ -1109,8 +1109,8 @@  discard block
 block discarded – undo
1109 1109
             error_log('New LP - No learnpath given for view', 0);
1110 1110
             require 'lp_list.php';
1111 1111
         } else {
1112
-            if ($debug > 0) {error_log('New LP - Trying to set current item to ' . $_REQUEST['item_id'], 0); }
1113
-            if ( !empty($_REQUEST['item_id']) ) {
1112
+            if ($debug > 0) {error_log('New LP - Trying to set current item to '.$_REQUEST['item_id'], 0); }
1113
+            if (!empty($_REQUEST['item_id'])) {
1114 1114
                 $_SESSION['oLP']->set_current_item($_REQUEST['item_id']);
1115 1115
             }
1116 1116
             require 'lp_view.php';
@@ -1190,8 +1190,8 @@  discard block
 block discarded – undo
1190 1190
 		break;
1191 1191
      */
1192 1192
 	case 'switch_attempt_mode':
1193
-		if($debug>0) error_log('New LP - switch_reinit action triggered',0);
1194
-		if(!$lp_found){ error_log('New LP - No learnpath given for switch',0); require 'lp_list.php'; }
1193
+		if ($debug > 0) error_log('New LP - switch_reinit action triggered', 0);
1194
+		if (!$lp_found) { error_log('New LP - No learnpath given for switch', 0); require 'lp_list.php'; }
1195 1195
 		$_SESSION['refresh'] = 1;
1196 1196
 		$_SESSION['oLP']->switch_attempt_mode();
1197 1197
         require 'lp_list.php';
@@ -1241,8 +1241,8 @@  discard block
 block discarded – undo
1241 1241
             error_log('New LP - No learnpath given for view', 0);
1242 1242
             require 'lp_list.php';
1243 1243
         } else {
1244
-            if ($debug > 0) {error_log('New LP - Trying to impress this LP item to ' . $_REQUEST['item_id'], 0); }
1245
-            if (!empty($_REQUEST['item_id']) ) {
1244
+            if ($debug > 0) {error_log('New LP - Trying to impress this LP item to '.$_REQUEST['item_id'], 0); }
1245
+            if (!empty($_REQUEST['item_id'])) {
1246 1246
                 $_SESSION['oLP']->set_current_item($_REQUEST['item_id']);
1247 1247
             }
1248 1248
             require 'lp_impress.php';
@@ -1305,7 +1305,7 @@  discard block
 block discarded – undo
1305 1305
                     $_SESSION['oLP']->lp_session_id
1306 1306
                 );
1307 1307
 
1308
-                $forumCategoryId = !empty($forumCategory) ? $forumCategory['cat_id']: 0;
1308
+                $forumCategoryId = !empty($forumCategory) ? $forumCategory['cat_id'] : 0;
1309 1309
 
1310 1310
                 if (empty($forumCategoryId)) {
1311 1311
                     $forumCategoryId = store_forumcategory(
@@ -1337,7 +1337,7 @@  discard block
 block discarded – undo
1337 1337
             }
1338 1338
         }
1339 1339
 
1340
-        header('Location:' . api_get_self() . '?' . http_build_query([
1340
+        header('Location:'.api_get_self().'?'.http_build_query([
1341 1341
             'action' => 'add_item',
1342 1342
             'type' => 'step',
1343 1343
             'lp_id' => $_SESSION['oLP']->lp_id
@@ -1379,7 +1379,7 @@  discard block
 block discarded – undo
1379 1379
             }
1380 1380
         }
1381 1381
 
1382
-        header('Location:' . api_get_self() . '?' . http_build_query([
1382
+        header('Location:'.api_get_self().'?'.http_build_query([
1383 1383
             'action' => 'add_item',
1384 1384
             'type' => 'step',
1385 1385
             'lp_id' => $_SESSION['oLP']->lp_id
Please login to merge, or discard this patch.
main/newscorm/lp_edit_item.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -27,22 +27,22 @@  discard block
 block discarded – undo
27 27
 $htmlHeadXtra[] = '
28 28
 <script>'.$_SESSION['oLP']->get_js_dropdown_array().
29 29
 
30
-'function load_cbo(id){' ."\n" .
30
+'function load_cbo(id){'."\n".
31 31
   'if (!id) {return false;}'.
32
-  'var cbo = document.getElementById(\'previous\');' .
33
-  'for(var i = cbo.length - 1; i > 0; i--) {' .
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" .
32
+  'var cbo = document.getElementById(\'previous\');'.
33
+  'for(var i = cbo.length - 1; i > 0; i--) {'.
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 41
   //'if( typeof cbo != "undefined" ) {'."\n" .
42
-  'cbo.options[k].selected = true;'."\n" .
42
+  'cbo.options[k].selected = true;'."\n".
43 43
    //'}'."\n" .
44 44
 
45
-   '$(\'#previous\').selectpicker(\'refresh\');' .
45
+   '$(\'#previous\').selectpicker(\'refresh\');'.
46 46
 '}
47 47
 
48 48
 $(document).on("ready", function() {
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 }
92 92
 
93 93
 if (!empty($gradebook) && $gradebook == 'view') {
94
-    $interbreadcrumb[] = array (
94
+    $interbreadcrumb[] = array(
95 95
         'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
96 96
         'name' => get_lang('ToolGradebook')
97 97
     );
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 $show_learn_path = true;
105 105
 $lp_theme_css = $_SESSION['oLP']->get_theme();
106 106
 
107
-Display::display_header(get_lang('Edit'),'Path');
107
+Display::display_header(get_lang('Edit'), 'Path');
108 108
 $suredel = trim(get_lang('AreYouSureToDeleteJS'));
109 109
 
110 110
 ?>
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
 $path_item = isset($_GET['path_item']) ? $_GET['path_item'] : 0;
158 158
 $path_item = Database::escape_string($path_item);
159 159
 $tbl_doc = Database :: get_course_table(TABLE_DOCUMENT);
160
-$sql_doc = "SELECT path FROM " . $tbl_doc . "
161
-            WHERE c_id = $course_id AND id = '". $path_item."' ";
160
+$sql_doc = "SELECT path FROM ".$tbl_doc."
161
+            WHERE c_id = $course_id AND id = '".$path_item."' ";
162 162
 
163 163
 $res_doc = Database::query($sql_doc);
164 164
 $path_file = Database::result($res_doc, 0, 0);
Please login to merge, or discard this patch.
main/newscorm/lp_add.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -68,12 +68,12 @@  discard block
 block discarded – undo
68 68
     Course admin section
69 69
     - all the functions not available for students - always available in this case (page only shown to admin)
70 70
 */
71
-if (isset($_SESSION['gradebook'])){
71
+if (isset($_SESSION['gradebook'])) {
72 72
     $gradebook = $_SESSION['gradebook'];
73 73
 }
74 74
 
75
-if (!empty($gradebook) && $gradebook=='view') {
76
-    $interbreadcrumb[]= array (
75
+if (!empty($gradebook) && $gradebook == 'view') {
76
+    $interbreadcrumb[] = array(
77 77
         'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
78 78
         'name' => get_lang('ToolGradebook')
79 79
     );
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 
86 86
 echo '<div class="actions">';
87 87
 echo '<a href="lp_controller.php?cidReq='.$_course['sysCode'].'">'.
88
-        Display::return_icon('back.png', get_lang('ReturnToLearningPaths'),'',ICON_SIZE_MEDIUM).'</a>';
88
+        Display::return_icon('back.png', get_lang('ReturnToLearningPaths'), '', ICON_SIZE_MEDIUM).'</a>';
89 89
 echo '</div>';
90 90
 
91 91
 Display::display_normal_message(get_lang('AddLpIntro'), false);
@@ -119,22 +119,22 @@  discard block
 block discarded – undo
119 119
 
120 120
 // Start date
121 121
 $form->addElement('checkbox', 'activate_start_date_check', null, get_lang('EnableStartTime'), array('onclick' => 'activate_start_date()'));
122
-$form->addElement('html','<div id="start_date_div" style="display:block;">');
122
+$form->addElement('html', '<div id="start_date_div" style="display:block;">');
123 123
 $form->addElement('DatePicker', 'publicated_on', get_lang('PublicationDate'));
124
-$form->addElement('html','</div>');
124
+$form->addElement('html', '</div>');
125 125
 
126 126
 //End date
127 127
 $form->addElement('checkbox', 'activate_end_date_check', null, get_lang('EnableEndTime'), array('onclick' => 'activate_end_date()'));
128
-$form->addElement('html','<div id="end_date_div" style="display:none;">');
128
+$form->addElement('html', '<div id="end_date_div" style="display:none;">');
129 129
 $form->addElement('DatePicker', 'expired_on', get_lang('ExpirationDate'));
130
-$form->addElement('html','</div>');
130
+$form->addElement('html', '</div>');
131 131
 
132
-$form->addElement('html','</div>');
132
+$form->addElement('html', '</div>');
133 133
 
134
-$defaults['activate_start_date_check']  = 1;
134
+$defaults['activate_start_date_check'] = 1;
135 135
 
136 136
 $defaults['publicated_on'] = date('Y-m-d 08:00:00');
137
-$defaults['expired_on'] = date('Y-m-d 08:00:00',time()+86400);
137
+$defaults['expired_on'] = date('Y-m-d 08:00:00', time() + 86400);
138 138
 
139 139
 $form->setDefaults($defaults);
140 140
 $form->addButtonCreate(get_lang('CreateLearningPath'));
Please login to merge, or discard this patch.
main/newscorm/audiorecorder.inc.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
 if ($audio_recorder_studentview == 'false') {
32 32
     $width = 295;
33
-    $height= 90;
33
+    $height = 90;
34 34
     $player = 'recorder2.swf';
35 35
     $server = (api_get_setting('service_visio', 'visio_use_rtmpt') == 'true' ? 'rtmpt://' : 'rtmp://').api_get_setting('service_visio', 'visio_host').':'.(api_get_setting('service_visio', 'visio_use_rtmpt') == 'true' ? '80' : api_get_setting('service_visio', 'visio_port')).'/recorder';
36 36
     $post_uri = urlencode($web_path.'conference/audiopost.php?course_code='.api_get_course_id().'&user_id='.api_get_user_id().'&checker='.md5(api_get_course_id().api_get_user_id().gmdate('Ymd').$_configuration['security_key']));
@@ -42,8 +42,8 @@  discard block
 block discarded – undo
42 42
     $player = 'player2.swf';
43 43
     $cp = api_get_course_path();
44 44
     $docs = Database::get_course_table(TABLE_DOCUMENT);
45
-    $select = "SELECT * FROM $docs " .
46
-            " WHERE c_id = $course_id AND path like BINARY '/audio/lpi".intval($audio_recorder_item_id)."-%' AND filetype='file' " .
45
+    $select = "SELECT * FROM $docs ".
46
+            " WHERE c_id = $course_id AND path like BINARY '/audio/lpi".intval($audio_recorder_item_id)."-%' AND filetype='file' ".
47 47
             " ORDER BY path DESC";
48 48
     $res = Database::query($select);
49 49
     if (Database::num_rows($res) > 0) {
Please login to merge, or discard this patch.
main/newscorm/lp_add_item.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -24,24 +24,24 @@  discard block
 block discarded – undo
24 24
 
25 25
 $htmlHeadXtra[] = '<script>'.
26 26
 
27
-$learnPath->get_js_dropdown_array() .
27
+$learnPath->get_js_dropdown_array().
28 28
 
29
-'function load_cbo(id){' ."\n" .
29
+'function load_cbo(id){'."\n".
30 30
   'if (!id) {return false;}'.
31
-  'var cbo = document.getElementById(\'previous\');' .
32
-  'for(var i = cbo.length - 1; i > 0; i--) {' .
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" .
31
+  'var cbo = document.getElementById(\'previous\');'.
32
+  'for(var i = cbo.length - 1; i > 0; i--) {'.
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 40
   //'if( typeof cbo != "undefined" ) {'."\n" .
41
-  'cbo.options[k].selected = true;'."\n" .
41
+  'cbo.options[k].selected = true;'."\n".
42 42
    //'}'."\n" .
43 43
 
44
-   '$(\'#previous\').selectpicker(\'refresh\');' .
44
+   '$(\'#previous\').selectpicker(\'refresh\');'.
45 45
 '}
46 46
 
47 47
 $(function() {
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
 $isStudentView  = isset($_REQUEST['isStudentView']) ? $_REQUEST['isStudentView'] : null;
68 68
 $learnpath_id   = isset($_REQUEST['lp_id']) ? intval($_REQUEST['lp_id']) : null;
69
-$submit			= isset($_POST['submit_button']) ? $_POST['submit_button'] : null;
69
+$submit = isset($_POST['submit_button']) ? $_POST['submit_button'] : null;
70 70
 
71 71
 $type = isset($_GET['type']) ? $_GET['type'] : null;
72 72
 $action = isset($_GET['action']) ? $_GET['action'] : null;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 }
88 88
 
89 89
 if (!empty($gradebook) && $gradebook == 'view') {
90
-    $interbreadcrumb[] = array (
90
+    $interbreadcrumb[] = array(
91 91
         'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
92 92
         'name' => get_lang('ToolGradebook')
93 93
     );
@@ -98,19 +98,19 @@  discard block
 block discarded – undo
98 98
 
99 99
 switch ($type) {
100 100
     case 'chapter':
101
-        $interbreadcrumb[]= array('url' => 'lp_controller.php?action=add_item&type=step&lp_id='.$learnPath->get_id(), 'name' => get_lang('NewStep'));
102
-        $interbreadcrumb[]= array('url' => '#', 'name' => get_lang('NewChapter'));
101
+        $interbreadcrumb[] = array('url' => 'lp_controller.php?action=add_item&type=step&lp_id='.$learnPath->get_id(), 'name' => get_lang('NewStep'));
102
+        $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('NewChapter'));
103 103
         break;
104 104
     case 'document':
105
-        $interbreadcrumb[]= array('url' => 'lp_controller.php?action=add_item&type=step&lp_id='.$learnPath->get_id(), 'name' => get_lang('NewStep'));
105
+        $interbreadcrumb[] = array('url' => 'lp_controller.php?action=add_item&type=step&lp_id='.$learnPath->get_id(), 'name' => get_lang('NewStep'));
106 106
         break;
107 107
     default:
108
-        $interbreadcrumb[]= array('url' => '#', 'name' => get_lang('NewStep'));
108
+        $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('NewStep'));
109 109
         break;
110 110
 }
111 111
 
112
-if ($action == 'add_item' && $type == 'document' ) {
113
-    $interbreadcrumb[]= array ('url' => '#', 'name' => get_lang('NewDocumentCreated'));
112
+if ($action == 'add_item' && $type == 'document') {
113
+    $interbreadcrumb[] = array('url' => '#', 'name' => get_lang('NewDocumentCreated'));
114 114
 }
115 115
 
116 116
 // Theme calls.
Please login to merge, or discard this patch.
main/newscorm/lp_build.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -29,12 +29,12 @@  discard block
 block discarded – undo
29 29
 
30 30
 $isStudentView  = (int) $_REQUEST['isStudentView'];
31 31
 $learnpath_id   = (int) $_REQUEST['lp_id'];
32
-$submit			= $_POST['submit_button'];
32
+$submit = $_POST['submit_button'];
33 33
 
34 34
 /* MAIN CODE */
35 35
 
36 36
 // Using the resource linker as a tool for adding resources to the learning path.
37
-if ($action=="add" and $type=="learnpathitem") {
37
+if ($action == "add" and $type == "learnpathitem") {
38 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)) {
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 if ($learnpath_id == 0) {
52 52
     $is_new = true;
53 53
 
54
-    $sql        = "SELECT id FROM " . $tbl_lp . " WHERE c_id = $course_id ORDER BY id DESC LIMIT 0, 1";
54
+    $sql        = "SELECT id FROM ".$tbl_lp." WHERE c_id = $course_id ORDER BY id DESC LIMIT 0, 1";
55 55
     $result     = Database::query($sql);
56 56
     $row        = Database::fetch_array($result);
57 57
     $learnpath_id = $row['id'];
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
 }
74 74
 
75 75
 if (!empty($gradebook) && $gradebook == 'view') {
76
-    $interbreadcrumb[] = array (
77
-        'url' => '../gradebook/' . $_SESSION['gradebook_dest'],
76
+    $interbreadcrumb[] = array(
77
+        'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
78 78
         'name' => get_lang('ToolGradebook')
79 79
     );
80 80
 }
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
 $interbreadcrumb[] = array('url' => '#', "name" => $therow['name']);
83 83
 
84 84
 // Theme calls.
85
-$lp_theme_css=$_SESSION['oLP']->get_theme();
85
+$lp_theme_css = $_SESSION['oLP']->get_theme();
86 86
 $show_learn_path = true;
87 87
 Display::display_header('', 'Path');
88 88
 $suredel = trim(get_lang('AreYouSureToDeleteJS'));
@@ -132,11 +132,11 @@  discard block
 block discarded – undo
132 132
 
133 133
     echo '<ul id="lp_overview" class="thumbnails">';
134 134
 
135
-    echo show_block('lp_controller.php?'.api_get_cidreq().'&gradebook='.$gradebook.'&action=add_item&type=step&lp_id=' . $_SESSION['oLP']->lp_id, get_lang("NewStep"), get_lang('NewStepComment'), 'tools.png');
135
+    echo show_block('lp_controller.php?'.api_get_cidreq().'&gradebook='.$gradebook.'&action=add_item&type=step&lp_id='.$_SESSION['oLP']->lp_id, get_lang("NewStep"), get_lang('NewStepComment'), 'tools.png');
136 136
 
137 137
 //    echo show_block('lp_controller.php?'.api_get_cidreq().'&gradebook='.$gradebook.'&action=admin_view&updateaudio=true&lp_id=' . $_SESSION['oLP']->lp_id, get_lang("BasicOverview"), get_lang('BasicOverviewComment'), 'audio.png');
138 138
 
139
-    echo show_block('lp_controller.php?'.api_get_cidreq().'&gradebook='.$gradebook.'&action=view&lp_id=' . $_SESSION['oLP']->lp_id, get_lang("Display"), get_lang('DisplayComment'), 'view.png');
139
+    echo show_block('lp_controller.php?'.api_get_cidreq().'&gradebook='.$gradebook.'&action=view&lp_id='.$_SESSION['oLP']->lp_id, get_lang("Display"), get_lang('DisplayComment'), 'view.png');
140 140
 
141 141
     //echo show_block('lp_controller.php?'.api_get_cidreq().'&gradebook='.$gradebook.'&action=edit&lp_id=' . $_SESSION['oLP']->lp_id, get_lang("Settings"), null, 'reference.png');
142 142
 
@@ -148,15 +148,15 @@  discard block
 block discarded – undo
148 148
 
149 149
 function show_block($link, $title, $subtitle, $icon) {
150 150
     $html = '<li class="col-md-4">';
151
-        $html .=  '<div class="thumbnail">';
152
-        $html .=  '<a href="'.$link.'" title="'.$title.'">';
153
-        $html .=  Display::return_icon($icon, $title, array(), ICON_SIZE_BIG);
154
-        $html .=  '</a>';
155
-        $html .=  '<div class="caption">';
156
-        $html .=  '<strong>'.$title.'</strong></a> '.$subtitle;
157
-        $html .=  '</div>';
158
-        $html .=  '</div>';
159
-    $html .=  '</li>';
151
+        $html .= '<div class="thumbnail">';
152
+        $html .= '<a href="'.$link.'" title="'.$title.'">';
153
+        $html .= Display::return_icon($icon, $title, array(), ICON_SIZE_BIG);
154
+        $html .= '</a>';
155
+        $html .= '<div class="caption">';
156
+        $html .= '<strong>'.$title.'</strong></a> '.$subtitle;
157
+        $html .= '</div>';
158
+        $html .= '</div>';
159
+    $html .= '</li>';
160 160
     return $html;
161 161
 }
162 162
 
Please login to merge, or discard this patch.
main/newscorm/aicc_hacp.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 //$_user							= $_SESSION['_user'];
56 56
 $file = $_SESSION['file'];
57 57
 $oLP = unserialize($_SESSION['lpobject']);
58
-$oItem =& $oLP->items[$oLP->current];
58
+$oItem = & $oLP->items[$oLP->current];
59 59
 if (!is_object($oItem)) {
60 60
     error_log('New LP - aicc_hacp - Could not load oItem item', 0);
61 61
     exit;
@@ -69,8 +69,8 @@  discard block
 block discarded – undo
69 69
     'evaluation' => array(),
70 70
     'student_data' => array(),
71 71
 );
72
-$convert_enc = array('%25','%0D','%0A','%09','%20','%2D','%2F','%3B','%3F','%7B','%7D','%7C','%5C','%5E','%7E','%5B','%5D','%60','%23','%3E','%3C','%22');
73
-$convert_dec = array('%',"\r","\n","\t",' ','-','/',';','?','{','}','|','\\','^','~','[',']','`','#','>','<','"');
72
+$convert_enc = array('%25', '%0D', '%0A', '%09', '%20', '%2D', '%2F', '%3B', '%3F', '%7B', '%7D', '%7C', '%5C', '%5E', '%7E', '%5B', '%5D', '%60', '%23', '%3E', '%3C', '%22');
73
+$convert_dec = array('%', "\r", "\n", "\t", ' ', '-', '/', ';', '?', '{', '}', '|', '\\', '^', '~', '[', ']', '`', '#', '>', '<', '"');
74 74
 $crlf = "\r\n";
75 75
 //$tab = "\t";
76 76
 $tab = "";
Please login to merge, or discard this patch.
main/newscorm/aiccItem.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@
 block discarded – undo
117 117
         $abs_order++;
118 118
         $i = 1;
119 119
         foreach ($this->sub_items as $id => $dummy) {
120
-            $oSubitem =& $this->sub_items[$id];
120
+            $oSubitem = & $this->sub_items[$id];
121 121
             $oSubitem->get_flat_list($list, $abs_order, $i, $level + 1);
122 122
             $i++;
123 123
         }
Please login to merge, or discard this patch.