@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | $racine = api_get_path(SYS_PATH).'/'.$currentCourseID.'/images/'; |
114 | 114 | $chemin = $racine; |
115 | 115 | $name = $tool[1]; |
116 | - $image = $tool[3]; |
|
116 | + $image = $tool[3]; |
|
117 | 117 | |
118 | 118 | $content .= "<tr>\n". |
119 | 119 | "<td colspan=\"4\">\n". |
@@ -126,14 +126,14 @@ discard block |
||
126 | 126 | "</td>\n". |
127 | 127 | "<td>\n". |
128 | 128 | "<select name=\"image\">\n". |
129 | - "<option selected>". $image. "</option>\n"; |
|
129 | + "<option selected>".$image."</option>\n"; |
|
130 | 130 | |
131 | 131 | if ($dir = @opendir($chemin)) { |
132 | 132 | while ($file = readdir($dir)) { |
133 | 133 | if ($file == '..' || $file == '.') { |
134 | 134 | unset($file); |
135 | 135 | } |
136 | - $content .= "<option>". $file. "</option>\n"; |
|
136 | + $content .= "<option>".$file."</option>\n"; |
|
137 | 137 | } |
138 | 138 | closedir($dir); |
139 | 139 | } |
@@ -142,15 +142,15 @@ discard block |
||
142 | 142 | "</td>\n". |
143 | 143 | "</tr>\n". |
144 | 144 | "<tr>\n". |
145 | - "<td>". get_lang('NameOfTheLink'). " : </td>\n". |
|
146 | - "<td><input type=\"text\" name=\"name\" value=\"". $name. "\"></td>\n". |
|
145 | + "<td>".get_lang('NameOfTheLink')." : </td>\n". |
|
146 | + "<td><input type=\"text\" name=\"name\" value=\"".$name."\"></td>\n". |
|
147 | 147 | "</tr>\n". |
148 | 148 | "<tr>\n". |
149 | 149 | "<td>Lien :</td>\n". |
150 | - "<td><input type=\"text\" name=\"link\" value=\"". $link. "\"></td>\n". |
|
150 | + "<td><input type=\"text\" name=\"link\" value=\"".$link."\"></td>\n". |
|
151 | 151 | "</tr>\n". |
152 | 152 | "<tr>\n". |
153 | - "<td colspan=\"2\"><input type=\"submit\" name=\"submit\" value=\"". get_lang('Ok'). "\"></td>\n". |
|
153 | + "<td colspan=\"2\"><input type=\"submit\" name=\"submit\" value=\"".get_lang('Ok')."\"></td>\n". |
|
154 | 154 | "</tr>\n". |
155 | 155 | "</form>\n". |
156 | 156 | "</table>\n". |
@@ -208,21 +208,21 @@ discard block |
||
208 | 208 | "<tr><td colspan=\"6\"><font color=\"#F66105\">\n".get_lang('CourseAdminOnly')."</font> |
209 | 209 | </td></tr>\n"; |
210 | 210 | $content .= "<tr>\n<td colspan=\"6\">"; |
211 | - $content .=CourseHome::show_tool_3column('courseAdmin'); |
|
211 | + $content .= CourseHome::show_tool_3column('courseAdmin'); |
|
212 | 212 | $content .= "</td>\n</tr>\n"; |
213 | 213 | } |
214 | 214 | |
215 | 215 | /* TOOLS FOR PLATFORM ADMIN ONLY */ |
216 | 216 | if (api_is_platform_admin() && api_is_allowed_to_edit(null, true) && !api_is_coach()) { |
217 | - $content .= "<tr>"."<td colspan=\"6\">". |
|
217 | + $content .= "<tr>"."<td colspan=\"6\">". |
|
218 | 218 | "<hr noshade size=\"1\" />". |
219 | 219 | "</td>"."</tr>\n". |
220 | 220 | "<tr>\n"."<td colspan=\"6\">\n". |
221 | - "<font color=\"#F66105\" >". get_lang('PlatformAdminOnly'). "</font>\n". |
|
221 | + "<font color=\"#F66105\" >".get_lang('PlatformAdminOnly')."</font>\n". |
|
222 | 222 | "</td>\n"."</tr>\n"; |
223 | - $content .= "<tr>\n<td colspan=\"6\">"; |
|
223 | + $content .= "<tr>\n<td colspan=\"6\">"; |
|
224 | 224 | $content .= CourseHome::show_tool_3column('platformAdmin'); |
225 | - $content .= "</td>\n</tr>\n"; |
|
225 | + $content .= "</td>\n</tr>\n"; |
|
226 | 226 | } |
227 | 227 | |
228 | -$content .= "</table>\n"; |
|
228 | +$content .= "</table>\n"; |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | // Show message to confirm that a tool it to be hidden from available tools |
39 | 39 | // visibility 0,1->2 |
40 | 40 | if (!empty($_GET['askDelete'])) { |
41 | - $content .='<div id="toolhide">'.get_lang('DelLk').'<br /> |
|
41 | + $content .= '<div id="toolhide">'.get_lang('DelLk').'<br /> |
|
42 | 42 | <a href="'.api_get_self().'">'.get_lang('No').'</a> | |
43 | 43 | <a href="'.api_get_self().'?delete=yes&id='.$id.'">'.get_lang('Yes').'</a> |
44 | 44 | </div>'; |
@@ -56,14 +56,14 @@ discard block |
||
56 | 56 | |
57 | 57 | // Start of tools for CourseAdmins (teachers/tutors) |
58 | 58 | if (api_is_allowed_to_edit(null, true) && !api_is_coach()) { |
59 | - $content .= '<div class="courseadminview" style="border:0px; margin-top: 0px;padding:5px;"> |
|
59 | + $content .= '<div class="courseadminview" style="border:0px; margin-top: 0px;padding:5px;"> |
|
60 | 60 | <div class="normal-message" id="id_normal_message" style="display:none">'; |
61 | - $content .= '<img src="'.api_get_path(WEB_PATH).'main/inc/lib/javascript/indicator.gif"/> '; |
|
62 | - $content .= get_lang('PleaseStandBy'); |
|
61 | + $content .= '<img src="'.api_get_path(WEB_PATH).'main/inc/lib/javascript/indicator.gif"/> '; |
|
62 | + $content .= get_lang('PleaseStandBy'); |
|
63 | 63 | |
64 | - $content .= '</div> |
|
64 | + $content .= '</div> |
|
65 | 65 | <div class="confirmation-message" id="id_confirmation_message" style="display:none"></div></div>'; |
66 | - $content .= '<div id="activity-3col">'; |
|
66 | + $content .= '<div id="activity-3col">'; |
|
67 | 67 | |
68 | 68 | if (api_get_setting('show_session_data') == 'true' && $session_id > 0) { |
69 | 69 | $content .= '<div class="courseadminview-activity-3col"><span class="viewcaption">'.get_lang('SessionData').'</span> |
@@ -91,10 +91,10 @@ discard block |
||
91 | 91 | $content .= '<div class="courseadminview-activity-3col"><span class="viewcaption">'.get_lang('SessionData').'</span> |
92 | 92 | <table width="100%">'; |
93 | 93 | $content .= CourseHome::show_session_data($session_id); |
94 | - $content .= '</table></div>'; |
|
94 | + $content .= '</table></div>'; |
|
95 | 95 | } |
96 | 96 | |
97 | - $content .= '<div class="Authoringview">'; |
|
97 | + $content .= '<div class="Authoringview">'; |
|
98 | 98 | $my_list = CourseHome::get_tools_category(TOOL_STUDENT_VIEW); |
99 | 99 | $content .= CourseHome::show_tools_category($my_list); |
100 | 100 | $content .= '</div>'; |
@@ -106,19 +106,19 @@ discard block |
||
106 | 106 | $content .= '<div class="course-student-view-activity-3col">'; |
107 | 107 | //ordering by get_lang name |
108 | 108 | $order_tool_list = array(); |
109 | - foreach($my_list as $key=>$new_tool) { |
|
109 | + foreach ($my_list as $key=>$new_tool) { |
|
110 | 110 | $tool_name = CourseHome::translate_tool_name($new_tool); |
111 | - $order_tool_list [$key]= $tool_name; |
|
111 | + $order_tool_list [$key] = $tool_name; |
|
112 | 112 | } |
113 | 113 | natsort($order_tool_list); |
114 | 114 | $my_temp_tool_array = array(); |
115 | - foreach($order_tool_list as $key=>$new_tool) { |
|
115 | + foreach ($order_tool_list as $key=>$new_tool) { |
|
116 | 116 | $my_temp_tool_array[] = $my_list[$key]; |
117 | 117 | } |
118 | 118 | $my_list = $my_temp_tool_array; |
119 | 119 | |
120 | 120 | $i = 0; |
121 | - foreach($my_list as $new_tool) { |
|
121 | + foreach ($my_list as $new_tool) { |
|
122 | 122 | if ($i >= 10) { |
123 | 123 | $my_list2[] = $new_tool; |
124 | 124 | } else { |
@@ -126,8 +126,8 @@ discard block |
||
126 | 126 | } |
127 | 127 | $i++; |
128 | 128 | } |
129 | - $content .=CourseHome::show_tools_category($my_list1); |
|
130 | - $content .=CourseHome::show_tools_category($my_list2); |
|
129 | + $content .= CourseHome::show_tools_category($my_list1); |
|
130 | + $content .= CourseHome::show_tools_category($my_list2); |
|
131 | 131 | $content .= '</div>'; |
132 | 132 | } |
133 | 133 | } |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $msgDestroy = get_lang('DelLk').'<br />'; |
30 | 30 | $msgDestroy .= '<a href="'.api_get_self().'">'.get_lang('No').'</a> | '; |
31 | 31 | $msgDestroy .= '<a href="'.api_get_self().'?destroy=yes&id='.$id.'">'.get_lang('Yes').'</a>'; |
32 | - $show_message .= Display :: return_message($msgDestroy, 'confirmation',false); |
|
32 | + $show_message .= Display :: return_message($msgDestroy, 'confirmation', false); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | /* |
@@ -63,7 +63,7 @@ discard block |
||
63 | 63 | // Show message to confirm that a tool it to be hidden from available tools |
64 | 64 | // visibility 0,1->2 |
65 | 65 | if (!empty($_GET['askDelete'])) { |
66 | - $content .='<div id="toolhide">'.get_lang('DelLk').'<br /> |
|
66 | + $content .= '<div id="toolhide">'.get_lang('DelLk').'<br /> |
|
67 | 67 | <a href="'.api_get_self().'">'.get_lang('No').'</a> | |
68 | 68 | <a href="'.api_get_self().'?delete=yes&id='.intval($_GET['id']).'">'.get_lang('Yes').'</a> |
69 | 69 | </div>'; |
@@ -79,8 +79,8 @@ discard block |
||
79 | 79 | |
80 | 80 | /* TOOLS VISIBLE FOR EVERYBODY */ |
81 | 81 | |
82 | -$content .= '<div class="everybodyview">'; |
|
83 | -$content .= '<table width="100%">'; |
|
82 | +$content .= '<div class="everybodyview">'; |
|
83 | +$content .= '<table width="100%">'; |
|
84 | 84 | $content .= CourseHome::show_tool_2column(TOOL_PUBLIC); |
85 | 85 | $content .= '</table>'; |
86 | 86 | $content .= '</div>'; |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | |
100 | 100 | /* INACTIVE TOOLS - HIDDEN (GREY) LINKS */ |
101 | 101 | |
102 | - $content .= "<tr><td colspan=\"4\"><hr style='color:\"#4171B5\"' noshade=\"noshade\" size=\"1\" /></td></tr>\n". |
|
102 | + $content .= "<tr><td colspan=\"4\"><hr style='color:\"#4171B5\"' noshade=\"noshade\" size=\"1\" /></td></tr>\n". |
|
103 | 103 | "<tr>\n". |
104 | 104 | "<td colspan=\"4\">\n". |
105 | 105 | "<div style=\"margin-bottom: 10px;\"><font color=\"#808080\">\n".get_lang('InLnk')."</font></div>". |
@@ -108,14 +108,14 @@ discard block |
||
108 | 108 | |
109 | 109 | $content .= CourseHome::show_tool_2column(TOOL_PUBLIC_BUT_HIDDEN); |
110 | 110 | |
111 | - $content .= "</table>"; |
|
112 | - $content .= "</div> "; |
|
111 | + $content .= "</table>"; |
|
112 | + $content .= "</div> "; |
|
113 | 113 | } |
114 | 114 | |
115 | 115 | /* Tools for platform admin only */ |
116 | 116 | |
117 | 117 | if (api_is_platform_admin() && api_is_allowed_to_edit(null, true) && !api_is_coach()) { |
118 | - $content .='<div class="platformadminview"> |
|
118 | + $content .= '<div class="platformadminview"> |
|
119 | 119 | <span class="viewcaption">'.get_lang('PlatformAdminOnly').'</span> |
120 | 120 | <table width="100%"> |
121 | 121 | '.CourseHome::show_tool_2column(TOOL_PLATFORM_ADMIN).' |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | //unset($_SESSION['oLP']); |
42 | 42 | //unset($_SESSION['lpobject']); |
43 | 43 | |
44 | -$htmlHeadXtra[] ='<script> |
|
44 | +$htmlHeadXtra[] = '<script> |
|
45 | 45 | /* option show/hide thematic-block */ |
46 | 46 | $(document).ready(function(){ |
47 | 47 | $("#thematic-show").click(function(){ |
@@ -219,13 +219,13 @@ discard block |
||
219 | 219 | $course_id = api_get_course_int_id(); |
220 | 220 | $condition = ''; |
221 | 221 | if (!empty($session_id)) { |
222 | - $condition = api_get_session_condition($session_id); |
|
222 | + $condition = api_get_session_condition($session_id); |
|
223 | 223 | $sql = "SELECT id FROM $lp_table |
224 | 224 | WHERE c_id = $course_id AND autolaunch = 1 $condition |
225 | 225 | LIMIT 1"; |
226 | 226 | $result = Database::query($sql); |
227 | 227 | //If we found nothing in the session we just called the session_id = 0 autolaunch |
228 | - if (Database::num_rows($result) == 0) { |
|
228 | + if (Database::num_rows($result) == 0) { |
|
229 | 229 | $condition = ''; |
230 | 230 | } else { |
231 | 231 | //great, there is an specific auto launch for this session we leave the $condition |
@@ -236,8 +236,8 @@ discard block |
||
236 | 236 | WHERE c_id = $course_id AND autolaunch = 1 $condition |
237 | 237 | LIMIT 1"; |
238 | 238 | $result = Database::query($sql); |
239 | - if (Database::num_rows($result) > 0) { |
|
240 | - $lp_data = Database::fetch_array($result,'ASSOC'); |
|
239 | + if (Database::num_rows($result) > 0) { |
|
240 | + $lp_data = Database::fetch_array($result, 'ASSOC'); |
|
241 | 241 | if (!empty($lp_data['id'])) { |
242 | 242 | if (api_is_platform_admin() || api_is_allowed_to_edit()) { |
243 | 243 | $show_autolaunch_lp_warning = true; |
@@ -22,7 +22,7 @@ discard block |
||
22 | 22 | // Show message to confirm that a tool it to be hidden from available tools |
23 | 23 | // visibility 0,1->2 |
24 | 24 | if (!empty($_GET['askDelete'])) { |
25 | - $content .='<div id="toolhide">'.get_lang('DelLk').'<br /> |
|
25 | + $content .= '<div id="toolhide">'.get_lang('DelLk').'<br /> |
|
26 | 26 | <a href="'.api_get_self().'">'.get_lang('No').'</a> | |
27 | 27 | <a href="'.api_get_self().'?delete=yes&id='.$id.'">'.get_lang('Yes').'</a> |
28 | 28 | </div>'; |
@@ -49,11 +49,11 @@ discard block |
||
49 | 49 | |
50 | 50 | // Start of tools for CourseAdmins (teachers/tutors) |
51 | 51 | if ($session_id == 0 && api_is_course_admin() && api_is_allowed_to_edit(null, true)) { |
52 | - $content .= '<div class="alert alert-success" style="border:0px; margin-top: 0px;padding:0px;"> |
|
52 | + $content .= '<div class="alert alert-success" style="border:0px; margin-top: 0px;padding:0px;"> |
|
53 | 53 | <div class="normal-message" id="id_normal_message" style="display:none">'; |
54 | - $content .= '<img src="'.api_get_path(WEB_PATH).'main/inc/lib/javascript/indicator.gif"/> '; |
|
55 | - $content .= get_lang('PleaseStandBy'); |
|
56 | - $content .= '</div> |
|
54 | + $content .= '<img src="'.api_get_path(WEB_PATH).'main/inc/lib/javascript/indicator.gif"/> '; |
|
55 | + $content .= get_lang('PleaseStandBy'); |
|
56 | + $content .= '</div> |
|
57 | 57 | <div class="alert alert-success" id="id_confirmation_message" style="display:none"></div> |
58 | 58 | </div>'; |
59 | 59 | |
@@ -73,18 +73,18 @@ discard block |
||
73 | 73 | |
74 | 74 | $my_list = CourseHome::get_tools_category(TOOL_AUTHORING); |
75 | 75 | $items = CourseHome::show_tools_category($my_list); |
76 | - $content .= return_block(get_lang('Authoring'), $items, 'course-tools-author'); |
|
76 | + $content .= return_block(get_lang('Authoring'), $items, 'course-tools-author'); |
|
77 | 77 | |
78 | 78 | $my_list = CourseHome::get_tools_category(TOOL_INTERACTION); |
79 | 79 | $list2 = CourseHome::get_tools_category(TOOL_COURSE_PLUGIN); |
80 | 80 | |
81 | - $my_list = array_merge($my_list,$list2); |
|
82 | - $items = CourseHome::show_tools_category($my_list); |
|
83 | - $content .= return_block(get_lang('Interaction'), $items, 'course-tools-interaction'); |
|
81 | + $my_list = array_merge($my_list, $list2); |
|
82 | + $items = CourseHome::show_tools_category($my_list); |
|
83 | + $content .= return_block(get_lang('Interaction'), $items, 'course-tools-interaction'); |
|
84 | 84 | |
85 | 85 | $my_list = CourseHome::get_tools_category(TOOL_ADMIN_PLATFORM); |
86 | 86 | $items = CourseHome::show_tools_category($my_list); |
87 | - $content .= return_block(get_lang('Administration'), $items , 'course-tools-administration'); |
|
87 | + $content .= return_block(get_lang('Administration'), $items, 'course-tools-administration'); |
|
88 | 88 | |
89 | 89 | } elseif (api_is_coach()) { |
90 | 90 | $content .= $pluginExtra; |
@@ -94,10 +94,10 @@ discard block |
||
94 | 94 | <span class="viewcaption">'.get_lang('SessionData').'</span> |
95 | 95 | <table class="course_activity_home">'; |
96 | 96 | $content .= CourseHome::show_session_data($session_id); |
97 | - $content .= '</table></div></div>'; |
|
97 | + $content .= '</table></div></div>'; |
|
98 | 98 | } |
99 | 99 | |
100 | - $content .= '<div class="row">'; |
|
100 | + $content .= '<div class="row">'; |
|
101 | 101 | $my_list = CourseHome::get_tools_category(TOOL_STUDENT_VIEW); |
102 | 102 | $content .= CourseHome::show_tools_category($my_list); |
103 | 103 | $content .= '</div>'; |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | { |
180 | 180 | $html = '<div class="row"> |
181 | 181 | <div class="col-xs-12 col-md-12"> |
182 | - <div class="title-tools">' . $title . '</div> |
|
182 | + <div class="title-tools">' . $title.'</div> |
|
183 | 183 | </div> |
184 | 184 | </div> |
185 | 185 | <div class="row '.$class.'">'.$content.'</div>'; |
@@ -9,7 +9,7 @@ discard block |
||
9 | 9 | |
10 | 10 | require_once '../inc/global.inc.php'; |
11 | 11 | |
12 | -$current_course_tool = TOOL_GLOSSARY; |
|
12 | +$current_course_tool = TOOL_GLOSSARY; |
|
13 | 13 | |
14 | 14 | // The section (tabs). |
15 | 15 | $this_section = SECTION_COURSES; |
@@ -44,24 +44,24 @@ discard block |
||
44 | 44 | |
45 | 45 | $tool = 'GlossaryManagement'; |
46 | 46 | |
47 | -$interbreadcrumb[] = array ("url"=>"index.php", "name"=> get_lang('Glossary')); |
|
47 | +$interbreadcrumb[] = array("url"=>"index.php", "name"=> get_lang('Glossary')); |
|
48 | 48 | |
49 | 49 | if (!empty($action)) { |
50 | 50 | |
51 | 51 | } |
52 | 52 | switch ($action) { |
53 | 53 | case 'addglossary': |
54 | - $tool_name = get_lang('Add'); |
|
54 | + $tool_name = get_lang('Add'); |
|
55 | 55 | break; |
56 | 56 | case 'edit_glossary': |
57 | - $tool_name = get_lang('Edit'); |
|
57 | + $tool_name = get_lang('Edit'); |
|
58 | 58 | break; |
59 | 59 | case 'import': |
60 | - $tool_name = get_lang('ImportGlossary'); |
|
60 | + $tool_name = get_lang('ImportGlossary'); |
|
61 | 61 | break; |
62 | 62 | case 'changeview': |
63 | 63 | default: |
64 | - $tool_name = get_lang('List'); |
|
64 | + $tool_name = get_lang('List'); |
|
65 | 65 | break; |
66 | 66 | } |
67 | 67 | |
@@ -75,9 +75,9 @@ discard block |
||
75 | 75 | |
76 | 76 | usort($data, "sorter"); |
77 | 77 | $list = array(); |
78 | - $list[] = array('term','definition'); |
|
79 | - foreach($data as $line) { |
|
80 | - $list[] = array ($line[0], $line[1]); |
|
78 | + $list[] = array('term', 'definition'); |
|
79 | + foreach ($data as $line) { |
|
80 | + $list[] = array($line[0], $line[1]); |
|
81 | 81 | } |
82 | 82 | $filename = 'glossary_course_'.api_get_course_id(); |
83 | 83 | Export::arrayToCsv($list, $filename); |
@@ -91,11 +91,11 @@ discard block |
||
91 | 91 | // Tool introduction |
92 | 92 | Display::display_introduction_section(TOOL_GLOSSARY); |
93 | 93 | |
94 | -if (isset($_GET['action']) && $_GET['action'] == 'changeview' && in_array($_GET['view'], array('list','table'))) { |
|
94 | +if (isset($_GET['action']) && $_GET['action'] == 'changeview' && in_array($_GET['view'], array('list', 'table'))) { |
|
95 | 95 | $_SESSION['glossary_view'] = $_GET['view']; |
96 | 96 | } else { |
97 | 97 | if (!isset($_SESSION['glossary_view'])) { |
98 | - $_SESSION['glossary_view'] = 'table';//Default option |
|
98 | + $_SESSION['glossary_view'] = 'table'; //Default option |
|
99 | 99 | } |
100 | 100 | } |
101 | 101 | |
@@ -143,12 +143,12 @@ discard block |
||
143 | 143 | // Setting the form elements |
144 | 144 | $form->addElement('header', '', get_lang('TermEdit')); |
145 | 145 | $form->addElement('hidden', 'glossary_id'); |
146 | - $form->addElement('text', 'glossary_title', get_lang('TermName'),array('size'=>'80')); |
|
146 | + $form->addElement('text', 'glossary_title', get_lang('TermName'), array('size'=>'80')); |
|
147 | 147 | //$form->applyFilter('glossary_title', 'html_filter'); |
148 | 148 | $form->addElement('html_editor', 'glossary_comment', get_lang('TermDefinition'), null, array('ToolbarSet' => 'Glossary', 'Height' => '300')); |
149 | - $element = $form->addElement('text', 'insert_date', get_lang('CreationDate'),array('size'=>'100')); |
|
149 | + $element = $form->addElement('text', 'insert_date', get_lang('CreationDate'), array('size'=>'100')); |
|
150 | 150 | $element->freeze(); |
151 | - $element = $form->addElement('text', 'update_date', get_lang('UpdateDate'),array('size'=>'100')); |
|
151 | + $element = $form->addElement('text', 'update_date', get_lang('UpdateDate'), array('size'=>'100')); |
|
152 | 152 | $element->freeze(); |
153 | 153 | $form->addButtonUpdate(get_lang('TermUpdateButton'), 'SubmitGlossary'); |
154 | 154 | |
@@ -156,16 +156,16 @@ discard block |
||
156 | 156 | $glossary_data = GlossaryManager::get_glossary_information($_GET['glossary_id']); |
157 | 157 | |
158 | 158 | // Date treatment for timezones |
159 | - if (!empty($glossary_data['insert_date']) && $glossary_data['insert_date'] != '0000-00-00 00:00:00:') { |
|
159 | + if (!empty($glossary_data['insert_date']) && $glossary_data['insert_date'] != '0000-00-00 00:00:00:') { |
|
160 | 160 | $glossary_data['insert_date'] = api_get_local_time($glossary_data['insert_date']); |
161 | 161 | } else { |
162 | - $glossary_data['insert_date'] = ''; |
|
162 | + $glossary_data['insert_date'] = ''; |
|
163 | 163 | } |
164 | 164 | |
165 | - if (!empty($glossary_data['update_date']) && $glossary_data['update_date'] != '0000-00-00 00:00:00:') { |
|
165 | + if (!empty($glossary_data['update_date']) && $glossary_data['update_date'] != '0000-00-00 00:00:00:') { |
|
166 | 166 | $glossary_data['update_date'] = api_get_local_time($glossary_data['update_date']); |
167 | 167 | } else { |
168 | - $glossary_data['update_date'] = ''; |
|
168 | + $glossary_data['update_date'] = ''; |
|
169 | 169 | } |
170 | 170 | |
171 | 171 | $form->setDefaults($glossary_data); |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | if (isset($_POST['replace']) && $_POST['replace']) { |
226 | 226 | foreach (GlossaryManager::get_glossary_terms() as $term) { |
227 | 227 | if (!GlossaryManager::delete_glossary($term['id'], false)) { |
228 | - Display::display_error_message(get_lang ("CannotDeleteGlossary") . ':' . $term['id']); |
|
228 | + Display::display_error_message(get_lang("CannotDeleteGlossary").':'.$term['id']); |
|
229 | 229 | } |
230 | 230 | } |
231 | 231 | } |
@@ -248,10 +248,10 @@ discard block |
||
248 | 248 | $bad++; |
249 | 249 | } |
250 | 250 | |
251 | - Display::display_confirmation_message(get_lang ("TermsImported") . ':' . $good); |
|
251 | + Display::display_confirmation_message(get_lang("TermsImported").':'.$good); |
|
252 | 252 | |
253 | 253 | if ($bad) { |
254 | - Display::display_error_message (get_lang ("TermsNotImported") . ':' . $bad); |
|
254 | + Display::display_error_message(get_lang("TermsNotImported").':'.$bad); |
|
255 | 255 | } |
256 | 256 | |
257 | 257 | GlossaryManager::display_glossary(); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | if (isset($_POST['glossary_id']) && |
22 | 22 | $_POST['glossary_id'] == strval(intval($_POST['glossary_id'])) |
23 | 23 | ) { |
24 | - $glossary_id= Security::remove_XSS($_POST['glossary_id']); |
|
24 | + $glossary_id = Security::remove_XSS($_POST['glossary_id']); |
|
25 | 25 | $glossary_description_by_id = GlossaryManager::get_glossary_term_by_glossary_id( |
26 | 26 | $glossary_id |
27 | 27 | ); |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | $glossary_description_by_id |
32 | 32 | ); |
33 | 33 | echo api_xml_http_response_encode($glossary_description_by_id); |
34 | -} elseif (isset($_POST['glossary_data']) && $_POST['glossary_data']=='true') { |
|
34 | +} elseif (isset($_POST['glossary_data']) && $_POST['glossary_data'] == 'true') { |
|
35 | 35 | //get_glossary_terms |
36 | 36 | $glossary_data = GlossaryManager::get_glossary_terms(); |
37 | 37 | $glossary_all_data = array(); |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | $glossary_all_data = implode('[|.|_|.|-|.|]', $glossary_all_data); |
43 | 43 | echo api_xml_http_response_encode($glossary_all_data); |
44 | 44 | } |
45 | -} elseif(isset($_POST['glossary_name'])) { |
|
45 | +} elseif (isset($_POST['glossary_name'])) { |
|
46 | 46 | $my_glossary_name = Security::remove_XSS($_POST['glossary_name']); |
47 | 47 | $my_glossary_name = api_convert_encoding($my_glossary_name, $charset, 'UTF-8'); |
48 | 48 | $my_glossary_name = trim($my_glossary_name); |
@@ -155,9 +155,9 @@ discard block |
||
155 | 155 | $request_url_root = ''; |
156 | 156 | if (empty($_SERVER['HTTP_HOST'])) { |
157 | 157 | if (empty($_SERVER['SERVER_NAME'])) { |
158 | - $request_url_root = $protocol . 'localhost/'; |
|
158 | + $request_url_root = $protocol.'localhost/'; |
|
159 | 159 | } else { |
160 | - $request_url_root = $protocol . $_SERVER['SERVER_NAME'] . '/'; |
|
160 | + $request_url_root = $protocol.$_SERVER['SERVER_NAME'].'/'; |
|
161 | 161 | } |
162 | 162 | } else { |
163 | 163 | $request_url_root = $protocol.$_SERVER['HTTP_HOST'].'/'; |
@@ -446,7 +446,7 @@ discard block |
||
446 | 446 | } |
447 | 447 | |
448 | 448 | if (!empty($language_priority1) && api_get_language_from_type($language_priority1) !== false) { |
449 | - $language_interface = api_get_language_from_type($language_priority1); |
|
449 | + $language_interface = api_get_language_from_type($language_priority1); |
|
450 | 450 | } else { |
451 | 451 | if (isset($_course['language'])) { |
452 | 452 | $language_interface = $_course['language']; |
@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | $form = new FormValidator('introduction_text'); |
54 | 54 | } |
55 | 55 | |
56 | -$renderer =& $form->defaultRenderer(); |
|
56 | +$renderer = & $form->defaultRenderer(); |
|
57 | 57 | $renderer->setCustomElementTemplate('<div style="width: 80%; margin: 0px auto; padding-bottom: 10px; ">{element}</div>'); |
58 | 58 | |
59 | 59 | $config = array( |
@@ -208,11 +208,11 @@ discard block |
||
208 | 208 | if ($displayMode == '1') { |
209 | 209 | // Show only the current course progress step |
210 | 210 | // $information_title = get_lang('InfoAboutLastDoneAdvance'); |
211 | - $last_done_advance = $thematic->get_last_done_thematic_advance(); |
|
211 | + $last_done_advance = $thematic->get_last_done_thematic_advance(); |
|
212 | 212 | $thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance); |
213 | 213 | $subTitle1 = get_lang('CurrentTopic'); |
214 | 214 | $class1 = ' current'; |
215 | - } else if($displayMode == '2') { |
|
215 | + } else if ($displayMode == '2') { |
|
216 | 216 | // Show only the two next course progress steps |
217 | 217 | // $information_title = get_lang('InfoAboutNextAdvanceNotDone'); |
218 | 218 | $last_done_advance = $thematic->get_next_thematic_advance_not_done(); |
@@ -220,10 +220,10 @@ discard block |
||
220 | 220 | $thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance); |
221 | 221 | $thematic_advance_info2 = $thematic->get_thematic_advance_list($next_advance_not_done); |
222 | 222 | $subTitle1 = $subTitle2 = get_lang('NextTopic'); |
223 | - } else if($displayMode == '3') { |
|
223 | + } else if ($displayMode == '3') { |
|
224 | 224 | // Show the current and next course progress steps |
225 | 225 | // $information_title = get_lang('InfoAboutLastDoneAdvanceAndNextAdvanceNotDone'); |
226 | - $last_done_advance = $thematic->get_last_done_thematic_advance(); |
|
226 | + $last_done_advance = $thematic->get_last_done_thematic_advance(); |
|
227 | 227 | $next_advance_not_done = $thematic->get_next_thematic_advance_not_done(); |
228 | 228 | $thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance); |
229 | 229 | $thematic_advance_info2 = $thematic->get_thematic_advance_list($next_advance_not_done); |
@@ -234,8 +234,8 @@ discard block |
||
234 | 234 | |
235 | 235 | if (!empty($thematic_advance_info)) { |
236 | 236 | $thematic_advance = get_lang('CourseThematicAdvance'); |
237 | - $thematicScore = $thematic->get_total_average_of_thematic_advances() . '%'; |
|
238 | - $thematicUrl = api_get_path(WEB_CODE_PATH) . |
|
237 | + $thematicScore = $thematic->get_total_average_of_thematic_advances().'%'; |
|
238 | + $thematicUrl = api_get_path(WEB_CODE_PATH). |
|
239 | 239 | 'course_progress/index.php?action=thematic_details&'.api_get_cidreq(); |
240 | 240 | $thematic_info = $thematic->get_thematic_list( |
241 | 241 | $thematic_advance_info['thematic_id'] |
@@ -250,13 +250,13 @@ discard block |
||
250 | 250 | ); |
251 | 251 | $userInfo = $_SESSION['_user']; |
252 | 252 | $courseInfo = api_get_course_info(); |
253 | - $titleThematic = $thematic_advance .' : '. $courseInfo['name'] . ' <b>( '. $thematicScore .' )</b>'; |
|
253 | + $titleThematic = $thematic_advance.' : '.$courseInfo['name'].' <b>( '.$thematicScore.' )</b>'; |
|
254 | 254 | |
255 | 255 | |
256 | 256 | |
257 | - $infoUser = '<div class="thematic-avatar"><img src="' . $userInfo['avatar'] . '" class="img-circle img-responsive"></div>'; |
|
257 | + $infoUser = '<div class="thematic-avatar"><img src="'.$userInfo['avatar'].'" class="img-circle img-responsive"></div>'; |
|
258 | 258 | $infoUser .= '<div class="progress"> |
259 | - <div class="progress-bar progress-bar-danger" role="progressbar" style="width: ' . $thematicScore . ';"> |
|
259 | + <div class="progress-bar progress-bar-danger" role="progressbar" style="width: ' . $thematicScore.';"> |
|
260 | 260 | '.$thematicScore.' |
261 | 261 | </div> |
262 | 262 | </div>'; |
@@ -265,11 +265,11 @@ discard block |
||
265 | 265 | $thematicItemOne = ' |
266 | 266 | <div class="col-md-6 items-progress"> |
267 | 267 | <div class="thematic-cont '.$class1.'"> |
268 | - <div class="topics">' . $subTitle1 . '</div> |
|
269 | - <h4 class="title-topics">' . Display::returnFontAwesomeIcon('book') . $thematic_info['title'] . '</h4> |
|
270 | - <p class="date">' . Display::returnFontAwesomeIcon('calendar-o') . $thematic_advance_info['start_date'] . '</p> |
|
271 | - <div class="views">' . Display::returnFontAwesomeIcon('file-text-o') . strip_tags($thematic_advance_info['content']). '</div> |
|
272 | - <p class="time">'. Display::returnFontAwesomeIcon('clock-o') . get_lang('DurationInHours') . ' : ' . $thematic_advance_info['duration'] . ' - <a href="' . $thematicUrl . '">' . get_lang('SeeDetail') . '</a></p> |
|
268 | + <div class="topics">' . $subTitle1.'</div> |
|
269 | + <h4 class="title-topics">' . Display::returnFontAwesomeIcon('book').$thematic_info['title'].'</h4> |
|
270 | + <p class="date">' . Display::returnFontAwesomeIcon('calendar-o').$thematic_advance_info['start_date'].'</p> |
|
271 | + <div class="views">' . Display::returnFontAwesomeIcon('file-text-o').strip_tags($thematic_advance_info['content']).'</div> |
|
272 | + <p class="time">'. Display::returnFontAwesomeIcon('clock-o').get_lang('DurationInHours').' : '.$thematic_advance_info['duration'].' - <a href="'.$thematicUrl.'">'.get_lang('SeeDetail').'</a></p> |
|
273 | 273 | </div> |
274 | 274 | </div>'; |
275 | 275 | |
@@ -282,21 +282,21 @@ discard block |
||
282 | 282 | <div class="col-md-6 items-progress"> |
283 | 283 | <div class="thematic-cont"> |
284 | 284 | <div class="topics">'.$subTitle2.'</div> |
285 | - <h4 class="title-topics">'. Display::returnFontAwesomeIcon('book') . $thematic_info2['title'].'</h4> |
|
286 | - <p class="date">' . Display::returnFontAwesomeIcon('calendar-o') .$thematic_advance_info2['start_date'].'</p> |
|
287 | - <div class="views">' . Display::returnFontAwesomeIcon('file-text-o') . strip_tags($thematic_advance_info2['content']).'</div> |
|
288 | - <p class="time">'. Display::returnFontAwesomeIcon('clock-o') .get_lang('DurationInHours').' : '.$thematic_advance_info2['duration'].' - <a href="'.$thematicUrl.'">'.get_lang('SeeDetail').'</a></p> |
|
285 | + <h4 class="title-topics">'. Display::returnFontAwesomeIcon('book').$thematic_info2['title'].'</h4> |
|
286 | + <p class="date">' . Display::returnFontAwesomeIcon('calendar-o').$thematic_advance_info2['start_date'].'</p> |
|
287 | + <div class="views">' . Display::returnFontAwesomeIcon('file-text-o').strip_tags($thematic_advance_info2['content']).'</div> |
|
288 | + <p class="time">'. Display::returnFontAwesomeIcon('clock-o').get_lang('DurationInHours').' : '.$thematic_advance_info2['duration'].' - <a href="'.$thematicUrl.'">'.get_lang('SeeDetail').'</a></p> |
|
289 | 289 | </div> |
290 | 290 | </div>'; |
291 | 291 | } |
292 | 292 | |
293 | 293 | |
294 | 294 | $thematicPanel = '<div class="row">'; |
295 | - $thematicPanel .= '<div class="col-md-2">' . $infoUser . '</div>'; |
|
296 | - $thematicPanel .= '<div class="col-md-10"><div class="row">' . $thematicItemOne . $thematicItemTwo . '</div></div>'; |
|
295 | + $thematicPanel .= '<div class="col-md-2">'.$infoUser.'</div>'; |
|
296 | + $thematicPanel .= '<div class="col-md-10"><div class="row">'.$thematicItemOne.$thematicItemTwo.'</div></div>'; |
|
297 | 297 | $thematicPanel .= '</div>'; |
298 | 298 | $thematicPanel .= '<div class="separate"> |
299 | - <a href="' . $thematicUrl . '" class="btn btn-default btn-block">' . get_lang('ShowFullCourseAdvance') . '</a> |
|
299 | + <a href="' . $thematicUrl.'" class="btn btn-default btn-block">'.get_lang('ShowFullCourseAdvance').'</a> |
|
300 | 300 | </div>'; |
301 | 301 | $thematicProgress = Display::panelCollapse($titleThematic, $thematicPanel, 'thematic', null, 'accordion-thematic', 'collapse-thematic', false); |
302 | 302 | } |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | $editIconButton = Display::url( |
314 | 314 | '<em class="fa fa-wrench"></em> ', |
315 | 315 | api_get_path(WEB_CODE_PATH).'course_info/tools.php?'.api_get_cidreq(), |
316 | - ['class' => 'btn btn-default', 'title' => get_lang('CustomizeIcons') ] |
|
316 | + ['class' => 'btn btn-default', 'title' => get_lang('CustomizeIcons')] |
|
317 | 317 | ); |
318 | 318 | } |
319 | 319 | |
@@ -324,12 +324,12 @@ discard block |
||
324 | 324 | // Displays "Add intro" commands |
325 | 325 | $toolbar = '<div class="btn-group pull-right" role="group">'; |
326 | 326 | if (!empty($courseId)) { |
327 | - $textIntro = '<a class="btn btn-default" title="' . get_lang('AddIntro') . '" href="'.api_get_self().'?' . api_get_cidreq().'&intro_cmdAdd=1">'; |
|
327 | + $textIntro = '<a class="btn btn-default" title="'.get_lang('AddIntro').'" href="'.api_get_self().'?'.api_get_cidreq().'&intro_cmdAdd=1">'; |
|
328 | 328 | $textIntro .= '<em class="fa fa-file-text"></em> '; |
329 | 329 | $textIntro .= "</a>"; |
330 | - $toolbar .= $textIntro . $editIconButton; |
|
330 | + $toolbar .= $textIntro.$editIconButton; |
|
331 | 331 | } else { |
332 | - $toolbar .= '<a class="btn btn-default" href="' . api_get_self() . '?intro_cmdAdd=1">"' . get_lang('AddIntro') . '</a>'; |
|
332 | + $toolbar .= '<a class="btn btn-default" href="'.api_get_self().'?intro_cmdAdd=1">"'.get_lang('AddIntro').'</a>'; |
|
333 | 333 | $toolbar .= $editIconButton; |
334 | 334 | } |
335 | 335 | $toolbar .= '</div>'; |
@@ -342,7 +342,7 @@ discard block |
||
342 | 342 | '<a class="btn btn-default" href="'.api_get_self().'?'.api_get_cidreq().'&intro_cmdEdit=1" title="'.get_lang('Modify').'"> |
343 | 343 | <em class="fa fa-pencil"></em></a>'; |
344 | 344 | $toolbar .= $editIconButton; |
345 | - $toolbar .="<a class=\"btn btn-default\" href=\"".api_get_self()."?".api_get_cidreq()."&intro_cmdDel=1\" onclick=\"javascript: |
|
345 | + $toolbar .= "<a class=\"btn btn-default\" href=\"".api_get_self()."?".api_get_cidreq()."&intro_cmdDel=1\" onclick=\"javascript: |
|
346 | 346 | if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)). |
347 | 347 | "')) return false;\"><em class=\"fa fa-trash-o\"></em></a>"; |
348 | 348 | |
@@ -356,7 +356,7 @@ discard block |
||
356 | 356 | if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)). |
357 | 357 | "')) return false;\"><em class=\"fa fa-trash-o\"></em></a>"; |
358 | 358 | } |
359 | - $toolbar .= "</div>"; |
|
359 | + $toolbar .= "</div>"; |
|
360 | 360 | // Fix for chrome XSS filter for videos in iframes - BT#7930 |
361 | 361 | $browser = api_get_navigator(); |
362 | 362 | if (strpos($introduction_section, '<iframe') !== false && $browser['name'] == 'Chrome') { |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | } else { |
376 | 376 | if (api_is_allowed_to_edit()) { |
377 | 377 | $introduction_section .= '<div class="help-course">'; |
378 | - $introduction_section .= get_lang('AddCustomCourseIntro') . ' ' . $textIntro; |
|
378 | + $introduction_section .= get_lang('AddCustomCourseIntro').' '.$textIntro; |
|
379 | 379 | $introduction_section .= '</div>'; |
380 | 380 | } |
381 | 381 | } |