@@ -58,11 +58,11 @@ |
||
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() { |
@@ -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) { |
@@ -27,21 +27,21 @@ discard block |
||
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 |
||
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'); |
@@ -24,24 +24,24 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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. |
@@ -15,15 +15,15 @@ discard block |
||
15 | 15 | require_once api_get_path(LIBRARY_PATH).'search/IndexableChunk.class.php'; |
16 | 16 | require_once api_get_path(LIBRARY_PATH).'specific_fields_manager.lib.php'; |
17 | 17 | |
18 | -$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'. api_get_path(WEB_PATH) .'main/newscorm/lp_list_search.css" />'; |
|
18 | +$htmlHeadXtra[] = '<link rel="stylesheet" type="text/css" href="'.api_get_path(WEB_PATH).'main/newscorm/lp_list_search.css" />'; |
|
19 | 19 | Event::event_access_tool(TOOL_SEARCH); |
20 | 20 | |
21 | -if (isset($_SESSION['gradebook'])){ |
|
21 | +if (isset($_SESSION['gradebook'])) { |
|
22 | 22 | $gradebook = $_SESSION['gradebook']; |
23 | 23 | } |
24 | 24 | |
25 | 25 | if (!empty($gradebook) && $gradebook == 'view') { |
26 | - $interbreadcrumb[]= array ( |
|
26 | + $interbreadcrumb[] = array( |
|
27 | 27 | 'url' => '../gradebook/'.$_SESSION['gradebook_dest'], |
28 | 28 | 'name' => get_lang('ToolGradebook') |
29 | 29 | ); |
@@ -59,8 +59,8 @@ discard block |
||
59 | 59 | $term_array = array(); |
60 | 60 | $specific_fields = get_specific_field_list(); |
61 | 61 | foreach ($specific_fields as $specific_field) { |
62 | - if (!empty($_REQUEST[ 'sf_'. $specific_field['code'] ])) { |
|
63 | - $values = $_REQUEST[ 'sf_'. $specific_field['code'] ]; |
|
62 | + if (!empty($_REQUEST['sf_'.$specific_field['code']])) { |
|
63 | + $values = $_REQUEST['sf_'.$specific_field['code']]; |
|
64 | 64 | if (in_array('__all__', $values)) { |
65 | 65 | $sf_terms_for_code = xapian_get_all_terms(1000, $specific_field['code']); |
66 | 66 | foreach ($sf_terms_for_code as $term) { |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | foreach ($values as $term) { |
73 | 73 | if (!empty($term)) { |
74 | 74 | $prefix = $specific_field['code']; |
75 | - $term_array[] = chamilo_get_boolean_query($prefix . $term); |
|
75 | + $term_array[] = chamilo_get_boolean_query($prefix.$term); |
|
76 | 76 | } |
77 | 77 | } |
78 | 78 | } |
@@ -90,9 +90,9 @@ discard block |
||
90 | 90 | // Get right group of terms to show on multiple select. |
91 | 91 | $fixed_queries = array(); |
92 | 92 | $course_filter = null; |
93 | -if ( ($cid=api_get_course_id()) != -1 ) { |
|
93 | +if (($cid = api_get_course_id()) != -1) { |
|
94 | 94 | // Results only from actual course. |
95 | - $course_filter = chamilo_get_boolean_query(XAPIAN_PREFIX_COURSEID . $cid); |
|
95 | + $course_filter = chamilo_get_boolean_query(XAPIAN_PREFIX_COURSEID.$cid); |
|
96 | 96 | } |
97 | 97 | |
98 | 98 | if (count($term_array)) { |
@@ -137,12 +137,12 @@ discard block |
||
137 | 137 | } |
138 | 138 | |
139 | 139 | if ($mode == 'gallery') { |
140 | - $title = $a_prefix.str_replace('_',' ',$result['title']). $a_sufix; |
|
140 | + $title = $a_prefix.str_replace('_', ' ', $result['title']).$a_sufix; |
|
141 | 141 | $blocks[] = array( |
142 | - $a_prefix .'<img src="'.$result['thumbnail'].'" />'. $a_sufix .'<br />'.$title.'<br />'.$result['author'], |
|
142 | + $a_prefix.'<img src="'.$result['thumbnail'].'" />'.$a_sufix.'<br />'.$title.'<br />'.$result['author'], |
|
143 | 143 | ); |
144 | 144 | } else { |
145 | - $title = '<div style="text-align:left;">'. $a_prefix . $result['title']. $a_sufix .(!empty($result['author']) ? ' '.$result['author'] : '').'<div>'; |
|
145 | + $title = '<div style="text-align:left;">'.$a_prefix.$result['title'].$a_sufix.(!empty($result['author']) ? ' '.$result['author'] : '').'<div>'; |
|
146 | 146 | $blocks[] = array($title); |
147 | 147 | } |
148 | 148 | } |
@@ -154,19 +154,19 @@ discard block |
||
154 | 154 | $s->display_mode = $mode; // default |
155 | 155 | $s->display_mode_params = 3; |
156 | 156 | $s->per_page = 9; |
157 | - $additional_parameters = array ( |
|
157 | + $additional_parameters = array( |
|
158 | 158 | 'mode' => $mode, |
159 | 159 | 'action' => 'search', |
160 | 160 | 'query' => Security::remove_XSS($_REQUEST['query']), |
161 | 161 | ); |
162 | 162 | $get_params = ''; |
163 | 163 | foreach ($specific_fields as $specific_field) { |
164 | - if (isset($_REQUEST[ 'sf_'. $specific_field['code'] ])) { |
|
165 | - $values = $_REQUEST[ 'sf_'. $specific_field['code'] ]; |
|
164 | + if (isset($_REQUEST['sf_'.$specific_field['code']])) { |
|
165 | + $values = $_REQUEST['sf_'.$specific_field['code']]; |
|
166 | 166 | //Sortable additional_parameters doesn't accept multi dimensional arrays |
167 | 167 | //$additional_parameters[ 'sf_'. $specific_field['code'] ] = $values; |
168 | - foreach ( $values as $value ) { |
|
169 | - $get_params .= '&sf_' . $specific_field['code'] .'[]='. $value; |
|
168 | + foreach ($values as $value) { |
|
169 | + $get_params .= '&sf_'.$specific_field['code'].'[]='.$value; |
|
170 | 170 | } |
171 | 171 | $get_params .= '&'; |
172 | 172 | } |
@@ -183,9 +183,9 @@ discard block |
||
183 | 183 | |
184 | 184 | $mode_selector = '<div id="mode-selector">'; |
185 | 185 | $mode_selector .= sprintf($search_link, api_get_path(WEB_CODE_PATH), 'gallery', $_REQUEST['query'], $get_params); |
186 | - $mode_selector .= '<img src="../img/'. (($mode=='gallery')?'ButtonGallOn':'ButtonGallOff') .'.png" /></a>'; |
|
186 | + $mode_selector .= '<img src="../img/'.(($mode == 'gallery') ? 'ButtonGallOn' : 'ButtonGallOff').'.png" /></a>'; |
|
187 | 187 | $mode_selector .= sprintf($search_link, api_get_path(WEB_CODE_PATH), 'default', $_REQUEST['query'], $get_params); |
188 | - $mode_selector .= '<img src="../img/'.(($mode=='default')?'ButtonListOn':'ButtonListOff').'.png" /></a>'; |
|
188 | + $mode_selector .= '<img src="../img/'.(($mode == 'default') ? 'ButtonListOn' : 'ButtonListOff').'.png" /></a>'; |
|
189 | 189 | $mode_selector .= '</div>'; |
190 | 190 | |
191 | 191 | echo '<div id="search-results-container">'; |
@@ -35,7 +35,7 @@ |
||
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'); |
@@ -29,12 +29,12 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -55,7 +55,7 @@ discard block |
||
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 |
||
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 = ""; |
@@ -48,7 +48,7 @@ discard block |
||
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 |
||
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 | } |
@@ -117,7 +117,7 @@ |
||
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 | } |
@@ -163,7 +163,7 @@ |
||
163 | 163 | exit; |
164 | 164 | } else { |
165 | 165 | $headers = [get_lang('SubscribeUsersToLp'), get_lang('SubscribeGroupsToLp')]; |
166 | - $tabs = Display::tabs($headers, [$formUsers->toHtml(),$form->toHtml()]); |
|
166 | + $tabs = Display::tabs($headers, [$formUsers->toHtml(), $form->toHtml()]); |
|
167 | 167 | $tpl->assign('tabs', $tabs); |
168 | 168 | } |
169 | 169 |
@@ -20,7 +20,7 @@ discard block |
||
20 | 20 | $this_section = SECTION_COURSES; |
21 | 21 | |
22 | 22 | if ($lp_controller_touched != 1) { |
23 | - header('location: lp_controller.php?action=view&item_id=' . intval($_REQUEST['item_id'])); |
|
23 | + header('location: lp_controller.php?action=view&item_id='.intval($_REQUEST['item_id'])); |
|
24 | 24 | exit; |
25 | 25 | } |
26 | 26 | |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | //Impress js |
101 | 101 | if ($_SESSION['oLP']->mode == 'impress') { |
102 | 102 | $lp_id = $_SESSION['oLP']->get_id(); |
103 | - $url = api_get_path(WEB_CODE_PATH) . "newscorm/lp_impress.php?lp_id=$lp_id&" . api_get_cidreq(); |
|
103 | + $url = api_get_path(WEB_CODE_PATH)."newscorm/lp_impress.php?lp_id=$lp_id&".api_get_cidreq(); |
|
104 | 104 | header("Location: $url"); |
105 | 105 | exit; |
106 | 106 | } |
@@ -118,15 +118,15 @@ discard block |
||
118 | 118 | |
119 | 119 | // additional APIs |
120 | 120 | $htmlHeadXtra[] = '<script> |
121 | -chamilo_courseCode = "' . $course_code . '"; |
|
121 | +chamilo_courseCode = "' . $course_code.'"; |
|
122 | 122 | </script>'; |
123 | 123 | // Document API |
124 | 124 | $htmlHeadXtra[] = '<script src="js/documentapi.js" type="text/javascript" language="javascript"></script>'; |
125 | 125 | // Storage API |
126 | 126 | $htmlHeadXtra[] = '<script> |
127 | -var sv_user = \'' . api_get_user_id() . '\'; |
|
127 | +var sv_user = \'' . api_get_user_id().'\'; |
|
128 | 128 | var sv_course = chamilo_courseCode; |
129 | -var sv_sco = \'' . $lp_id . '\'; |
|
129 | +var sv_sco = \'' . $lp_id.'\'; |
|
130 | 130 | </script>'; // FIXME fetch sco and userid from a more reliable source directly in sotrageapi.js |
131 | 131 | $htmlHeadXtra[] = '<script type="text/javascript" src="js/storageapi.js"></script>'; |
132 | 132 | |
@@ -197,7 +197,7 @@ discard block |
||
197 | 197 | case 3: |
198 | 198 | // aicc |
199 | 199 | $_SESSION['oLP']->stop_previous_item(); // save status manually if asset |
200 | - $htmlHeadXtra[] = '<script src="' . $_SESSION['oLP']->get_js_lib().'" type="text/javascript" language="javascript"></script>'; |
|
200 | + $htmlHeadXtra[] = '<script src="'.$_SESSION['oLP']->get_js_lib().'" type="text/javascript" language="javascript"></script>'; |
|
201 | 201 | $preReqCheck = $_SESSION['oLP']->prerequisites_match($lp_item_id); |
202 | 202 | if ($preReqCheck === true) { |
203 | 203 | $src = $_SESSION['oLP']->get_link( |
@@ -219,10 +219,10 @@ discard block |
||
219 | 219 | // Update status, total_time from lp_item_view table when you finish the exercises in learning path. |
220 | 220 | |
221 | 221 | if ($debug) { |
222 | - error_log('$type_quiz: ' . $type_quiz); |
|
223 | - error_log('$_REQUEST[exeId]: ' . intval($_REQUEST['exeId'])); |
|
224 | - error_log('$lp_id: ' . $lp_id); |
|
225 | - error_log('$_GET[lp_item_id]: ' . intval($_GET['lp_item_id'])); |
|
222 | + error_log('$type_quiz: '.$type_quiz); |
|
223 | + error_log('$_REQUEST[exeId]: '.intval($_REQUEST['exeId'])); |
|
224 | + error_log('$lp_id: '.$lp_id); |
|
225 | + error_log('$_GET[lp_item_id]: '.intval($_GET['lp_item_id'])); |
|
226 | 226 | } |
227 | 227 | |
228 | 228 | if ( |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | $safe_item_id == strval(intval($safe_item_id)) |
246 | 246 | ) { |
247 | 247 | $sql = 'SELECT start_date, exe_date, exe_result, exe_weighting, exe_exo_id |
248 | - FROM ' . $TBL_TRACK_EXERCICES . ' |
|
248 | + FROM ' . $TBL_TRACK_EXERCICES.' |
|
249 | 249 | WHERE exe_id = ' . $safe_exe_id; |
250 | 250 | $res = Database::query($sql); |
251 | 251 | $row_dates = Database::fetch_array($res); |
@@ -259,14 +259,14 @@ discard block |
||
259 | 259 | |
260 | 260 | $sql = "UPDATE $TBL_LP_ITEM SET |
261 | 261 | max_score = '$max_score' |
262 | - WHERE c_id = $course_id AND id = '" . $safe_item_id . "'"; |
|
262 | + WHERE c_id = $course_id AND id = '".$safe_item_id."'"; |
|
263 | 263 | Database::query($sql); |
264 | 264 | |
265 | 265 | $sql = "SELECT id FROM $TBL_LP_ITEM_VIEW |
266 | 266 | WHERE |
267 | 267 | c_id = $course_id AND |
268 | 268 | lp_item_id = '$safe_item_id' AND |
269 | - lp_view_id = '" . $_SESSION['oLP']->lp_view_id . "' |
|
269 | + lp_view_id = '".$_SESSION['oLP']->lp_view_id."' |
|
270 | 270 | ORDER BY id DESC |
271 | 271 | LIMIT 1"; |
272 | 272 | $res_last_attempt = Database::query($sql); |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | status = '$status', |
296 | 296 | score = $score, |
297 | 297 | total_time = $mytime |
298 | - WHERE id='" . $lp_item_view_id . "' AND c_id = $course_id "; |
|
298 | + WHERE id='".$lp_item_view_id."' AND c_id = $course_id "; |
|
299 | 299 | |
300 | 300 | if ($debug) { |
301 | 301 | error_log($sql); |
@@ -305,17 +305,17 @@ discard block |
||
305 | 305 | |
306 | 306 | $sql = "UPDATE $TBL_TRACK_EXERCICES SET |
307 | 307 | orig_lp_item_view_id = $lp_item_view_id |
308 | - WHERE exe_id = " . $safe_exe_id; |
|
308 | + WHERE exe_id = ".$safe_exe_id; |
|
309 | 309 | Database::query($sql); |
310 | 310 | } |
311 | 311 | } |
312 | 312 | if (intval($_GET['fb_type']) > 0) { |
313 | 313 | $src = 'blank.php?msg=exerciseFinished'; |
314 | 314 | } else { |
315 | - $src = api_get_path(WEB_CODE_PATH) . 'exercice/result.php?origin=learnpath&id=' . $safe_exe_id.'&'.api_get_cidreq(); |
|
315 | + $src = api_get_path(WEB_CODE_PATH).'exercice/result.php?origin=learnpath&id='.$safe_exe_id.'&'.api_get_cidreq(); |
|
316 | 316 | |
317 | 317 | if ($debug) { |
318 | - error_log('Calling URL: ' . $src); |
|
318 | + error_log('Calling URL: '.$src); |
|
319 | 319 | } |
320 | 320 | } |
321 | 321 | $autostart = 'false'; |
@@ -373,8 +373,8 @@ discard block |
||
373 | 373 | $tbl_lp_item = Database::get_course_table(TABLE_LP_ITEM); |
374 | 374 | $show_audioplayer = false; |
375 | 375 | // Getting all the information about the item. |
376 | -$sql = "SELECT audio FROM " . $tbl_lp_item . " |
|
377 | - WHERE c_id = $course_id AND lp_id = '" . $_SESSION['oLP']->lp_id . "'"; |
|
376 | +$sql = "SELECT audio FROM ".$tbl_lp_item." |
|
377 | + WHERE c_id = $course_id AND lp_id = '".$_SESSION['oLP']->lp_id."'"; |
|
378 | 378 | $res_media = Database::query($sql); |
379 | 379 | |
380 | 380 | if (Database::num_rows($res_media) > 0) { |
@@ -397,7 +397,7 @@ discard block |
||
397 | 397 | 'name' => get_lang('LearningPaths') |
398 | 398 | ); |
399 | 399 | $interbreadcrumb[] = array( |
400 | - 'url' => api_get_self() . "?action=add_item&type=step&lp_id={$_SESSION['oLP']->lp_id}&isStudentView=false", |
|
400 | + 'url' => api_get_self()."?action=add_item&type=step&lp_id={$_SESSION['oLP']->lp_id}&isStudentView=false", |
|
401 | 401 | 'name' => $_SESSION['oLP']->get_name() |
402 | 402 | ); |
403 | 403 | $interbreadcrumb[] = array( |
@@ -409,12 +409,12 @@ discard block |
||
409 | 409 | |
410 | 410 | // Return to course home. |
411 | 411 | if ($is_allowed_to_edit) { |
412 | - $buttonHomeUrl = 'lp_controller.php?' . api_get_cidreq() . '&' . http_build_query([ |
|
412 | + $buttonHomeUrl = 'lp_controller.php?'.api_get_cidreq().'&'.http_build_query([ |
|
413 | 413 | 'isStudentView' => 'false', |
414 | 414 | 'action' => 'return_to_course_homepage' |
415 | 415 | ]); |
416 | 416 | } else { |
417 | - $buttonHomeUrl = 'lp_controller.php?' . api_get_cidreq() . '&' . http_build_query([ |
|
417 | + $buttonHomeUrl = 'lp_controller.php?'.api_get_cidreq().'&'.http_build_query([ |
|
418 | 418 | 'action' => 'return_to_course_homepage' |
419 | 419 | ]); |
420 | 420 | } |
@@ -519,7 +519,7 @@ discard block |
||
519 | 519 | |
520 | 520 | $template->assign('lp_author', $_SESSION['oLP']->get_author()); |
521 | 521 | $template->assign('lp_mode', $_SESSION['oLP']->mode); |
522 | -$template->assign('lp_title_scorm',$_SESSION['oLP']->name); |
|
522 | +$template->assign('lp_title_scorm', $_SESSION['oLP']->name); |
|
523 | 523 | $template->assign( |
524 | 524 | 'lp_html_toc', |
525 | 525 | $_SESSION['oLP']->get_html_toc($get_toc_list) |
@@ -198,7 +198,7 @@ |
||
198 | 198 | //"lms_progress_bar_mode='".$myprogress_mode."';" . |
199 | 199 | "olms.lms_view_id=".$view_id.";". |
200 | 200 | "olms.lms_user_id=".$user_id.";". |
201 | - "olms.next_item=".$new_item_id.";". // This one is very important to replace possible literal strings. |
|
201 | + "olms.next_item=".$new_item_id.";".// This one is very important to replace possible literal strings. |
|
202 | 202 | "olms.lms_next_item=".$mynext.";". |
203 | 203 | "olms.lms_previous_item=".$myprevious.";". |
204 | 204 | "olms.lms_item_type = '".$myitemtype."';". |