@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | // If we are following a link to a global "per user" conference |
102 | 102 | // then generate a random guest name to join the conference |
103 | 103 | // because there is no part of the process where we give a name |
104 | - $this->userCompleteName = 'Guest' . rand(1000,9999); |
|
104 | + $this->userCompleteName = 'Guest'.rand(1000, 9999); |
|
105 | 105 | } else { |
106 | 106 | $this->userCompleteName = $userInfo['complete_name']; |
107 | 107 | } |
@@ -263,7 +263,7 @@ discard block |
||
263 | 263 | |
264 | 264 | $params['record'] = api_get_course_setting('big_blue_button_record_and_store', $courseCode) == 1 ? true : false; |
265 | 265 | $max = api_get_course_setting('big_blue_button_max_students_allowed', $courseCode); |
266 | - $max = isset($max) ? $max : -1; |
|
266 | + $max = isset($max) ? $max : -1; |
|
267 | 267 | |
268 | 268 | $params['status'] = 1; |
269 | 269 | // Generate a pseudo-global-unique-id to avoid clash of conferences on |
@@ -296,23 +296,23 @@ discard block |
||
296 | 296 | $duration = 300; |
297 | 297 | |
298 | 298 | $bbbParams = array( |
299 | - 'meetingId' => $params['remote_id'], // REQUIRED |
|
300 | - 'meetingName' => $meetingName, // REQUIRED |
|
301 | - 'attendeePw' => $attendeePassword, // Match this value in getJoinMeetingURL() to join as attendee. |
|
302 | - 'moderatorPw' => $moderatorPassword, // Match this value in getJoinMeetingURL() to join as moderator. |
|
303 | - 'welcomeMsg' => $welcomeMessage, // ''= use default. Change to customize. |
|
304 | - 'dialNumber' => '', // The main number to call into. Optional. |
|
305 | - 'voiceBridge' => $params['voice_bridge'], // PIN to join voice. Required. |
|
306 | - 'webVoice' => '', // Alphanumeric to join voice. Optional. |
|
299 | + 'meetingId' => $params['remote_id'], // REQUIRED |
|
300 | + 'meetingName' => $meetingName, // REQUIRED |
|
301 | + 'attendeePw' => $attendeePassword, // Match this value in getJoinMeetingURL() to join as attendee. |
|
302 | + 'moderatorPw' => $moderatorPassword, // Match this value in getJoinMeetingURL() to join as moderator. |
|
303 | + 'welcomeMsg' => $welcomeMessage, // ''= use default. Change to customize. |
|
304 | + 'dialNumber' => '', // The main number to call into. Optional. |
|
305 | + 'voiceBridge' => $params['voice_bridge'], // PIN to join voice. Required. |
|
306 | + 'webVoice' => '', // Alphanumeric to join voice. Optional. |
|
307 | 307 | 'logoutUrl' => $this->logoutUrl, |
308 | - 'maxParticipants' => $max, // Optional. -1 = unlimitted. Not supported in BBB. [number] |
|
309 | - 'record' => $record, // New. 'true' will tell BBB to record the meeting. |
|
310 | - 'duration' => $duration, // Default = 0 which means no set duration in minutes. [number] |
|
308 | + 'maxParticipants' => $max, // Optional. -1 = unlimitted. Not supported in BBB. [number] |
|
309 | + 'record' => $record, // New. 'true' will tell BBB to record the meeting. |
|
310 | + 'duration' => $duration, // Default = 0 which means no set duration in minutes. [number] |
|
311 | 311 | //'meta_category' => '', // Use to pass additional info to BBB server. See API docs. |
312 | 312 | ); |
313 | 313 | |
314 | 314 | if ($this->debug) { |
315 | - error_log("create_meeting params: ".print_r($bbbParams,1)); |
|
315 | + error_log("create_meeting params: ".print_r($bbbParams, 1)); |
|
316 | 316 | } |
317 | 317 | |
318 | 318 | $status = false; |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | if (isset($result) && strval($result['returncode']) == 'SUCCESS') { |
326 | 326 | if ($this->debug) { |
327 | 327 | error_log( |
328 | - "create_meeting result: " . print_r($result, 1) |
|
328 | + "create_meeting result: ".print_r($result, 1) |
|
329 | 329 | ); |
330 | 330 | } |
331 | 331 | $meeting = $this->joinMeeting($meetingName, true); |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | |
376 | 376 | $courseId = api_get_course_int_id(); |
377 | 377 | $sessionId = api_get_session_id(); |
378 | - $conditions = array( |
|
378 | + $conditions = array( |
|
379 | 379 | 'where' => array( |
380 | 380 | 'c_id = ? AND session_id = ? AND meeting_name = ? AND status = 1 AND access_url = ?' => |
381 | 381 | array($courseId, $sessionId, $meetingName, $this->accessUrl) |
@@ -384,7 +384,7 @@ discard block |
||
384 | 384 | |
385 | 385 | if ($this->hasGroupSupport()) { |
386 | 386 | $groupId = api_get_group_id(); |
387 | - $conditions = array( |
|
387 | + $conditions = array( |
|
388 | 388 | 'where' => array( |
389 | 389 | 'c_id = ? AND session_id = ? AND meeting_name = ? AND group_id = ? AND status = 1 AND access_url = ?' => |
390 | 390 | array($courseId, $sessionId, $meetingName, $groupId, $this->accessUrl) |
@@ -486,7 +486,7 @@ discard block |
||
486 | 486 | |
487 | 487 | if ($this->debug) { |
488 | 488 | error_log( |
489 | - "meeting is running: " . intval($meetingInfoExists) |
|
489 | + "meeting is running: ".intval($meetingInfoExists) |
|
490 | 490 | ); |
491 | 491 | } |
492 | 492 | |
@@ -503,11 +503,11 @@ discard block |
||
503 | 503 | |
504 | 504 | if ($meetingInfoExists) { |
505 | 505 | $joinParams = array( |
506 | - 'meetingId' => $meetingData['remote_id'], // -- REQUIRED - A unique id for the meeting |
|
507 | - 'username' => $this->userCompleteName, //-- REQUIRED - The name that will display for the user in the meeting |
|
508 | - 'password' => $pass, //-- REQUIRED - The attendee or moderator password, depending on what's passed here |
|
506 | + 'meetingId' => $meetingData['remote_id'], // -- REQUIRED - A unique id for the meeting |
|
507 | + 'username' => $this->userCompleteName, //-- REQUIRED - The name that will display for the user in the meeting |
|
508 | + 'password' => $pass, //-- REQUIRED - The attendee or moderator password, depending on what's passed here |
|
509 | 509 | //'createTime' => api_get_utc_datetime(), //-- OPTIONAL - string. Leave blank ('') unless you set this correctly. |
510 | - 'userID' => api_get_user_id(), //-- OPTIONAL - string |
|
510 | + 'userID' => api_get_user_id(), //-- OPTIONAL - string |
|
511 | 511 | 'webVoiceConf' => '' // -- OPTIONAL - string |
512 | 512 | ); |
513 | 513 | $url = $this->api->getJoinMeetingURL($joinParams); |
@@ -516,7 +516,7 @@ discard block |
||
516 | 516 | $url = $this->logoutUrl; |
517 | 517 | } |
518 | 518 | if ($this->debug) { |
519 | - error_log("return url :" . $url); |
|
519 | + error_log("return url :".$url); |
|
520 | 520 | } |
521 | 521 | |
522 | 522 | return $url; |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | */ |
558 | 558 | public function getAllMeetingsInCourse($courseId, $sessionId, $status) |
559 | 559 | { |
560 | - $conditions = array( |
|
560 | + $conditions = array( |
|
561 | 561 | 'where' => array( |
562 | 562 | 'status = ? AND c_id = ? AND session_id = ? ' => array( |
563 | 563 | $status, |
@@ -594,14 +594,14 @@ discard block |
||
594 | 594 | $conditions = []; |
595 | 595 | |
596 | 596 | if ($courseId || $sessionId || $groupId) { |
597 | - $conditions = array( |
|
597 | + $conditions = array( |
|
598 | 598 | 'where' => array( |
599 | 599 | 'c_id = ? AND session_id = ? ' => array($courseId, $sessionId), |
600 | 600 | ), |
601 | 601 | ); |
602 | 602 | |
603 | 603 | if ($this->hasGroupSupport()) { |
604 | - $conditions = array( |
|
604 | + $conditions = array( |
|
605 | 605 | 'where' => array( |
606 | 606 | 'c_id = ? AND session_id = ? AND group_id = ? ' => array($courseId, $sessionId, $groupId) |
607 | 607 | ) |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | } |
637 | 637 | $meetingBBB['end_url'] = $this->endUrl($meetingDB); |
638 | 638 | |
639 | - if (isset($meetingBBB['returncode']) && (string)$meetingBBB['returncode'] == 'FAILED') { |
|
639 | + if (isset($meetingBBB['returncode']) && (string) $meetingBBB['returncode'] == 'FAILED') { |
|
640 | 640 | if ($meetingDB['status'] == 1 && $this->isConferenceManager()) { |
641 | 641 | $this->endMeeting($meetingDB['id']); |
642 | 642 | } |
@@ -695,7 +695,7 @@ discard block |
||
695 | 695 | } |
696 | 696 | |
697 | 697 | $actionLinks = $this->getActionLinks($meetingDB, $record, $isGlobal, $isAdminReport); |
698 | - $item['show_links'] = $recordLink; |
|
698 | + $item['show_links'] = $recordLink; |
|
699 | 699 | $item['action_links'] = implode(PHP_EOL, $actionLinks); |
700 | 700 | } |
701 | 701 | |
@@ -708,11 +708,11 @@ discard block |
||
708 | 708 | |
709 | 709 | if ($meetingDB['status'] == 1) { |
710 | 710 | $joinParams = array( |
711 | - 'meetingId' => $meetingDB['remote_id'], //-- REQUIRED - A unique id for the meeting |
|
712 | - 'username' => $this->userCompleteName, //-- REQUIRED - The name that will display for the user in the meeting |
|
713 | - 'password' => $pass, //-- REQUIRED - The attendee or moderator password, depending on what's passed here |
|
714 | - 'createTime' => '', //-- OPTIONAL - string. Leave blank ('') unless you set this correctly. |
|
715 | - 'userID' => '', // -- OPTIONAL - string |
|
711 | + 'meetingId' => $meetingDB['remote_id'], //-- REQUIRED - A unique id for the meeting |
|
712 | + 'username' => $this->userCompleteName, //-- REQUIRED - The name that will display for the user in the meeting |
|
713 | + 'password' => $pass, //-- REQUIRED - The attendee or moderator password, depending on what's passed here |
|
714 | + 'createTime' => '', //-- OPTIONAL - string. Leave blank ('') unless you set this correctly. |
|
715 | + 'userID' => '', // -- OPTIONAL - string |
|
716 | 716 | 'webVoiceConf' => '' // -- OPTIONAL - string |
717 | 717 | ); |
718 | 718 | $item['go_url'] = $this->protocol.$this->api->getJoinMeetingURL($joinParams); |
@@ -782,8 +782,8 @@ discard block |
||
782 | 782 | } |
783 | 783 | |
784 | 784 | $endParams = array( |
785 | - 'meetingId' => $meetingData['remote_id'], // REQUIRED - We have to know which meeting to end. |
|
786 | - 'password' => $pass, // REQUIRED - Must match moderator pass for meeting. |
|
785 | + 'meetingId' => $meetingData['remote_id'], // REQUIRED - We have to know which meeting to end. |
|
786 | + 'password' => $pass, // REQUIRED - Must match moderator pass for meeting. |
|
787 | 787 | ); |
788 | 788 | $this->api->endMeetingWithXmlResponseArray($endParams); |
789 | 789 | Database::update( |
@@ -1028,7 +1028,7 @@ discard block |
||
1028 | 1028 | */ |
1029 | 1029 | public function redirectToBBB($url) |
1030 | 1030 | { |
1031 | - if (file_exists(__DIR__ . '/../config.vm.php')) { |
|
1031 | + if (file_exists(__DIR__.'/../config.vm.php')) { |
|
1032 | 1032 | // Using VM |
1033 | 1033 | echo Display::url($this->plugin->get_lang('ClickToContinue'), $url); |
1034 | 1034 | exit; |
@@ -1266,7 +1266,7 @@ discard block |
||
1266 | 1266 | if ($meetingInfo['has_video_m4v']) { |
1267 | 1267 | $links[] = Display::url( |
1268 | 1268 | Display::return_icon('save.png', get_lang('DownloadFile')), |
1269 | - $recordInfo['playbackFormatUrl'] . '/capture.m4v', |
|
1269 | + $recordInfo['playbackFormatUrl'].'/capture.m4v', |
|
1270 | 1270 | ['target' => '_blank'] |
1271 | 1271 | ); |
1272 | 1272 | } else { |
@@ -1331,7 +1331,7 @@ discard block |
||
1331 | 1331 | return false; |
1332 | 1332 | } |
1333 | 1333 | |
1334 | - $hasCapture = SocialManager::verifyUrl($meetingInfo['video_url'] . '/capture.m4v'); |
|
1334 | + $hasCapture = SocialManager::verifyUrl($meetingInfo['video_url'].'/capture.m4v'); |
|
1335 | 1335 | |
1336 | 1336 | if ($hasCapture) { |
1337 | 1337 | return Database::update( |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | if ($displayMode == '1') { |
204 | 204 | // Show only the current course progress step |
205 | 205 | // $information_title = get_lang('InfoAboutLastDoneAdvance'); |
206 | - $last_done_advance = $thematic->get_last_done_thematic_advance(); |
|
206 | + $last_done_advance = $thematic->get_last_done_thematic_advance(); |
|
207 | 207 | $thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance); |
208 | 208 | $subTitle1 = get_lang('CurrentTopic'); |
209 | 209 | $class1 = ' current'; |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | } else if ($displayMode == '3') { |
219 | 219 | // Show the current and next course progress steps |
220 | 220 | // $information_title = get_lang('InfoAboutLastDoneAdvanceAndNextAdvanceNotDone'); |
221 | - $last_done_advance = $thematic->get_last_done_thematic_advance(); |
|
221 | + $last_done_advance = $thematic->get_last_done_thematic_advance(); |
|
222 | 222 | $next_advance_not_done = $thematic->get_next_thematic_advance_not_done(); |
223 | 223 | $thematic_advance_info = $thematic->get_thematic_advance_list($last_done_advance); |
224 | 224 | $thematic_advance_info2 = $thematic->get_thematic_advance_list($next_advance_not_done); |
@@ -229,7 +229,7 @@ discard block |
||
229 | 229 | |
230 | 230 | if (!empty($thematic_advance_info)) { |
231 | 231 | $thematic_advance = get_lang('CourseThematicAdvance'); |
232 | - $thematicScore = $thematic->get_total_average_of_thematic_advances() . '%'; |
|
232 | + $thematicScore = $thematic->get_total_average_of_thematic_advances().'%'; |
|
233 | 233 | $thematicUrl = api_get_path(WEB_CODE_PATH).'course_progress/index.php?action=thematic_details&'.api_get_cidreq(); |
234 | 234 | $thematic_info = $thematic->get_thematic_list( |
235 | 235 | $thematic_advance_info['thematic_id'] |
@@ -244,11 +244,11 @@ discard block |
||
244 | 244 | ); |
245 | 245 | $userInfo = api_get_user_info(); |
246 | 246 | $courseInfo = api_get_course_info(); |
247 | - $titleThematic = $thematic_advance .' : '. $courseInfo['name'] . ' <b>( '. $thematicScore .' )</b>'; |
|
247 | + $titleThematic = $thematic_advance.' : '.$courseInfo['name'].' <b>( '.$thematicScore.' )</b>'; |
|
248 | 248 | |
249 | - $infoUser = '<div class="thematic-avatar"><img src="' . $userInfo['avatar'] . '" class="img-circle img-responsive"></div>'; |
|
249 | + $infoUser = '<div class="thematic-avatar"><img src="'.$userInfo['avatar'].'" class="img-circle img-responsive"></div>'; |
|
250 | 250 | $infoUser .= '<div class="progress"> |
251 | - <div class="progress-bar progress-bar-danger" role="progressbar" style="width: ' . $thematicScore . ';"> |
|
251 | + <div class="progress-bar progress-bar-danger" role="progressbar" style="width: ' . $thematicScore.';"> |
|
252 | 252 | '.$thematicScore.' |
253 | 253 | </div> |
254 | 254 | </div>'; |
@@ -256,11 +256,11 @@ discard block |
||
256 | 256 | $thematicItemOne = ' |
257 | 257 | <div class="col-md-6 items-progress"> |
258 | 258 | <div class="thematic-cont '.$class1.'"> |
259 | - <div class="topics">' . $subTitle1 . '</div> |
|
260 | - <h4 class="title-topics">' . Display::returnFontAwesomeIcon('book') . $thematic_info['title'] . '</h4> |
|
261 | - <p class="date">' . Display::returnFontAwesomeIcon('calendar-o') . $thematic_advance_info['start_date'] . '</p> |
|
262 | - <div class="views">' . Display::returnFontAwesomeIcon('file-text-o') . strip_tags($thematic_advance_info['content']). '</div> |
|
263 | - <p class="time">'. Display::returnFontAwesomeIcon('clock-o') . get_lang('DurationInHours') . ' : ' . $thematic_advance_info['duration'] . ' - <a href="' . $thematicUrl . '">' . get_lang('SeeDetail') . '</a></p> |
|
259 | + <div class="topics">' . $subTitle1.'</div> |
|
260 | + <h4 class="title-topics">' . Display::returnFontAwesomeIcon('book').$thematic_info['title'].'</h4> |
|
261 | + <p class="date">' . Display::returnFontAwesomeIcon('calendar-o').$thematic_advance_info['start_date'].'</p> |
|
262 | + <div class="views">' . Display::returnFontAwesomeIcon('file-text-o').strip_tags($thematic_advance_info['content']).'</div> |
|
263 | + <p class="time">'. Display::returnFontAwesomeIcon('clock-o').get_lang('DurationInHours').' : '.$thematic_advance_info['duration'].' - <a href="'.$thematicUrl.'">'.get_lang('SeeDetail').'</a></p> |
|
264 | 264 | </div> |
265 | 265 | </div>'; |
266 | 266 | |
@@ -273,19 +273,19 @@ discard block |
||
273 | 273 | <div class="col-md-6 items-progress"> |
274 | 274 | <div class="thematic-cont"> |
275 | 275 | <div class="topics">'.$subTitle2.'</div> |
276 | - <h4 class="title-topics">'. Display::returnFontAwesomeIcon('book') . $thematic_info2['title'].'</h4> |
|
277 | - <p class="date">' . Display::returnFontAwesomeIcon('calendar-o') .$thematic_advance_info2['start_date'].'</p> |
|
278 | - <div class="views">' . Display::returnFontAwesomeIcon('file-text-o') . strip_tags($thematic_advance_info2['content']).'</div> |
|
279 | - <p class="time">'. Display::returnFontAwesomeIcon('clock-o') .get_lang('DurationInHours').' : '.$thematic_advance_info2['duration'].' - <a href="'.$thematicUrl.'">'.get_lang('SeeDetail').'</a></p> |
|
276 | + <h4 class="title-topics">'. Display::returnFontAwesomeIcon('book').$thematic_info2['title'].'</h4> |
|
277 | + <p class="date">' . Display::returnFontAwesomeIcon('calendar-o').$thematic_advance_info2['start_date'].'</p> |
|
278 | + <div class="views">' . Display::returnFontAwesomeIcon('file-text-o').strip_tags($thematic_advance_info2['content']).'</div> |
|
279 | + <p class="time">'. Display::returnFontAwesomeIcon('clock-o').get_lang('DurationInHours').' : '.$thematic_advance_info2['duration'].' - <a href="'.$thematicUrl.'">'.get_lang('SeeDetail').'</a></p> |
|
280 | 280 | </div> |
281 | 281 | </div>'; |
282 | 282 | } |
283 | 283 | $thematicPanel = '<div class="row">'; |
284 | - $thematicPanel .= '<div class="col-md-2">' . $infoUser . '</div>'; |
|
285 | - $thematicPanel .= '<div class="col-md-10"><div class="row">' . $thematicItemOne . $thematicItemTwo . '</div></div>'; |
|
284 | + $thematicPanel .= '<div class="col-md-2">'.$infoUser.'</div>'; |
|
285 | + $thematicPanel .= '<div class="col-md-10"><div class="row">'.$thematicItemOne.$thematicItemTwo.'</div></div>'; |
|
286 | 286 | $thematicPanel .= '</div>'; |
287 | 287 | $thematicPanel .= '<div class="separate"> |
288 | - <a href="' . $thematicUrl . '" class="btn btn-default btn-block">' . get_lang('ShowFullCourseAdvance') . '</a> |
|
288 | + <a href="' . $thematicUrl.'" class="btn btn-default btn-block">'.get_lang('ShowFullCourseAdvance').'</a> |
|
289 | 289 | </div>'; |
290 | 290 | $thematicProgress = Display::panelCollapse($titleThematic, $thematicPanel, 'thematic', null, 'accordion-thematic', 'collapse-thematic', false); |
291 | 291 | } |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | $editIconButton = Display::url( |
303 | 303 | '<em class="fa fa-wrench"></em> ', |
304 | 304 | api_get_path(WEB_CODE_PATH).'course_info/tools.php?'.api_get_cidreq(), |
305 | - ['class' => 'btn btn-default', 'title' => get_lang('CustomizeIcons') ] |
|
305 | + ['class' => 'btn btn-default', 'title' => get_lang('CustomizeIcons')] |
|
306 | 306 | ); |
307 | 307 | } |
308 | 308 | |
@@ -313,12 +313,12 @@ discard block |
||
313 | 313 | // Displays "Add intro" commands |
314 | 314 | $toolbar = '<div class="btn-group pull-right" role="group">'; |
315 | 315 | if (!empty($courseId)) { |
316 | - $textIntro = '<a class="btn btn-default" title="' . addslashes(get_lang('AddIntro')) . '" href="'.api_get_self().'?' . api_get_cidreq().'&intro_cmdAdd=1">'; |
|
316 | + $textIntro = '<a class="btn btn-default" title="'.addslashes(get_lang('AddIntro')).'" href="'.api_get_self().'?'.api_get_cidreq().'&intro_cmdAdd=1">'; |
|
317 | 317 | $textIntro .= '<em class="fa fa-file-text"></em> '; |
318 | 318 | $textIntro .= "</a>"; |
319 | - $toolbar .= $textIntro . $editIconButton; |
|
319 | + $toolbar .= $textIntro.$editIconButton; |
|
320 | 320 | } else { |
321 | - $toolbar .= '<a class="btn btn-default" href="' . api_get_self() . '?intro_cmdAdd=1">' . get_lang('AddIntro') . '</a>'; |
|
321 | + $toolbar .= '<a class="btn btn-default" href="'.api_get_self().'?intro_cmdAdd=1">'.get_lang('AddIntro').'</a>'; |
|
322 | 322 | $toolbar .= $editIconButton; |
323 | 323 | } |
324 | 324 | $toolbar .= '</div>'; |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | '<a class="btn btn-default" href="'.api_get_self().'?'.api_get_cidreq().'&intro_cmdEdit=1" title="'.get_lang('Modify').'"> |
332 | 332 | <em class="fa fa-pencil"></em></a>'; |
333 | 333 | $toolbar .= $editIconButton; |
334 | - $toolbar .="<a class=\"btn btn-default\" href=\"".api_get_self()."?".api_get_cidreq()."&intro_cmdDel=1\" onclick=\"javascript: |
|
334 | + $toolbar .= "<a class=\"btn btn-default\" href=\"".api_get_self()."?".api_get_cidreq()."&intro_cmdDel=1\" onclick=\"javascript: |
|
335 | 335 | if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)). |
336 | 336 | "')) return false;\"><em class=\"fa fa-trash-o\"></em></a>"; |
337 | 337 | |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | if(!confirm('".addslashes(api_htmlentities(get_lang('ConfirmYourChoice'), ENT_QUOTES, $charset)). |
346 | 346 | "')) return false;\"><em class=\"fa fa-trash-o\"></em></a>"; |
347 | 347 | } |
348 | - $toolbar .= "</div>"; |
|
348 | + $toolbar .= "</div>"; |
|
349 | 349 | // Fix for chrome XSS filter for videos in iframes - BT#7930 |
350 | 350 | $browser = api_get_navigator(); |
351 | 351 | if (strpos($introduction_section, '<iframe') !== false && $browser['name'] == 'Chrome') { |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | } else { |
365 | 365 | if (api_is_allowed_to_edit()) { |
366 | 366 | $introduction_section .= '<div class="help-course">'; |
367 | - $introduction_section .= get_lang('AddCustomCourseIntro') . ' ' . $textIntro; |
|
367 | + $introduction_section .= get_lang('AddCustomCourseIntro').' '.$textIntro; |
|
368 | 368 | $introduction_section .= '</div>'; |
369 | 369 | } |
370 | 370 | } |
@@ -115,8 +115,7 @@ discard block |
||
115 | 115 | */ |
116 | 116 | public static function getUTCDateTimeTypeClass() |
117 | 117 | { |
118 | - return isset(self::$utcDateTimeClass) ? self::$utcDateTimeClass : |
|
119 | - 'Application\DoctrineExtensions\DBAL\Types\UTCDateTimeType'; |
|
118 | + return isset(self::$utcDateTimeClass) ? self::$utcDateTimeClass : 'Application\DoctrineExtensions\DBAL\Types\UTCDateTimeType'; |
|
120 | 119 | } |
121 | 120 | |
122 | 121 | /** |
@@ -163,7 +162,7 @@ discard block |
||
163 | 162 | );*/ |
164 | 163 | |
165 | 164 | AnnotationRegistry::registerLoader( |
166 | - function ($class) use ($sysPath) { |
|
165 | + function($class) use ($sysPath) { |
|
167 | 166 | $file = str_replace("\\", DIRECTORY_SEPARATOR, $class).".php"; |
168 | 167 | $file = str_replace('Symfony/Component/Validator', '', $file); |
169 | 168 | $file = $sysPath.'vendor/symfony/validator'.$file; |
@@ -428,7 +427,7 @@ discard block |
||
428 | 427 | |
429 | 428 | if (!empty($params)) { |
430 | 429 | $sql = 'INSERT INTO '.$table_name.' ('.implode(',', $params).') |
431 | - VALUES (:'.implode(', :' ,$params).')'; |
|
430 | + VALUES (:'.implode(', :', $params).')'; |
|
432 | 431 | |
433 | 432 | $statement = self::getManager()->getConnection()->prepare($sql); |
434 | 433 | $result = $statement->execute($attributes); |
@@ -472,7 +471,7 @@ discard block |
||
472 | 471 | foreach ($attributes as $key => $value) { |
473 | 472 | $updateSql .= "$key = :$key "; |
474 | 473 | if ($count < count($attributes)) { |
475 | - $updateSql.= ', '; |
|
474 | + $updateSql .= ', '; |
|
476 | 475 | } |
477 | 476 | $count++; |
478 | 477 | } |
@@ -527,7 +526,7 @@ discard block |
||
527 | 526 | if ($columns == '*') { |
528 | 527 | $clean_columns = '*'; |
529 | 528 | } else { |
530 | - $clean_columns = (string)$columns; |
|
529 | + $clean_columns = (string) $columns; |
|
531 | 530 | } |
532 | 531 | } |
533 | 532 | |
@@ -574,7 +573,7 @@ discard block |
||
574 | 573 | $clean_values = array(); |
575 | 574 | foreach ($value_array as $item) { |
576 | 575 | $item = Database::escape_string($item); |
577 | - $clean_values[]= $item; |
|
576 | + $clean_values[] = $item; |
|
578 | 577 | } |
579 | 578 | } else { |
580 | 579 | $value_array = Database::escape_string($value_array); |
@@ -598,7 +597,7 @@ discard block |
||
598 | 597 | } |
599 | 598 | |
600 | 599 | if (!empty($where_return)) { |
601 | - $return_value = " WHERE $where_return" ; |
|
600 | + $return_value = " WHERE $where_return"; |
|
602 | 601 | } |
603 | 602 | break; |
604 | 603 | case 'order': |
@@ -621,10 +620,10 @@ discard block |
||
621 | 620 | if (in_array($element[1], array('desc', 'asc'))) { |
622 | 621 | $order = $element[1]; |
623 | 622 | } |
624 | - $temp_value[]= $element[0].' '.$order.' '; |
|
623 | + $temp_value[] = $element[0].' '.$order.' '; |
|
625 | 624 | } else { |
626 | 625 | //by default DESC |
627 | - $temp_value[]= $element[0].' DESC '; |
|
626 | + $temp_value[] = $element[0].' DESC '; |
|
628 | 627 | } |
629 | 628 | } |
630 | 629 | if (!empty($temp_value)) { |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | 'urlPicture' => $this->course->getPicturePath(true), |
239 | 239 | 'teachers' => $teachers, |
240 | 240 | 'tools' => array_map( |
241 | - function ($tool) { |
|
241 | + function($tool) { |
|
242 | 242 | return ['type' => $tool['name']]; |
243 | 243 | }, |
244 | 244 | $tools |
@@ -261,7 +261,7 @@ discard block |
||
261 | 261 | $results[] = [ |
262 | 262 | 'id' => $description->get_description_type(), |
263 | 263 | 'title' => $description->get_title(), |
264 | - 'content' => str_replace('src="/', 'src="' . api_get_path(WEB_PATH), $description->get_content()) |
|
264 | + 'content' => str_replace('src="/', 'src="'.api_get_path(WEB_PATH), $description->get_content()) |
|
265 | 265 | ]; |
266 | 266 | } |
267 | 267 | |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | |
295 | 295 | $path = $directory['path']; |
296 | 296 | } |
297 | - require_once api_get_path(LIBRARY_PATH) . 'fileDisplay.lib.php'; |
|
297 | + require_once api_get_path(LIBRARY_PATH).'fileDisplay.lib.php'; |
|
298 | 298 | |
299 | 299 | $courseInfo = api_get_course_info_by_id($this->course->getId()); |
300 | 300 | $documents = DocumentManager::get_all_document_data( |
@@ -309,7 +309,7 @@ discard block |
||
309 | 309 | $results = []; |
310 | 310 | |
311 | 311 | if (is_array($documents)) { |
312 | - $webPath = api_get_path(WEB_CODE_PATH) . 'document/document.php?'; |
|
312 | + $webPath = api_get_path(WEB_CODE_PATH).'document/document.php?'; |
|
313 | 313 | |
314 | 314 | /** @var array $document */ |
315 | 315 | foreach ($documents as $document) { |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | 'type' => $document['filetype'], |
327 | 327 | 'title' => $document['title'], |
328 | 328 | 'path' => $document['path'], |
329 | - 'url' => $webPath . http_build_query([ |
|
329 | + 'url' => $webPath.http_build_query([ |
|
330 | 330 | 'username' => $this->user->getUsername(), |
331 | 331 | 'api_key' => $this->apiKey, |
332 | 332 | 'cidReq' => $this->course->getCode(), |
@@ -370,7 +370,7 @@ discard block |
||
370 | 370 | $sessionId |
371 | 371 | ); |
372 | 372 | |
373 | - $announcements = array_map(function ($announcement) { |
|
373 | + $announcements = array_map(function($announcement) { |
|
374 | 374 | return [ |
375 | 375 | 'id' => intval($announcement['id']), |
376 | 376 | 'title' => strip_tags($announcement['title']), |
@@ -452,11 +452,11 @@ discard block |
||
452 | 452 | $webPath = api_get_path(WEB_PATH); |
453 | 453 | |
454 | 454 | return array_map( |
455 | - function ($event) use ($webPath) { |
|
455 | + function($event) use ($webPath) { |
|
456 | 456 | return [ |
457 | 457 | 'id' => intval($event['unique_id']), |
458 | 458 | 'title' => $event['title'], |
459 | - 'content' => str_replace('src="/', 'src="' . $webPath, $event['description']), |
|
459 | + 'content' => str_replace('src="/', 'src="'.$webPath, $event['description']), |
|
460 | 460 | 'startDate' => $event['start_date_localtime'], |
461 | 461 | 'endDate' => $event['end_date_localtime'], |
462 | 462 | 'isAllDay' => $event['allDay'] ? true : false |
@@ -478,7 +478,7 @@ discard block |
||
478 | 478 | $notebooks = $notebooksRepo->findByUser($this->user, $this->course, $this->session); |
479 | 479 | |
480 | 480 | return array_map( |
481 | - function (\Chamilo\CourseBundle\Entity\CNotebook $notebook) { |
|
481 | + function(\Chamilo\CourseBundle\Entity\CNotebook $notebook) { |
|
482 | 482 | return [ |
483 | 483 | 'id' => $notebook->getIid(), |
484 | 484 | 'title' => $notebook->getTitle(), |
@@ -502,9 +502,9 @@ discard block |
||
502 | 502 | public function getCourseForumCategories() |
503 | 503 | { |
504 | 504 | $sessionId = $this->session ? $this->session->getId() : 0; |
505 | - $webCoursePath = api_get_path(WEB_COURSE_PATH) . $this->course->getDirectory() . '/upload/forum/images/'; |
|
505 | + $webCoursePath = api_get_path(WEB_COURSE_PATH).$this->course->getDirectory().'/upload/forum/images/'; |
|
506 | 506 | |
507 | - require_once api_get_path(SYS_CODE_PATH) . 'forum/forumfunction.inc.php'; |
|
507 | + require_once api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php'; |
|
508 | 508 | |
509 | 509 | $categoriesFullData = get_forum_categories('', $this->course->getId(), $sessionId); |
510 | 510 | $categories = []; |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | 'catId' => intval($forumInfo['forum_category']), |
519 | 519 | 'title' => $forumInfo['forum_title'], |
520 | 520 | 'description' => $forumInfo['forum_comment'], |
521 | - 'image' => $forumInfo['forum_image'] ? ($webCoursePath . $forumInfo['forum_image']) : '', |
|
521 | + 'image' => $forumInfo['forum_image'] ? ($webCoursePath.$forumInfo['forum_image']) : '', |
|
522 | 522 | 'numberOfThreads' => isset($forumInfo['number_of_threads']) ? intval($forumInfo['number_of_threads']) : 0, |
523 | 523 | 'lastPost' => null |
524 | 524 | ]; |
@@ -541,7 +541,7 @@ discard block |
||
541 | 541 | foreach ($categoriesFullData as $category) { |
542 | 542 | $categoryForums = array_filter( |
543 | 543 | $forums, |
544 | - function (array $forum) use ($category) { |
|
544 | + function(array $forum) use ($category) { |
|
545 | 545 | if ($forum['catId'] != $category['cat_id']) { |
546 | 546 | return false; |
547 | 547 | } |
@@ -570,7 +570,7 @@ discard block |
||
570 | 570 | */ |
571 | 571 | public function getCourseForum($forumId) |
572 | 572 | { |
573 | - require_once api_get_path(SYS_CODE_PATH) . 'forum/forumfunction.inc.php'; |
|
573 | + require_once api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php'; |
|
574 | 574 | |
575 | 575 | $forumInfo = get_forums($forumId, $this->course->getCode()); |
576 | 576 | |
@@ -578,12 +578,12 @@ discard block |
||
578 | 578 | throw new Exception(get_lang('NoForum')); |
579 | 579 | } |
580 | 580 | |
581 | - $webCoursePath = api_get_path(WEB_COURSE_PATH) . $this->course->getDirectory() . '/upload/forum/images/'; |
|
581 | + $webCoursePath = api_get_path(WEB_COURSE_PATH).$this->course->getDirectory().'/upload/forum/images/'; |
|
582 | 582 | $forum = [ |
583 | 583 | 'id' => $forumInfo['iid'], |
584 | 584 | 'title' => $forumInfo['forum_title'], |
585 | 585 | 'description' => $forumInfo['forum_comment'], |
586 | - 'image' => $forumInfo['forum_image'] ? ($webCoursePath . $forumInfo['forum_image']) : '', |
|
586 | + 'image' => $forumInfo['forum_image'] ? ($webCoursePath.$forumInfo['forum_image']) : '', |
|
587 | 587 | 'threads' => [] |
588 | 588 | ]; |
589 | 589 | |
@@ -610,7 +610,7 @@ discard block |
||
610 | 610 | */ |
611 | 611 | public function getCourseForumThread($forumId, $threadId) |
612 | 612 | { |
613 | - require_once api_get_path(SYS_CODE_PATH) . 'forum/forumfunction.inc.php'; |
|
613 | + require_once api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php'; |
|
614 | 614 | |
615 | 615 | $threadInfo = get_thread_information($forumId, $threadId); |
616 | 616 | |
@@ -648,7 +648,7 @@ discard block |
||
648 | 648 | $pictureInfo = UserManager::get_user_picture_path_by_id($this->user->getId(), 'web'); |
649 | 649 | |
650 | 650 | $result = [ |
651 | - 'pictureUri' => $pictureInfo['dir'] . $pictureInfo['file'], |
|
651 | + 'pictureUri' => $pictureInfo['dir'].$pictureInfo['file'], |
|
652 | 652 | 'fullName' => $this->user->getCompleteName(), |
653 | 653 | 'username' => $this->user->getUsername(), |
654 | 654 | 'officialCode' => $this->user->getOfficialCode(), |
@@ -758,7 +758,7 @@ discard block |
||
758 | 758 | 'id' => $lpId, |
759 | 759 | 'title' => Security::remove_XSS($lpDetails['lp_name']), |
760 | 760 | 'progress' => intval($progress), |
761 | - 'url' => api_get_path(WEB_CODE_PATH) . 'webservices/api/v2.php?' . http_build_query([ |
|
761 | + 'url' => api_get_path(WEB_CODE_PATH).'webservices/api/v2.php?'.http_build_query([ |
|
762 | 762 | 'hash' => $this->encodeParams([ |
763 | 763 | 'action' => 'course_learnpath', |
764 | 764 | 'lp_id' => $lpId, |
@@ -805,7 +805,7 @@ discard block |
||
805 | 805 | * @param string $encoded |
806 | 806 | * @return array |
807 | 807 | */ |
808 | - public static function decodeParams($encoded){ |
|
808 | + public static function decodeParams($encoded) { |
|
809 | 809 | $decoded = str_replace(['-', '_', '.'], ['+', '/', '='], $encoded); |
810 | 810 | $mod4 = strlen($decoded) % 4; |
811 | 811 | |
@@ -833,7 +833,7 @@ discard block |
||
833 | 833 | ChamiloSession::write('_user', $loggedUser); |
834 | 834 | Login::init_user($this->user->getId(), true); |
835 | 835 | |
836 | - $url = api_get_path(WEB_CODE_PATH) . 'lp/lp_controller.php?' . http_build_query([ |
|
836 | + $url = api_get_path(WEB_CODE_PATH).'lp/lp_controller.php?'.http_build_query([ |
|
837 | 837 | 'cidReq' => $this->course->getCode(), |
838 | 838 | 'id_session' => $sessionId, |
839 | 839 | 'gidReq' => 0, |
@@ -855,7 +855,7 @@ discard block |
||
855 | 855 | */ |
856 | 856 | public function saveForumPost(array $postValues, $forumId) |
857 | 857 | { |
858 | - require_once api_get_path(SYS_CODE_PATH) . 'forum/forumfunction.inc.php'; |
|
858 | + require_once api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php'; |
|
859 | 859 | |
860 | 860 | $forum = get_forums($forumId, $this->course->getCode()); |
861 | 861 | |
@@ -992,7 +992,7 @@ discard block |
||
992 | 992 | */ |
993 | 993 | public function saveForumThread(array $values, $forumId) |
994 | 994 | { |
995 | - require_once api_get_path(SYS_CODE_PATH) . 'forum/forumfunction.inc.php'; |
|
995 | + require_once api_get_path(SYS_CODE_PATH).'forum/forumfunction.inc.php'; |
|
996 | 996 | |
997 | 997 | $forum = get_forums($forumId, $this->course->getCode()); |
998 | 998 | $courseInfo = api_get_course_info($this->course->getCode()); |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | ); |
99 | 99 | |
100 | 100 | // Generating the thumbnail. |
101 | - $image = $this->base_work_dir.$dir . $file_name; |
|
101 | + $image = $this->base_work_dir.$dir.$file_name; |
|
102 | 102 | |
103 | 103 | $pattern = '/(\w+)\.png$/'; |
104 | 104 | $replacement = '${1}_thumb.png'; |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | |
115 | 115 | $my_new_image = new Image($image); |
116 | 116 | $my_new_image->resize($thumb_width, $thumb_height); |
117 | - $my_new_image->send_image($this->base_work_dir.$dir . $thumb_name, -1, 'png'); |
|
117 | + $my_new_image->send_image($this->base_work_dir.$dir.$thumb_name, -1, 'png'); |
|
118 | 118 | |
119 | 119 | // Adding the thumbnail to documents. |
120 | 120 | $document_id_thumb = add_document( |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | <body> |
141 | 141 | <img src="'.$slide_src.'" /> |
142 | 142 | </body> |
143 | -</html>'); // This indentation is to make the generated html files to look well. |
|
143 | +</html>'); // This indentation is to make the generated html files to look well. |
|
144 | 144 | |
145 | 145 | fclose($fp); |
146 | 146 | $document_id = add_document( |
@@ -175,7 +175,7 @@ discard block |
||
175 | 175 | foreach ($specific_fields as $specific_field) { |
176 | 176 | if (isset($_REQUEST[$specific_field['code']])) { |
177 | 177 | $sterms = trim($_REQUEST[$specific_field['code']]); |
178 | - $all_specific_terms .= ' '. $sterms; |
|
178 | + $all_specific_terms .= ' '.$sterms; |
|
179 | 179 | if (!empty($sterms)) { |
180 | 180 | $sterms = explode(',', $sterms); |
181 | 181 | foreach ($sterms as $sterm) { |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | } |
185 | 185 | } |
186 | 186 | } |
187 | - $slide_body = $all_specific_terms .' '. $slide_body; |
|
187 | + $slide_body = $all_specific_terms.' '.$slide_body; |
|
188 | 188 | $ic_slide->addValue('content', $slide_body); |
189 | 189 | /* FIXME: cidReq:lp_id:doc_id al indexar */ |
190 | 190 | // Add a comment to say terms separated by commas. |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | SE_COURSE_ID => $courseid, |
197 | 197 | SE_TOOL_ID => TOOL_LEARNPATH, |
198 | 198 | SE_DATA => array('lp_id' => $lp_id, 'lp_item' => $previous, 'document_id' => $document_id), |
199 | - SE_USER => (int)api_get_user_id(), |
|
199 | + SE_USER => (int) api_get_user_id(), |
|
200 | 200 | ); |
201 | 201 | $ic_slide->xapian_data = serialize($xapian_data); |
202 | 202 | $di->addChunk($ic_slide); |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | $_course = api_get_course_info(); |
235 | 235 | foreach ($files as $file) { |
236 | 236 | // '||' is used as separator between slide name (with accents) and file name (without accents). |
237 | - list($slide_name,$file_name) = explode('||',$file); |
|
237 | + list($slide_name, $file_name) = explode('||', $file); |
|
238 | 238 | $slide_name = api_htmlentities($slide_name, ENT_COMPAT, $this->original_charset); |
239 | 239 | $slide_name = str_replace('’', '\'', $slide_name); |
240 | 240 | $slide_name = api_convert_encoding($slide_name, api_get_system_encoding(), $this->original_charset); |
@@ -124,10 +124,10 @@ discard block |
||
124 | 124 | function display_advanced_search_form () { |
125 | 125 | if ($("#advanced_search_form").css("display") == "none") { |
126 | 126 | $("#advanced_search_form").css("display","block"); |
127 | - $("#img_plus_and_minus").html(\' '. Display::returnFontAwesomeIcon('arrow-down') . ' '. get_lang('AdvancedSearch').'\'); |
|
127 | + $("#img_plus_and_minus").html(\' '. Display::returnFontAwesomeIcon('arrow-down').' '.get_lang('AdvancedSearch').'\'); |
|
128 | 128 | } else { |
129 | 129 | $("#advanced_search_form").css("display","none"); |
130 | - $("#img_plus_and_minus").html(\' '. Display::returnFontAwesomeIcon('arrow-right') . ' '.get_lang('AdvancedSearch').'\'); |
|
130 | + $("#img_plus_and_minus").html(\' '. Display::returnFontAwesomeIcon('arrow-right').' '.get_lang('AdvancedSearch').'\'); |
|
131 | 131 | } |
132 | 132 | } |
133 | 133 | |
@@ -204,7 +204,7 @@ discard block |
||
204 | 204 | // adding the filter to see the user's only of the current access_url |
205 | 205 | if ((api_is_platform_admin() || api_is_session_admin()) && api_get_multiple_access_url()) { |
206 | 206 | $access_url_rel_user_table = Database :: get_main_table(TABLE_MAIN_ACCESS_URL_REL_USER); |
207 | - $sql.= " INNER JOIN $access_url_rel_user_table url_rel_user ON (u.id=url_rel_user.user_id)"; |
|
207 | + $sql .= " INNER JOIN $access_url_rel_user_table url_rel_user ON (u.id=url_rel_user.user_id)"; |
|
208 | 208 | } |
209 | 209 | |
210 | 210 | $keywordList = array( |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | */ |
244 | 244 | |
245 | 245 | if (isset($_GET['keyword']) && !empty($_GET['keyword'])) { |
246 | - $keywordFiltered = Database::escape_string("%". $_GET['keyword'] ."%"); |
|
246 | + $keywordFiltered = Database::escape_string("%".$_GET['keyword']."%"); |
|
247 | 247 | $sql .= " WHERE ( |
248 | 248 | u.firstname LIKE '$keywordFiltered' OR |
249 | 249 | u.lastname LIKE '$keywordFiltered' OR |
@@ -277,13 +277,13 @@ discard block |
||
277 | 277 | */ |
278 | 278 | $sql .= " $query_admin_table |
279 | 279 | WHERE ( |
280 | - u.firstname LIKE '". Database::escape_string("%".$keywordListValues['keyword_firstname']."%")."' AND |
|
280 | + u.firstname LIKE '".Database::escape_string("%".$keywordListValues['keyword_firstname']."%")."' AND |
|
281 | 281 | u.lastname LIKE '". Database::escape_string("%".$keywordListValues['keyword_lastname']."%")."' AND |
282 | 282 | u.username LIKE '". Database::escape_string("%".$keywordListValues['keyword_username']."%")."' AND |
283 | 283 | u.email LIKE '". Database::escape_string("%".$keywordListValues['keyword_email']."%")."' AND |
284 | 284 | u.status LIKE '".Database::escape_string($keywordListValues['keyword_status'])."' "; |
285 | 285 | if (!empty($keywordListValues['keyword_officialcode'])) { |
286 | - $sql .= " AND u.official_code LIKE '" . Database::escape_string("%" . $keywordListValues['keyword_officialcode'] . "%") . "' "; |
|
286 | + $sql .= " AND u.official_code LIKE '".Database::escape_string("%".$keywordListValues['keyword_officialcode']."%")."' "; |
|
287 | 287 | } |
288 | 288 | $sql .= " |
289 | 289 | $keyword_admin |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | $lastname = $userInfo['lastname']; |
374 | 374 | |
375 | 375 | if (api_is_western_name_order()) { |
376 | - $message = sprintf(get_lang('AttemptingToLoginAs'),$firstname, $lastname, $userId); |
|
376 | + $message = sprintf(get_lang('AttemptingToLoginAs'), $firstname, $lastname, $userId); |
|
377 | 377 | } else { |
378 | 378 | $message = sprintf(get_lang('AttemptingToLoginAs'), $lastname, $firstname, $userId); |
379 | 379 | } |
@@ -440,7 +440,7 @@ discard block |
||
440 | 440 | function get_user_data($from, $number_of_items, $column, $direction) |
441 | 441 | { |
442 | 442 | $sql = prepare_user_sql_query(false); |
443 | - if (!in_array($direction, array('ASC','DESC'))) { |
|
443 | + if (!in_array($direction, array('ASC', 'DESC'))) { |
|
444 | 444 | $direction = 'ASC'; |
445 | 445 | } |
446 | 446 | $column = intval($column); |
@@ -457,7 +457,7 @@ discard block |
||
457 | 457 | |
458 | 458 | $res = Database::query($sql); |
459 | 459 | |
460 | - $users = array (); |
|
460 | + $users = array(); |
|
461 | 461 | $t = time(); |
462 | 462 | while ($user = Database::fetch_row($res)) { |
463 | 463 | $userPicture = UserManager::getUserPicture($user[0], USER_IMAGE_SIZE_SMALL); |
@@ -551,8 +551,8 @@ discard block |
||
551 | 551 | <div class="blackboard_hide" id="div_s_'.$user_id.'"> </div> |
552 | 552 | </a>'; |
553 | 553 | } else { |
554 | - $result .= Display::return_icon('course_na.png',get_lang('Courses')).' '; |
|
555 | - $result .= Display::return_icon('course_na.png',get_lang('Sessions')).' '; |
|
554 | + $result .= Display::return_icon('course_na.png', get_lang('Courses')).' '; |
|
555 | + $result .= Display::return_icon('course_na.png', get_lang('Sessions')).' '; |
|
556 | 556 | } |
557 | 557 | |
558 | 558 | if (api_is_platform_admin()) { |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | if (api_is_platform_admin(true)) { |
588 | 588 | $editProfileUrl = Display::getProfileEditionLink($user_id, true); |
589 | 589 | if (!$user_is_anonymous && api_global_admin_can_edit_admin($user_id, null, true)) { |
590 | - $result .= '<a href="' . $editProfileUrl . '">'.Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a> '; |
|
590 | + $result .= '<a href="'.$editProfileUrl.'">'.Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a> '; |
|
591 | 591 | } else { |
592 | 592 | $result .= Display::return_icon('edit_na.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a> '; |
593 | 593 | } |
@@ -598,7 +598,7 @@ discard block |
||
598 | 598 | if ($allowAssignSkill) { |
599 | 599 | $result .= Display::url( |
600 | 600 | Display::return_icon('skill-badges.png', get_lang('AssignSkill'), null, ICON_SIZE_SMALL), |
601 | - api_get_path(WEB_CODE_PATH) . 'badge/assign.php?' . http_build_query(['user' => $user_id]) |
|
601 | + api_get_path(WEB_CODE_PATH).'badge/assign.php?'.http_build_query(['user' => $user_id]) |
|
602 | 602 | ); |
603 | 603 | } |
604 | 604 | |
@@ -738,10 +738,10 @@ discard block |
||
738 | 738 | case 'add_user_to_my_url': |
739 | 739 | $user_id = $_REQUEST["user_id"]; |
740 | 740 | $result = UrlManager::add_user_to_url($user_id, $current_access_url_id); |
741 | - if ($result ) { |
|
741 | + if ($result) { |
|
742 | 742 | $user_info = api_get_user_info($user_id); |
743 | 743 | $message = get_lang('UserAdded').' '.$user_info['firstname'].' '.$user_info['lastname'].' ('.$user_info['username'].')'; |
744 | - $message = Display::return_message($message, 'confirmation'); |
|
744 | + $message = Display::return_message($message, 'confirmation'); |
|
745 | 745 | } |
746 | 746 | break; |
747 | 747 | case 'delete_user': |
@@ -800,7 +800,7 @@ discard block |
||
800 | 800 | $searchAdvanced = ' |
801 | 801 | <a id="advanced_params" href="javascript://" class = "btn btn-default advanced_options" onclick="display_advanced_search_form();"> |
802 | 802 | <span id="img_plus_and_minus"> |
803 | - '. Display::returnFontAwesomeIcon('arrow-right') . ' '.get_lang('AdvancedSearch').' |
|
803 | + '. Display::returnFontAwesomeIcon('arrow-right').' '.get_lang('AdvancedSearch').' |
|
804 | 804 | </span> |
805 | 805 | </a>'; |
806 | 806 | $actionsLeft = ''; |
@@ -808,7 +808,7 @@ discard block |
||
808 | 808 | $actionsRight = ''; |
809 | 809 | if (api_is_platform_admin()) { |
810 | 810 | $actionsRight .= '<a class="pull-right" href="'.api_get_path(WEB_CODE_PATH).'admin/user_add.php">'. |
811 | - Display::return_icon('new_user.png',get_lang('AddUsers'),'',ICON_SIZE_MEDIUM).'</a>'; |
|
811 | + Display::return_icon('new_user.png', get_lang('AddUsers'), '', ICON_SIZE_MEDIUM).'</a>'; |
|
812 | 812 | } |
813 | 813 | |
814 | 814 | $actionsLeft .= $form->returnForm(); |
@@ -834,7 +834,7 @@ discard block |
||
834 | 834 | // Display Advanced search form. |
835 | 835 | $form = new FormValidator('advanced_search', 'get', '', '', array(), FormValidator::LAYOUT_HORIZONTAL); |
836 | 836 | |
837 | -$form->addElement('html','<div id="advanced_search_form" style="display:none;">'); |
|
837 | +$form->addElement('html', '<div id="advanced_search_form" style="display:none;">'); |
|
838 | 838 | $form->addElement('header', get_lang('AdvancedSearch')); |
839 | 839 | $form->addText('keyword_firstname', get_lang('FirstName'), false); |
840 | 840 | $form->addText('keyword_lastname', get_lang('LastName'), false); |
@@ -873,7 +873,7 @@ discard block |
||
873 | 873 | $defaults['keyword_active'] = 1; |
874 | 874 | $defaults['keyword_inactive'] = 1; |
875 | 875 | $form->setDefaults($defaults); |
876 | -$form->addElement('html','</div>'); |
|
876 | +$form->addElement('html', '</div>'); |
|
877 | 877 | |
878 | 878 | $form = $form->returnForm(); |
879 | 879 | |
@@ -954,10 +954,10 @@ discard block |
||
954 | 954 | } |
955 | 955 | if ($add_user) { |
956 | 956 | $row_table = array(); |
957 | - $row_table[] = api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].') '; |
|
958 | - $row_table[] = $access_info_to_string; |
|
957 | + $row_table[] = api_get_person_name($user['firstname'], $user['lastname']).' ('.$user['username'].') '; |
|
958 | + $row_table[] = $access_info_to_string; |
|
959 | 959 | $url = api_get_self().'?action=add_user_to_my_url&user_id='.$user['id'].'&sec_token='.$_SESSION['sec_token']; |
960 | - $row_table[] = Display::url(get_lang('AddUserToMyURL'), $url, array('class' => 'btn')); |
|
960 | + $row_table[] = Display::url(get_lang('AddUserToMyURL'), $url, array('class' => 'btn')); |
|
961 | 961 | |
962 | 962 | foreach ($row_table as $cell) { |
963 | 963 | $table->setCellContents($row, $column, $cell); |
@@ -43,11 +43,11 @@ discard block |
||
43 | 43 | } |
44 | 44 | |
45 | 45 | $folder = api_get_unique_id(); |
46 | - $destinationDir = api_get_path(SYS_ARCHIVE_PATH) . $folder; |
|
46 | + $destinationDir = api_get_path(SYS_ARCHIVE_PATH).$folder; |
|
47 | 47 | $coursePath = api_get_course_path(); |
48 | 48 | $sessionId = api_get_session_id(); |
49 | 49 | $groupId = api_get_group_id(); |
50 | - $documentPath = api_get_path(SYS_COURSE_PATH) . $coursePath . '/document'; |
|
50 | + $documentPath = api_get_path(SYS_COURSE_PATH).$coursePath.'/document'; |
|
51 | 51 | $courseInfo = api_get_course_info(); |
52 | 52 | |
53 | 53 | mkdir($destinationDir, api_get_permissions_for_new_directories(), true); |
@@ -817,7 +817,7 @@ discard block |
||
817 | 817 | if ($weighting > 0) { |
818 | 818 | $questionWeighting += $weighting; |
819 | 819 | } |
820 | - $goodAnswer = $correct ? true : false; |
|
820 | + $goodAnswer = $correct ? true : false; |
|
821 | 821 | |
822 | 822 | $this->fixPathInText($importedFiles, $answer); |
823 | 823 | |
@@ -854,7 +854,7 @@ discard block |
||
854 | 854 | if ($weighting > 0) { |
855 | 855 | $questionWeighting += $weighting; |
856 | 856 | } |
857 | - $goodAnswer = $correct ? true : false; |
|
857 | + $goodAnswer = $correct ? true : false; |
|
858 | 858 | |
859 | 859 | $this->fixPathInText($importedFiles, $answer); |
860 | 860 | |
@@ -955,7 +955,7 @@ discard block |
||
955 | 955 | $answer['questiontext'] |
956 | 956 | ); |
957 | 957 | |
958 | - $placeholder .= '<p> ' . strip_tags($answer['questiontext']).' '.$currentAnswers . ' </p>'; |
|
958 | + $placeholder .= '<p> '.strip_tags($answer['questiontext']).' '.$currentAnswers.' </p>'; |
|
959 | 959 | } |
960 | 960 | |
961 | 961 | return $optionsValues; |
@@ -193,9 +193,9 @@ |
||
193 | 193 | /* File case */ |
194 | 194 | if (is_file($source)) { |
195 | 195 | if ($forceMove && !$isWindowsOS && $canExec) { |
196 | - exec('mv ' . $source . ' ' . $target . '/' . $file_name); |
|
196 | + exec('mv '.$source.' '.$target.'/'.$file_name); |
|
197 | 197 | } else { |
198 | - copy($source, $target . '/' . $file_name); |
|
198 | + copy($source, $target.'/'.$file_name); |
|
199 | 199 | unlink($source); |
200 | 200 | } |
201 | 201 | return true; |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | // General parameters passed via POST/GET |
36 | 36 | if ($debug) { |
37 | - error_log('Entered exercise_result.php: ' . print_r($_POST, 1)); |
|
37 | + error_log('Entered exercise_result.php: '.print_r($_POST, 1)); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | if (empty($formSent)) { |
@@ -131,19 +131,19 @@ discard block |
||
131 | 131 | } |
132 | 132 | |
133 | 133 | if (!empty($gradebook) && $gradebook == 'view') { |
134 | - $interbreadcrumb[] = array('url' => '../gradebook/' . $_SESSION['gradebook_dest'], 'name' => get_lang('ToolGradebook')); |
|
134 | + $interbreadcrumb[] = array('url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('ToolGradebook')); |
|
135 | 135 | } |
136 | 136 | |
137 | 137 | $fromlink = ''; |
138 | 138 | |
139 | -$interbreadcrumb[] = array("url" => "exercise.php?" . api_get_cidreq(), "name" => get_lang('Exercises')); |
|
140 | -$interbreadcrumb[] = array("url" => "overview.php?exerciseId=" . $exercise_id . '&' . api_get_cidreq(), "name" => $objExercise->name); |
|
139 | +$interbreadcrumb[] = array("url" => "exercise.php?".api_get_cidreq(), "name" => get_lang('Exercises')); |
|
140 | +$interbreadcrumb[] = array("url" => "overview.php?exerciseId=".$exercise_id.'&'.api_get_cidreq(), "name" => $objExercise->name); |
|
141 | 141 | $interbreadcrumb[] = array("url" => "#", "name" => get_lang('Result')); |
142 | 142 | |
143 | 143 | $this_section = SECTION_COURSES; |
144 | 144 | |
145 | -$htmlHeadXtra[] = '<link rel="stylesheet" href="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/css/hotspot.css">'; |
|
146 | -$htmlHeadXtra[] = '<script src="' . api_get_path(WEB_LIBRARY_JS_PATH) . 'hotspot/js/hotspot.js"></script>'; |
|
145 | +$htmlHeadXtra[] = '<link rel="stylesheet" href="'.api_get_path(WEB_LIBRARY_JS_PATH).'hotspot/css/hotspot.css">'; |
|
146 | +$htmlHeadXtra[] = '<script src="'.api_get_path(WEB_LIBRARY_JS_PATH).'hotspot/js/hotspot.js"></script>'; |
|
147 | 147 | |
148 | 148 | if ($origin != 'learnpath') { |
149 | 149 | Display::display_header(''); |
@@ -269,29 +269,29 @@ discard block |
||
269 | 269 | $i = $totalScore = $totalWeighting = 0; |
270 | 270 | |
271 | 271 | if ($debug > 0) { |
272 | - error_log("ExerciseResult: " . print_r($exerciseResult, 1)); |
|
273 | - error_log("QuestionList: " . print_r($questionList, 1)); |
|
272 | + error_log("ExerciseResult: ".print_r($exerciseResult, 1)); |
|
273 | + error_log("QuestionList: ".print_r($questionList, 1)); |
|
274 | 274 | } |
275 | 275 | |
276 | 276 | $arrques = array(); |
277 | 277 | $arrans = array(); |
278 | 278 | |
279 | -$user_restriction = $is_allowedToEdit ? '' : "AND user_id=" . intval($student_id) . " "; |
|
279 | +$user_restriction = $is_allowedToEdit ? '' : "AND user_id=".intval($student_id)." "; |
|
280 | 280 | $sql = "SELECT attempts.question_id, answer |
281 | 281 | FROM $TBL_TRACK_ATTEMPT as attempts |
282 | - INNER JOIN " . $TBL_TRACK_EXERCISES . " AS stats_exercises |
|
282 | + INNER JOIN ".$TBL_TRACK_EXERCISES." AS stats_exercises |
|
283 | 283 | ON stats_exercises.exe_id=attempts.exe_id |
284 | 284 | INNER JOIN $TBL_EXERCISE_QUESTION AS quizz_rel_questions |
285 | 285 | ON |
286 | 286 | quizz_rel_questions.exercice_id=stats_exercises.exe_exo_id AND |
287 | 287 | quizz_rel_questions.question_id = attempts.question_id AND |
288 | - quizz_rel_questions.c_id=" . api_get_course_int_id() . " |
|
289 | - INNER JOIN " . $TBL_QUESTIONS . " AS questions |
|
288 | + quizz_rel_questions.c_id=".api_get_course_int_id()." |
|
289 | + INNER JOIN " . $TBL_QUESTIONS." AS questions |
|
290 | 290 | ON |
291 | 291 | questions.id=quizz_rel_questions.question_id AND |
292 | - questions.c_id = " . api_get_course_int_id() . " |
|
292 | + questions.c_id = " . api_get_course_int_id()." |
|
293 | 293 | WHERE |
294 | - attempts.exe_id = " . intval($id) . " $user_restriction |
|
294 | + attempts.exe_id = " . intval($id)." $user_restriction |
|
295 | 295 | GROUP BY quizz_rel_questions.question_order, attempts.question_id"; |
296 | 296 | |
297 | 297 | $result = Database::query($sql); |
@@ -520,26 +520,26 @@ discard block |
||
520 | 520 | $table_resume = '<table class="data_table"> |
521 | 521 | <tr class="row_odd" > |
522 | 522 | <td></td> |
523 | - <td ><b>' . get_lang('Requirements') . '</b></td> |
|
524 | - <td><b>' . get_lang('YourAnswer') . '</b></td> |
|
523 | + <td ><b>' . get_lang('Requirements').'</b></td> |
|
524 | + <td><b>' . get_lang('YourAnswer').'</b></td> |
|
525 | 525 | </tr> |
526 | 526 | |
527 | 527 | <tr class="row_even"> |
528 | - <td><b>' . get_lang('Overlap') . '</b></td> |
|
529 | - <td>' . get_lang('Min') . ' ' . $threadhold1 . '</td> |
|
530 | - <td><div style="color:' . $overlap_color . '">' . (($final_overlap < 0) ? 0 : intval($final_overlap)) . '</div></td> |
|
528 | + <td><b>' . get_lang('Overlap').'</b></td> |
|
529 | + <td>' . get_lang('Min').' '.$threadhold1.'</td> |
|
530 | + <td><div style="color:' . $overlap_color.'">'.(($final_overlap < 0) ? 0 : intval($final_overlap)).'</div></td> |
|
531 | 531 | </tr> |
532 | 532 | |
533 | 533 | <tr> |
534 | - <td><b>' . get_lang('Excess') . '</b></td> |
|
535 | - <td>' . get_lang('Max') . ' ' . $threadhold2 . '</td> |
|
536 | - <td><div style="color:' . $excess_color . '">' . (($final_excess < 0) ? 0 : intval($final_excess)) . '</div></td> |
|
534 | + <td><b>' . get_lang('Excess').'</b></td> |
|
535 | + <td>' . get_lang('Max').' '.$threadhold2.'</td> |
|
536 | + <td><div style="color:' . $excess_color.'">'.(($final_excess < 0) ? 0 : intval($final_excess)).'</div></td> |
|
537 | 537 | </tr> |
538 | 538 | |
539 | 539 | <tr class="row_even"> |
540 | - <td><b>' . get_lang('Missing') . '</b></td> |
|
541 | - <td>' . get_lang('Max') . ' ' . $threadhold3 . '</td> |
|
542 | - <td><div style="color:' . $missing_color . '">' . (($final_missing < 0) ? 0 : intval($final_missing)) . '</div></td> |
|
540 | + <td><b>' . get_lang('Missing').'</b></td> |
|
541 | + <td>' . get_lang('Max').' '.$threadhold3.'</td> |
|
542 | + <td><div style="color:' . $missing_color.'">'.(($final_missing < 0) ? 0 : intval($final_missing)).'</div></td> |
|
543 | 543 | </tr></table>'; |
544 | 544 | |
545 | 545 | if ($answerType != HOT_SPOT_DELINEATION) { |
@@ -563,25 +563,25 @@ discard block |
||
563 | 563 | } |
564 | 564 | } |
565 | 565 | |
566 | - echo '<h1><div style="color:#333;">' . get_lang('Feedback') . '</div></h1>'; |
|
566 | + echo '<h1><div style="color:#333;">'.get_lang('Feedback').'</div></h1>'; |
|
567 | 567 | if ($answerType == HOT_SPOT_DELINEATION) { |
568 | 568 | if ($organs_at_risk_hit > 0) { |
569 | - $message = '<br />' . get_lang('ResultIs') . ' <b>' . $result_comment . '</b><br />'; |
|
570 | - $message .= '<p style="color:#DC0A0A;"><b>' . get_lang('OARHit') . '</b></p>'; |
|
569 | + $message = '<br />'.get_lang('ResultIs').' <b>'.$result_comment.'</b><br />'; |
|
570 | + $message .= '<p style="color:#DC0A0A;"><b>'.get_lang('OARHit').'</b></p>'; |
|
571 | 571 | } else { |
572 | - $message = '<p>' . get_lang('YourDelineation') . '</p>'; |
|
572 | + $message = '<p>'.get_lang('YourDelineation').'</p>'; |
|
573 | 573 | $message .= $table_resume; |
574 | - $message .= '<br />' . get_lang('ResultIs') . ' <b>' . $result_comment . '</b><br />'; |
|
574 | + $message .= '<br />'.get_lang('ResultIs').' <b>'.$result_comment.'</b><br />'; |
|
575 | 575 | } |
576 | - $message .= '<p>' . $comment . '</p>'; |
|
576 | + $message .= '<p>'.$comment.'</p>'; |
|
577 | 577 | echo $message; |
578 | 578 | } else { |
579 | - echo '<p>' . $comment . '</p>'; |
|
579 | + echo '<p>'.$comment.'</p>'; |
|
580 | 580 | } |
581 | 581 | |
582 | 582 | //showing the score |
583 | - $queryfree = "SELECT marks from " . $TBL_TRACK_ATTEMPT . " |
|
584 | - WHERE exe_id = " . intval($id) . " AND question_id= " . intval($questionId) . ""; |
|
583 | + $queryfree = "SELECT marks from ".$TBL_TRACK_ATTEMPT." |
|
584 | + WHERE exe_id = " . intval($id)." AND question_id= ".intval($questionId).""; |
|
585 | 585 | $resfree = Database::query($queryfree); |
586 | 586 | $questionScore = Database::result($resfree, 0, "marks"); |
587 | 587 | $totalScore += $questionScore; |
@@ -637,8 +637,8 @@ discard block |
||
637 | 637 | $marksname = ''; |
638 | 638 | |
639 | 639 | if ($isFeedbackAllowed) { |
640 | - $name = "fckdiv" . $questionId; |
|
641 | - $marksname = "marksName" . $questionId; |
|
640 | + $name = "fckdiv".$questionId; |
|
641 | + $marksname = "marksName".$questionId; |
|
642 | 642 | if (in_array($answerType, array(FREE_ANSWER, ORAL_EXPRESSION))) { |
643 | 643 | $url_name = get_lang('EditCommentsAndMarks'); |
644 | 644 | } else { |
@@ -649,32 +649,32 @@ discard block |
||
649 | 649 | } |
650 | 650 | } |
651 | 651 | echo '<br />'; |
652 | - echo Display::url($url_name, 'javascript://', array('class' => 'btn', 'onclick' => "showfck('" . $name . "', '" . $marksname . "');")); |
|
652 | + echo Display::url($url_name, 'javascript://', array('class' => 'btn', 'onclick' => "showfck('".$name."', '".$marksname."');")); |
|
653 | 653 | echo '<br />'; |
654 | 654 | |
655 | - echo '<div id="feedback_' . $name . '" style="width:100%">'; |
|
655 | + echo '<div id="feedback_'.$name.'" style="width:100%">'; |
|
656 | 656 | $comnt = trim(Event::get_comments($id, $questionId)); |
657 | 657 | if (empty($comnt)) { |
658 | 658 | echo '<br />'; |
659 | 659 | } else { |
660 | - echo '<div id="question_feedback">' . $comnt . '</div>'; |
|
660 | + echo '<div id="question_feedback">'.$comnt.'</div>'; |
|
661 | 661 | } |
662 | 662 | echo '</div>'; |
663 | 663 | |
664 | - echo '<div id="' . $name . '" style="display:none">'; |
|
664 | + echo '<div id="'.$name.'" style="display:none">'; |
|
665 | 665 | $arrid[] = $questionId; |
666 | - $feedback_form = new FormValidator('frmcomments' . $questionId, 'post', ''); |
|
666 | + $feedback_form = new FormValidator('frmcomments'.$questionId, 'post', ''); |
|
667 | 667 | $feedback_form->addElement('html', '<br>'); |
668 | - $renderer =& $feedback_form->defaultRenderer(); |
|
668 | + $renderer = & $feedback_form->defaultRenderer(); |
|
669 | 669 | $renderer->setFormTemplate('<form{attributes}><div align="left">{content}</div></form>'); |
670 | 670 | $renderer->setCustomElementTemplate('<div align="left">{element}</div>'); |
671 | 671 | $comnt = Event::get_comments($id, $questionId); |
672 | - $default = array('comments_' . $questionId => $comnt); |
|
672 | + $default = array('comments_'.$questionId => $comnt); |
|
673 | 673 | |
674 | 674 | if ($useAdvancedEditor) { |
675 | 675 | $feedback_form->addElement( |
676 | 676 | 'html_editor', |
677 | - 'comments_' . $questionId, |
|
677 | + 'comments_'.$questionId, |
|
678 | 678 | null, |
679 | 679 | null, |
680 | 680 | array( |
@@ -684,7 +684,7 @@ discard block |
||
684 | 684 | ) |
685 | 685 | ); |
686 | 686 | } else { |
687 | - $feedback_form->addElement('textarea', 'comments_' . $questionId); |
|
687 | + $feedback_form->addElement('textarea', 'comments_'.$questionId); |
|
688 | 688 | } |
689 | 689 | $feedback_form->addElement('html', '<br>'); |
690 | 690 | $feedback_form->setDefaults($default); |
@@ -695,21 +695,21 @@ discard block |
||
695 | 695 | $comnt = Event::get_comments($id, $questionId); |
696 | 696 | echo '<br />'; |
697 | 697 | if (!empty($comnt)) { |
698 | - echo '<b>' . get_lang('Feedback') . '</b>'; |
|
699 | - echo '<div id="question_feedback">' . $comnt . '</div>'; |
|
698 | + echo '<b>'.get_lang('Feedback').'</b>'; |
|
699 | + echo '<div id="question_feedback">'.$comnt.'</div>'; |
|
700 | 700 | } |
701 | 701 | } |
702 | 702 | |
703 | 703 | if ($is_allowedToEdit && $isFeedbackAllowed) { |
704 | 704 | if (in_array($answerType, array(FREE_ANSWER, ORAL_EXPRESSION))) { |
705 | - $marksname = "marksName" . $questionId; |
|
706 | - echo '<div id="' . $marksname . '" style="display:none">'; |
|
707 | - echo '<form name="marksform_' . $questionId . '" method="post" action="">'; |
|
705 | + $marksname = "marksName".$questionId; |
|
706 | + echo '<div id="'.$marksname.'" style="display:none">'; |
|
707 | + echo '<form name="marksform_'.$questionId.'" method="post" action="">'; |
|
708 | 708 | $arrmarks[] = $questionId; |
709 | 709 | echo get_lang("AssignMarks"); |
710 | 710 | echo " <select name='marks' id='marks'>"; |
711 | 711 | for ($i = 0; $i <= $questionWeighting; $i++) { |
712 | - echo '<option ' . (($i == $questionScore) ? "selected='selected'" : '') . '>' . $i . '</option>'; |
|
712 | + echo '<option '.(($i == $questionScore) ? "selected='selected'" : '').'>'.$i.'</option>'; |
|
713 | 713 | } |
714 | 714 | echo '</select>'; |
715 | 715 | echo '</form><br /></div>'; |
@@ -720,8 +720,8 @@ discard block |
||
720 | 720 | } |
721 | 721 | } else { |
722 | 722 | $arrmarks[] = $questionId; |
723 | - echo '<div id="' . $marksname . '" style="display:none"><form name="marksform_' . $questionId . '" method="post" action=""> |
|
724 | - <select name="marks" id="marks" style="display:none;"><option>' . $questionScore . '</option></select></form><br/ ></div>'; |
|
723 | + echo '<div id="'.$marksname.'" style="display:none"><form name="marksform_'.$questionId.'" method="post" action=""> |
|
724 | + <select name="marks" id="marks" style="display:none;"><option>' . $questionScore.'</option></select></form><br/ ></div>'; |
|
725 | 725 | } |
726 | 726 | } else { |
727 | 727 | if ($questionScore == -1) { |
@@ -777,7 +777,7 @@ discard block |
||
777 | 777 | |
778 | 778 | $score = array(); |
779 | 779 | if ($show_results) { |
780 | - $score['result'] = get_lang('Score') . " : " . ExerciseLib::show_score( |
|
780 | + $score['result'] = get_lang('Score')." : ".ExerciseLib::show_score( |
|
781 | 781 | $my_total_score, |
782 | 782 | $my_total_weight, |
783 | 783 | false, |
@@ -849,7 +849,7 @@ discard block |
||
849 | 849 | |
850 | 850 | if ($isFeedbackAllowed) { |
851 | 851 | if (in_array($origin, array('tracking_course', 'user_course', 'correct_exercise_in_lp'))) { |
852 | - $formUrl = api_get_path(WEB_CODE_PATH) . 'exercise/exercise_report.php?' . api_get_cidreq() . '&'; |
|
852 | + $formUrl = api_get_path(WEB_CODE_PATH).'exercise/exercise_report.php?'.api_get_cidreq().'&'; |
|
853 | 853 | $formUrl .= http_build_query([ |
854 | 854 | 'exerciseId' => $exercise_id, |
855 | 855 | 'filter' => 2, |
@@ -861,14 +861,14 @@ discard block |
||
861 | 861 | ]); |
862 | 862 | $formUrl .= $fromlink; |
863 | 863 | |
864 | - echo '<form name="myform" id="myform" action="' . $formUrl . '" method="post">'; |
|
865 | - echo '<input type = "hidden" name="lp_item_id" value="' . $learnpath_id . '">'; |
|
866 | - echo '<input type = "hidden" name="lp_item_view_id" value="' . $lp_item_view_id . '">'; |
|
867 | - echo '<input type = "hidden" name="student_id" value="' . $student_id . '">'; |
|
868 | - echo '<input type = "hidden" name="total_score" value="' . $totalScore . '"> '; |
|
869 | - echo '<input type = "hidden" name="my_exe_exo_id" value="' . $exercise_id . '"> '; |
|
864 | + echo '<form name="myform" id="myform" action="'.$formUrl.'" method="post">'; |
|
865 | + echo '<input type = "hidden" name="lp_item_id" value="'.$learnpath_id.'">'; |
|
866 | + echo '<input type = "hidden" name="lp_item_view_id" value="'.$lp_item_view_id.'">'; |
|
867 | + echo '<input type = "hidden" name="student_id" value="'.$student_id.'">'; |
|
868 | + echo '<input type = "hidden" name="total_score" value="'.$totalScore.'"> '; |
|
869 | + echo '<input type = "hidden" name="my_exe_exo_id" value="'.$exercise_id.'"> '; |
|
870 | 870 | } else { |
871 | - $formUrl = api_get_path(WEB_CODE_PATH) . 'exercise/exercise_report.php?' . api_get_cidreq() . '&'; |
|
871 | + $formUrl = api_get_path(WEB_CODE_PATH).'exercise/exercise_report.php?'.api_get_cidreq().'&'; |
|
872 | 872 | $formUrl .= http_build_query([ |
873 | 873 | 'exerciseId' => $exercise_id, |
874 | 874 | 'filter' => 1, |
@@ -876,11 +876,11 @@ discard block |
||
876 | 876 | 'exeid' => $id |
877 | 877 | ]); |
878 | 878 | |
879 | - echo ' <form name="myform" id="myform" action="' . $formUrl . '" method="post">'; |
|
879 | + echo ' <form name="myform" id="myform" action="'.$formUrl.'" method="post">'; |
|
880 | 880 | } |
881 | 881 | |
882 | 882 | if ($origin != 'learnpath' && $origin != 'student_progress') { |
883 | - echo '<label><input type= "checkbox" name="send_notification"> ' . get_lang('SendEmail') . '</label>'; |
|
883 | + echo '<label><input type= "checkbox" name="send_notification"> '.get_lang('SendEmail').'</label>'; |
|
884 | 884 | ?> |
885 | 885 | <br/> |
886 | 886 | <button type="submit" class="btn btn-primary" value="<?php echo get_lang('Ok'); ?>" |
@@ -913,7 +913,7 @@ discard block |
||
913 | 913 | } else { |
914 | 914 | if (!isset($_GET['fb_type'])) { |
915 | 915 | $lp_mode = $_SESSION['lp_mode']; |
916 | - $url = '../lp/lp_controller.php?' . api_get_cidreq() . '&'; |
|
916 | + $url = '../lp/lp_controller.php?'.api_get_cidreq().'&'; |
|
917 | 917 | $url .= http_build_url([ |
918 | 918 | 'action' => 'view', |
919 | 919 | 'lp_id' => $learnpath_id, |
@@ -921,13 +921,13 @@ discard block |
||
921 | 921 | 'exeId' => $exeId, |
922 | 922 | 'fb_type' => $feedback_type |
923 | 923 | ]); |
924 | - $href = ($lp_mode == 'fullscreen') ? ' window.opener.location.href="' . $url . '" ' : ' top.location.href="' . $url . '" '; |
|
925 | - echo '<script type="text/javascript">' . $href . '</script>'; |
|
924 | + $href = ($lp_mode == 'fullscreen') ? ' window.opener.location.href="'.$url.'" ' : ' top.location.href="'.$url.'" '; |
|
925 | + echo '<script type="text/javascript">'.$href.'</script>'; |
|
926 | 926 | // Record the results in the learning path, using the SCORM interface (API) |
927 | 927 | echo "<script>window.parent.API.void_save_asset('$totalScore', '$totalWeighting', 0, 'completed'); </script>"; |
928 | 928 | echo '</body></html>'; |
929 | 929 | } else { |
930 | - Display::display_normal_message(get_lang('ExerciseFinished') . ' ' . get_lang('ToContinueUseMenu')); |
|
930 | + Display::display_normal_message(get_lang('ExerciseFinished').' '.get_lang('ToContinueUseMenu')); |
|
931 | 931 | echo '<br />'; |
932 | 932 | } |
933 | 933 | } |