@@ -16,7 +16,7 @@ |
||
16 | 16 | Display::display_reduced_header(); |
17 | 17 | |
18 | 18 | if (isset($_GET['error'])) { |
19 | - switch ($_GET['error']){ |
|
19 | + switch ($_GET['error']) { |
|
20 | 20 | case 'document_deleted': |
21 | 21 | echo '<br /><br />'; |
22 | 22 | Display::display_error_message(get_lang('DocumentHasBeenDeleted')); |
@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | null, |
36 | 36 | api_get_group_id() |
37 | 37 | ); |
38 | -if (!api_is_allowed_to_edit(null, true) && intval($visibility) == 0 ) { |
|
38 | +if (!api_is_allowed_to_edit(null, true) && intval($visibility) == 0) { |
|
39 | 39 | api_not_allowed(); |
40 | 40 | } |
41 | 41 | |
@@ -73,22 +73,22 @@ discard block |
||
73 | 73 | $html = ''; |
74 | 74 | $step = 1; |
75 | 75 | foreach ($list as $toc) { |
76 | - $x = 1000*$step; |
|
76 | + $x = 1000 * $step; |
|
77 | 77 | $html .= '<div id="step-'.$step.'" class="step slide" data-x="'.$x.'" data-y="-1500" >'; |
78 | 78 | $html .= '<div class="impress-content">'; |
79 | 79 | $src = $_SESSION['oLP']->get_link('http', $toc['id']); |
80 | 80 | if ($toc['type'] !== 'dokeos_chapter') { |
81 | 81 | //just showing the src in a iframe ... |
82 | 82 | $html .= '<h2>'.$toc['title'].'</h2>'; |
83 | - $html .= '<iframe border="0" frameborder="0" style="width:100%;height:600px" src="' . $src . '"></iframe>'; |
|
84 | - }else{ |
|
83 | + $html .= '<iframe border="0" frameborder="0" style="width:100%;height:600px" src="'.$src.'"></iframe>'; |
|
84 | + } else { |
|
85 | 85 | $html .= "<div class='impress-title'>"; |
86 | 86 | $html .= '<h1>'.$toc['title'].'</h1>'; |
87 | 87 | $html .= "</div>"; |
88 | 88 | } |
89 | 89 | $html .= "</div>"; |
90 | 90 | $html .= "</div>"; |
91 | - $step ++; |
|
91 | + $step++; |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | //Setting the template |
@@ -98,7 +98,7 @@ |
||
98 | 98 | foreach ($this->items as $id => $dummy) { |
99 | 99 | $abs_order = 0; |
100 | 100 | // Passes the array as a pointer so it is modified in $list directly. |
101 | - $this->items[$id]->get_flat_list($list,$abs_order, $i, 0); |
|
101 | + $this->items[$id]->get_flat_list($list, $abs_order, $i, 0); |
|
102 | 102 | $i++; |
103 | 103 | } |
104 | 104 |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | and sco_id = '$sv_sco' |
104 | 104 | and course_id = '$sv_course' |
105 | 105 | and sv_key = '$sv_key' |
106 | - order by sv_value ".($sv_asc ? "ASC": "DESC")." limit $sv_length"; |
|
106 | + order by sv_value ".($sv_asc ? "ASC" : "DESC")." limit $sv_length"; |
|
107 | 107 | // $sql_data = "select sv.user_id as user_id, sv_key as variable, sv_value as value |
108 | 108 | // from ".Database::get_main_table(TABLE_TRACK_STORED_VALUES)." sv |
109 | 109 | // where sv.user_id in (select u2.user_id from ($sql_leaders) u2) |
@@ -135,7 +135,7 @@ discard block |
||
135 | 135 | and search.sco_id = '$sv_sco' |
136 | 136 | and search.course_id = '$sv_course' |
137 | 137 | and search.sv_key = '$sv_key' |
138 | - and list.sv_value ".($sv_asc ? "<=": ">=")." search.sv_value |
|
138 | + and list.sv_value ".($sv_asc ? "<=" : ">=")." search.sv_value |
|
139 | 139 | and list.sco_id = search.sco_id |
140 | 140 | and list.course_id = search.course_id |
141 | 141 | and list.sv_key = search.sv_key |
@@ -88,7 +88,7 @@ |
||
88 | 88 | //$keep_href = ''; |
89 | 89 | if (is_array($attributes)) { |
90 | 90 | foreach ($attributes as $attrib) { |
91 | - if (trim($attrib->value) != ''){ |
|
91 | + if (trim($attrib->value) != '') { |
|
92 | 92 | $this->attribs[$attrib->name] = $attrib->value; |
93 | 93 | } |
94 | 94 | } |
@@ -100,7 +100,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 | } |
@@ -25,7 +25,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -68,12 +68,12 @@ discard block |
||
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 |
||
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 |
||
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')); |
@@ -30,7 +30,7 @@ discard block |
||
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 |
||
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) { |