|
@@ -72,9 +72,9 @@ discard block |
|
|
block discarded – undo |
|
72
|
72
|
); |
|
73
|
73
|
|
|
74
|
74
|
foreach ($exercises as $exercise_item) { |
|
75
|
|
- $exercise_item['course_code'] = $course_code; |
|
76
|
|
- $exercise_item['session_id'] = $session_id; |
|
77
|
|
- $exercise_item['tms'] = api_strtotime($exercise_item['end_time'], 'UTC'); |
|
|
75
|
+ $exercise_item['course_code'] = $course_code; |
|
|
76
|
+ $exercise_item['session_id'] = $session_id; |
|
|
77
|
+ $exercise_item['tms'] = api_strtotime($exercise_item['end_time'], 'UTC'); |
|
78
|
78
|
|
|
79
|
79
|
$exercise_list[] = $exercise_item; |
|
80
|
80
|
} |
|
@@ -198,7 +198,7 @@ discard block |
|
|
block discarded – undo |
|
198
|
198
|
$show_create_link = true; |
|
199
|
199
|
} |
|
200
|
200
|
|
|
201
|
|
- if ($show_menu && ($show_create_link || $show_course_link )) { |
|
|
201
|
+ if ($show_menu && ($show_create_link || $show_course_link)) { |
|
202
|
202
|
$show_menu = true; |
|
203
|
203
|
} else { |
|
204
|
204
|
$show_menu = false; |
|
@@ -210,14 +210,14 @@ discard block |
|
|
block discarded – undo |
|
210
|
210
|
if ($show_menu) { |
|
211
|
211
|
$html .= '<ul class="nav nav-pills nav-stacked">'; |
|
212
|
212
|
if ($show_create_link) { |
|
213
|
|
- $html .= '<li class="add-course"><a href="' . api_get_path(WEB_CODE_PATH) . 'create_course/add_course.php">'.Display::return_icon('new-course.png', get_lang('CourseCreate')).(api_get_setting('course_validation') == 'true' ? get_lang('CreateCourseRequest') : get_lang('CourseCreate')).'</a></li>'; |
|
|
213
|
+ $html .= '<li class="add-course"><a href="'.api_get_path(WEB_CODE_PATH).'create_course/add_course.php">'.Display::return_icon('new-course.png', get_lang('CourseCreate')).(api_get_setting('course_validation') == 'true' ? get_lang('CreateCourseRequest') : get_lang('CourseCreate')).'</a></li>'; |
|
214
|
214
|
} |
|
215
|
215
|
|
|
216
|
216
|
if ($show_course_link) { |
|
217
|
217
|
if (!api_is_drh() && !api_is_session_admin()) { |
|
218
|
|
- $html .= '<li class="list-course"><a href="'. api_get_path(WEB_CODE_PATH) . 'auth/courses.php">'. Display::return_icon('catalog-course.png', get_lang('CourseCatalog')) .get_lang('CourseCatalog').'</a></li>'; |
|
|
218
|
+ $html .= '<li class="list-course"><a href="'.api_get_path(WEB_CODE_PATH).'auth/courses.php">'.Display::return_icon('catalog-course.png', get_lang('CourseCatalog')).get_lang('CourseCatalog').'</a></li>'; |
|
219
|
219
|
} else { |
|
220
|
|
- $html .= '<li><a href="' . api_get_path(WEB_CODE_PATH) . 'dashboard/index.php">'.get_lang('Dashboard').'</a></li>'; |
|
|
220
|
+ $html .= '<li><a href="'.api_get_path(WEB_CODE_PATH).'dashboard/index.php">'.get_lang('Dashboard').'</a></li>'; |
|
221
|
221
|
} |
|
222
|
222
|
} |
|
223
|
223
|
$html .= '</ul>'; |
|
@@ -241,7 +241,7 @@ discard block |
|
|
block discarded – undo |
|
241
|
241
|
$html = ''; |
|
242
|
242
|
|
|
243
|
243
|
if (!empty($_GET['include']) && preg_match('/^[a-zA-Z0-9_-]*\.html$/', $_GET['include'])) { |
|
244
|
|
- $open = @(string)file_get_contents($this->home.$_GET['include']); |
|
|
244
|
+ $open = @(string) file_get_contents($this->home.$_GET['include']); |
|
245
|
245
|
$html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
|
246
|
246
|
} else { |
|
247
|
247
|
// Hiding home top when user not connected. |
|
@@ -271,15 +271,15 @@ discard block |
|
|
block discarded – undo |
|
271
|
271
|
$home_top_temp = file_get_contents($this->home.'home_top.html'); |
|
272
|
272
|
} else { |
|
273
|
273
|
if (file_exists($this->default_home.'home_top.html')) { |
|
274
|
|
- $home_top_temp = file_get_contents($this->default_home . 'home_top.html'); |
|
|
274
|
+ $home_top_temp = file_get_contents($this->default_home.'home_top.html'); |
|
275
|
275
|
} |
|
276
|
276
|
} |
|
277
|
277
|
} |
|
278
|
278
|
|
|
279
|
279
|
if (trim($home_top_temp) == '' && api_is_platform_admin()) { |
|
280
|
|
- $home_top_temp = '<div class="welcome-mascot">' . get_lang('PortalHomepageDefaultIntroduction') . '</div>'; |
|
|
280
|
+ $home_top_temp = '<div class="welcome-mascot">'.get_lang('PortalHomepageDefaultIntroduction').'</div>'; |
|
281
|
281
|
} else { |
|
282
|
|
- $home_top_temp = '<div class="welcome-home-top-temp">' . $home_top_temp . '</div>'; |
|
|
282
|
+ $home_top_temp = '<div class="welcome-home-top-temp">'.$home_top_temp.'</div>'; |
|
283
|
283
|
} |
|
284
|
284
|
$open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp); |
|
285
|
285
|
$html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
|
@@ -294,9 +294,9 @@ discard block |
|
|
block discarded – undo |
|
294
|
294
|
|
|
295
|
295
|
$html = ''; |
|
296
|
296
|
// Notice |
|
297
|
|
- $home_notice = @(string)file_get_contents($this->home.'home_notice_'.$user_selected_language.'.html'); |
|
|
297
|
+ $home_notice = @(string) file_get_contents($this->home.'home_notice_'.$user_selected_language.'.html'); |
|
298
|
298
|
if (empty($home_notice)) { |
|
299
|
|
- $home_notice = @(string)file_get_contents($this->home.'home_notice.html'); |
|
|
299
|
+ $home_notice = @(string) file_get_contents($this->home.'home_notice.html'); |
|
300
|
300
|
} |
|
301
|
301
|
|
|
302
|
302
|
if (!empty($home_notice)) { |
|
@@ -327,7 +327,7 @@ discard block |
|
|
block discarded – undo |
|
327
|
327
|
} |
|
328
|
328
|
|
|
329
|
329
|
$html = null; |
|
330
|
|
- $home_menu = @(string)file_get_contents($this->home.'home_menu_'.$user_selected_language.'.html'); |
|
|
330
|
+ $home_menu = @(string) file_get_contents($this->home.'home_menu_'.$user_selected_language.'.html'); |
|
331
|
331
|
if (!empty($home_menu)) { |
|
332
|
332
|
$home_menu_content = '<ul class="nav nav-pills nav-stacked">'; |
|
333
|
333
|
$home_menu_content .= api_to_system_encoding($home_menu, api_detect_encoding(strip_tags($home_menu))); |
|
@@ -360,9 +360,9 @@ discard block |
|
|
block discarded – undo |
|
360
|
360
|
if (!api_is_anonymous()) { |
|
361
|
361
|
$certificatesItem = Display::tag( |
|
362
|
362
|
'li', |
|
363
|
|
- Display::url(Display::return_icon('graduation.png',get_lang('MyCertificates'),null,ICON_SIZE_SMALL). |
|
|
363
|
+ Display::url(Display::return_icon('graduation.png', get_lang('MyCertificates'), null, ICON_SIZE_SMALL). |
|
364
|
364
|
get_lang('MyCertificates'), |
|
365
|
|
- api_get_path(WEB_CODE_PATH) . "gradebook/my_certificates.php" |
|
|
365
|
+ api_get_path(WEB_CODE_PATH)."gradebook/my_certificates.php" |
|
366
|
366
|
) |
|
367
|
367
|
); |
|
368
|
368
|
} |
|
@@ -372,29 +372,29 @@ discard block |
|
|
block discarded – undo |
|
372
|
372
|
if (api_get_setting('allow_public_certificates') == 'true') { |
|
373
|
373
|
$searchItem = Display::tag( |
|
374
|
374
|
'li', |
|
375
|
|
- Display::url(Display::return_icon('search_graduation.png',get_lang('Search'),null,ICON_SIZE_SMALL). |
|
|
375
|
+ Display::url(Display::return_icon('search_graduation.png', get_lang('Search'), null, ICON_SIZE_SMALL). |
|
376
|
376
|
get_lang('Search'), |
|
377
|
|
- api_get_path(WEB_CODE_PATH) . "gradebook/search.php" |
|
|
377
|
+ api_get_path(WEB_CODE_PATH)."gradebook/search.php" |
|
378
|
378
|
) |
|
379
|
379
|
); |
|
380
|
380
|
} |
|
381
|
381
|
|
|
382
|
382
|
if (empty($certificatesItem) && empty($searchItem)) { |
|
383
|
383
|
return null; |
|
384
|
|
- }else{ |
|
385
|
|
- $content.= $certificatesItem; |
|
386
|
|
- $content.= $searchItem; |
|
|
384
|
+ } else { |
|
|
385
|
+ $content .= $certificatesItem; |
|
|
386
|
+ $content .= $searchItem; |
|
387
|
387
|
} |
|
388
|
388
|
|
|
389
|
389
|
if (api_get_setting('allow_skills_tool') == 'true') { |
|
390
|
390
|
|
|
391
|
|
- $content .= Display::tag('li', Display::url(Display::return_icon('skill-badges.png',get_lang('MySkills'),null,ICON_SIZE_SMALL).get_lang('MySkills'), api_get_path(WEB_CODE_PATH).'social/my_skills_report.php')); |
|
|
391
|
+ $content .= Display::tag('li', Display::url(Display::return_icon('skill-badges.png', get_lang('MySkills'), null, ICON_SIZE_SMALL).get_lang('MySkills'), api_get_path(WEB_CODE_PATH).'social/my_skills_report.php')); |
|
392
|
392
|
$allowSkillsManagement = api_get_setting('allow_hr_skills_management') == 'true'; |
|
393
|
393
|
if (($allowSkillsManagement && api_is_drh()) || api_is_platform_admin()) { |
|
394
|
394
|
$content .= Display::tag('li', |
|
395
|
395
|
Display::url(Display::return_icon('edit-skill.png', get_lang('MySkills'), null, |
|
396
|
|
- ICON_SIZE_SMALL) . get_lang('ManageSkills'), |
|
397
|
|
- api_get_path(WEB_CODE_PATH) . 'admin/skills_wheel.php')); |
|
|
396
|
+ ICON_SIZE_SMALL).get_lang('ManageSkills'), |
|
|
397
|
+ api_get_path(WEB_CODE_PATH).'admin/skills_wheel.php')); |
|
398
|
398
|
} |
|
399
|
399
|
} |
|
400
|
400
|
$content .= '</ul>'; |
|
@@ -446,7 +446,7 @@ discard block |
|
|
block discarded – undo |
|
446
|
446
|
|
|
447
|
447
|
// Get list of courses in category $category. |
|
448
|
448
|
$sql_get_course_list = "SELECT * FROM $main_course_table cours |
|
449
|
|
- WHERE category_code = '" . $category . "' |
|
|
449
|
+ WHERE category_code = '".$category."' |
|
450
|
450
|
ORDER BY title, UPPER(visual_code)"; |
|
451
|
451
|
|
|
452
|
452
|
// Showing only the courses of the current access_url_id. |
|
@@ -493,7 +493,7 @@ discard block |
|
|
block discarded – undo |
|
493
|
493
|
FROM $main_category_table t1 |
|
494
|
494
|
LEFT JOIN $main_category_table t2 ON t1.code=t2.parent_id |
|
495
|
495
|
LEFT JOIN $main_course_table t3 ON (t3.category_code = t1.code $platform_visible_courses) |
|
496
|
|
- WHERE t1.parent_id ". (empty ($category) ? "IS NULL" : "='$category'")." |
|
|
496
|
+ WHERE t1.parent_id ".(empty ($category) ? "IS NULL" : "='$category'")." |
|
497
|
497
|
GROUP BY t1.name,t1.code,t1.parent_id,t1.children_count |
|
498
|
498
|
ORDER BY t1.tree_pos, t1.name"; |
|
499
|
499
|
|
|
@@ -569,10 +569,10 @@ discard block |
|
|
block discarded – undo |
|
569
|
569
|
} |
|
570
|
570
|
$result .= $htmlTitre; |
|
571
|
571
|
if ($thereIsSubCat) { |
|
572
|
|
- $result .= $htmlListCat; |
|
|
572
|
+ $result .= $htmlListCat; |
|
573
|
573
|
} |
|
574
|
574
|
while ($categoryName = Database::fetch_array($resCats)) { |
|
575
|
|
- $result .= '<h3>' . $categoryName['name'] . "</h3>\n"; |
|
|
575
|
+ $result .= '<h3>'.$categoryName['name']."</h3>\n"; |
|
576
|
576
|
} |
|
577
|
577
|
$numrows = Database::num_rows($sql_result_courses); |
|
578
|
578
|
$courses_list_string = ''; |
|
@@ -670,12 +670,12 @@ discard block |
|
|
block discarded – undo |
|
670
|
670
|
if ($courses_shown > 0) { |
|
671
|
671
|
// Only display the list of courses and categories if there was more than |
|
672
|
672
|
// 0 courses visible to the world (we're in the anonymous list here). |
|
673
|
|
- $result .= $courses_list_string; |
|
|
673
|
+ $result .= $courses_list_string; |
|
674
|
674
|
} |
|
675
|
675
|
if ($category != '') { |
|
676
|
|
- $result .= '<p><a href="'.api_get_self().'"> ' . |
|
|
676
|
+ $result .= '<p><a href="'.api_get_self().'"> '. |
|
677
|
677
|
Display :: return_icon('back.png', get_lang('BackToHomePage')). |
|
678
|
|
- get_lang('BackToHomePage') . '</a></p>'; |
|
|
678
|
+ get_lang('BackToHomePage').'</a></p>'; |
|
679
|
679
|
} |
|
680
|
680
|
return $result; |
|
681
|
681
|
} |
|
@@ -752,14 +752,14 @@ discard block |
|
|
block discarded – undo |
|
752
|
752
|
) { |
|
753
|
753
|
if (!empty($idAccordion)) { |
|
754
|
754
|
$html = null; |
|
755
|
|
- $html .= '<div class="panel-group" id="'.$idAccordion.'" role="tablist" aria-multiselectable="true">' . PHP_EOL; |
|
756
|
|
- $html .= '<div class="panel panel-default" id="'.$id.'">' . PHP_EOL; |
|
757
|
|
- $html .= '<div class="panel-heading" role="tab"><h4 class="panel-title">' . PHP_EOL; |
|
758
|
|
- $html .= '<a role="button" data-toggle="collapse" data-parent="#'.$idAccordion.'" href="#'.$idCollapse.'" aria-expanded="true" aria-controls="'.$idCollapse.'">'.$title.'</a>' . PHP_EOL; |
|
759
|
|
- $html .= '</h4></div>' . PHP_EOL; |
|
760
|
|
- $html .= '<div id="'.$idCollapse.'" class="panel-collapse collapse in" role="tabpanel">' . PHP_EOL; |
|
761
|
|
- $html .= '<div class="panel-body">'.$content.'</div>' . PHP_EOL; |
|
762
|
|
- $html .= '</div></div></div>' . PHP_EOL; |
|
|
755
|
+ $html .= '<div class="panel-group" id="'.$idAccordion.'" role="tablist" aria-multiselectable="true">'.PHP_EOL; |
|
|
756
|
+ $html .= '<div class="panel panel-default" id="'.$id.'">'.PHP_EOL; |
|
|
757
|
+ $html .= '<div class="panel-heading" role="tab"><h4 class="panel-title">'.PHP_EOL; |
|
|
758
|
+ $html .= '<a role="button" data-toggle="collapse" data-parent="#'.$idAccordion.'" href="#'.$idCollapse.'" aria-expanded="true" aria-controls="'.$idCollapse.'">'.$title.'</a>'.PHP_EOL; |
|
|
759
|
+ $html .= '</h4></div>'.PHP_EOL; |
|
|
760
|
+ $html .= '<div id="'.$idCollapse.'" class="panel-collapse collapse in" role="tabpanel">'.PHP_EOL; |
|
|
761
|
+ $html .= '<div class="panel-body">'.$content.'</div>'.PHP_EOL; |
|
|
762
|
+ $html .= '</div></div></div>'.PHP_EOL; |
|
763
|
763
|
|
|
764
|
764
|
} else { |
|
765
|
765
|
if (!empty($id)) { |
|
@@ -768,9 +768,9 @@ discard block |
|
|
block discarded – undo |
|
768
|
768
|
$params['class'] = 'panel panel-default'; |
|
769
|
769
|
$html = null; |
|
770
|
770
|
if (!empty($title)) { |
|
771
|
|
- $html .= '<div class="panel-heading">'.$title.'</div>' . PHP_EOL; |
|
|
771
|
+ $html .= '<div class="panel-heading">'.$title.'</div>'.PHP_EOL; |
|
772
|
772
|
} |
|
773
|
|
- $html.= '<div class="panel-body">'.$content.'</div>' . PHP_EOL; |
|
|
773
|
+ $html .= '<div class="panel-body">'.$content.'</div>'.PHP_EOL; |
|
774
|
774
|
$html = Display::div($html, $params); |
|
775
|
775
|
} |
|
776
|
776
|
return $html; |
|
@@ -816,7 +816,7 @@ discard block |
|
|
block discarded – undo |
|
816
|
816
|
$usergroup_list = $usergroup->get_usergroup_by_user(api_get_user_id()); |
|
817
|
817
|
$classes = ''; |
|
818
|
818
|
if (!empty($usergroup_list)) { |
|
819
|
|
- foreach($usergroup_list as $group_id) { |
|
|
819
|
+ foreach ($usergroup_list as $group_id) { |
|
820
|
820
|
$data = $usergroup->get($group_id); |
|
821
|
821
|
$data['name'] = Display::url($data['name'], api_get_path(WEB_CODE_PATH).'user/classes.php?id='.$data['id']); |
|
822
|
822
|
$classes .= Display::tag('li', $data['name']); |
|
@@ -825,7 +825,7 @@ discard block |
|
|
block discarded – undo |
|
825
|
825
|
if (api_is_platform_admin()) { |
|
826
|
826
|
$classes .= Display::tag( |
|
827
|
827
|
'li', |
|
828
|
|
- Display::url(get_lang('AddClasses') ,api_get_path(WEB_CODE_PATH).'admin/usergroups.php?action=add') |
|
|
828
|
+ Display::url(get_lang('AddClasses'), api_get_path(WEB_CODE_PATH).'admin/usergroups.php?action=add') |
|
829
|
829
|
); |
|
830
|
830
|
} |
|
831
|
831
|
if (!empty($classes)) { |
|
@@ -847,11 +847,11 @@ discard block |
|
|
block discarded – undo |
|
847
|
847
|
$content = null; |
|
848
|
848
|
|
|
849
|
849
|
if (api_get_setting('allow_social_tool') == 'true') { |
|
850
|
|
- $content .= '<a style="text-align:center" href="' . api_get_path(WEB_PATH) . 'main/social/home.php"> |
|
851
|
|
- <img class="img-circle" src="' . $userPicture . '" ></a>'; |
|
|
850
|
+ $content .= '<a style="text-align:center" href="'.api_get_path(WEB_PATH).'main/social/home.php"> |
|
|
851
|
+ <img class="img-circle" src="' . $userPicture.'" ></a>'; |
|
852
|
852
|
} else { |
|
853
|
|
- $content .= '<a style="text-align:center" href="' . api_get_path(WEB_PATH) . 'main/auth/profile.php"> |
|
854
|
|
- <img class="img-circle" title="' . get_lang('EditProfile') . '" src="' . $userPicture. '" ></a>'; |
|
|
853
|
+ $content .= '<a style="text-align:center" href="'.api_get_path(WEB_PATH).'main/auth/profile.php"> |
|
|
854
|
+ <img class="img-circle" title="' . get_lang('EditProfile').'" src="'.$userPicture.'" ></a>'; |
|
855
|
855
|
} |
|
856
|
856
|
|
|
857
|
857
|
$html = self::show_right_block( |
|
@@ -903,12 +903,12 @@ discard block |
|
|
block discarded – undo |
|
903
|
903
|
if (api_get_setting('allow_social_tool') == 'true') { |
|
904
|
904
|
$link = '?f=social'; |
|
905
|
905
|
} |
|
906
|
|
- $profile_content .= '<li class="inbox-message-social"><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php'.$link.'">'.Display::return_icon('inbox.png',get_lang('Inbox'),null,ICON_SIZE_SMALL).get_lang('Inbox').$cant_msg.' </a></li>'; |
|
907
|
|
- $profile_content .= '<li class="new-message-social"><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php'.$link.'">'.Display::return_icon('new-message.png',get_lang('Compose'),null,ICON_SIZE_SMALL).get_lang('Compose').' </a></li>'; |
|
|
906
|
+ $profile_content .= '<li class="inbox-message-social"><a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php'.$link.'">'.Display::return_icon('inbox.png', get_lang('Inbox'), null, ICON_SIZE_SMALL).get_lang('Inbox').$cant_msg.' </a></li>'; |
|
|
907
|
+ $profile_content .= '<li class="new-message-social"><a href="'.api_get_path(WEB_PATH).'main/messages/new_message.php'.$link.'">'.Display::return_icon('new-message.png', get_lang('Compose'), null, ICON_SIZE_SMALL).get_lang('Compose').' </a></li>'; |
|
908
|
908
|
|
|
909
|
909
|
if (api_get_setting('allow_social_tool') == 'true') { |
|
910
|
910
|
$total_invitations = Display::badge($total_invitations); |
|
911
|
|
- $profile_content .= '<li class="invitations-social"><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('invitations.png',get_lang('PendingInvitations'),null,ICON_SIZE_SMALL).get_lang('PendingInvitations').$total_invitations.'</a></li>'; |
|
|
911
|
+ $profile_content .= '<li class="invitations-social"><a href="'.api_get_path(WEB_PATH).'main/social/invitations.php">'.Display::return_icon('invitations.png', get_lang('PendingInvitations'), null, ICON_SIZE_SMALL).get_lang('PendingInvitations').$total_invitations.'</a></li>'; |
|
912
|
912
|
} |
|
913
|
913
|
|
|
914
|
914
|
if (isset($_configuration['allow_my_files_link_in_homepage']) && $_configuration['allow_my_files_link_in_homepage']) { |
|
@@ -924,7 +924,7 @@ discard block |
|
|
block discarded – undo |
|
924
|
924
|
|
|
925
|
925
|
$editProfileUrl = Display::getProfileEditionLink($user_id); |
|
926
|
926
|
|
|
927
|
|
- $profile_content .= '<li class="profile-social"><a href="' . $editProfileUrl . '">'. |
|
|
927
|
+ $profile_content .= '<li class="profile-social"><a href="'.$editProfileUrl.'">'. |
|
928
|
928
|
Display::return_icon( |
|
929
|
929
|
'edit-profile.png', |
|
930
|
930
|
get_lang('EditProfile'), |
|
@@ -1027,17 +1027,17 @@ discard block |
|
|
block discarded – undo |
|
1027
|
1027
|
if ($show_create_link) { |
|
1028
|
1028
|
$my_account_content .= '<li class="add-course"><a href="main/create_course/add_course.php">'; |
|
1029
|
1029
|
if (api_get_setting('course_validation') == 'true' && !api_is_platform_admin()) { |
|
1030
|
|
- $my_account_content .= Display::return_icon('new-course.png',get_lang('CreateCourseRequest'),null,ICON_SIZE_SMALL); |
|
|
1030
|
+ $my_account_content .= Display::return_icon('new-course.png', get_lang('CreateCourseRequest'), null, ICON_SIZE_SMALL); |
|
1031
|
1031
|
$my_account_content .= get_lang('CreateCourseRequest'); |
|
1032
|
1032
|
} else { |
|
1033
|
|
- $my_account_content .= Display::return_icon('new-course.png',get_lang('CourseCreate'),null,ICON_SIZE_SMALL); |
|
|
1033
|
+ $my_account_content .= Display::return_icon('new-course.png', get_lang('CourseCreate'), null, ICON_SIZE_SMALL); |
|
1034
|
1034
|
$my_account_content .= get_lang('CourseCreate'); |
|
1035
|
1035
|
} |
|
1036
|
1036
|
$my_account_content .= '</a></li>'; |
|
1037
|
1037
|
|
|
1038
|
1038
|
if (SessionManager::allowToManageSessions()) { |
|
1039
|
1039
|
$my_account_content .= '<li class="add-course"><a href="main/session/session_add.php">'; |
|
1040
|
|
- $my_account_content .= Display::return_icon('session.png',get_lang('AddSession'),null,ICON_SIZE_SMALL); |
|
|
1040
|
+ $my_account_content .= Display::return_icon('session.png', get_lang('AddSession'), null, ICON_SIZE_SMALL); |
|
1041
|
1041
|
$my_account_content .= get_lang('AddSession'); |
|
1042
|
1042
|
$my_account_content .= '</a></li>'; |
|
1043
|
1043
|
} |
|
@@ -1045,21 +1045,21 @@ discard block |
|
|
block discarded – undo |
|
1045
|
1045
|
|
|
1046
|
1046
|
//Sort courses |
|
1047
|
1047
|
$url = api_get_path(WEB_CODE_PATH).'auth/courses.php?action=sortmycourses'; |
|
1048
|
|
- $img_order= Display::return_icon('order-course.png',get_lang('SortMyCourses'),null,ICON_SIZE_SMALL); |
|
|
1048
|
+ $img_order = Display::return_icon('order-course.png', get_lang('SortMyCourses'), null, ICON_SIZE_SMALL); |
|
1049
|
1049
|
$my_account_content .= '<li class="order-course">'.Display::url($img_order.get_lang('SortMyCourses'), $url, array('class' => 'sort course')).'</li>'; |
|
1050
|
1050
|
|
|
1051
|
1051
|
// Session history |
|
1052
|
1052
|
if (isset($_GET['history']) && intval($_GET['history']) == 1) { |
|
1053
|
|
- $my_account_content .= '<li class="history-course"><a href="user_portal.php">'.Display::return_icon('history-course.png',get_lang('DisplayTrainingList'),null,ICON_SIZE_SMALL).get_lang('DisplayTrainingList').'</a></li>'; |
|
|
1053
|
+ $my_account_content .= '<li class="history-course"><a href="user_portal.php">'.Display::return_icon('history-course.png', get_lang('DisplayTrainingList'), null, ICON_SIZE_SMALL).get_lang('DisplayTrainingList').'</a></li>'; |
|
1054
|
1054
|
} else { |
|
1055
|
|
- $my_account_content .= '<li class="history-course"><a href="user_portal.php?history=1" >'.Display::return_icon('history-course.png',get_lang('HistoryTrainingSessions'),null,ICON_SIZE_SMALL).get_lang('HistoryTrainingSessions').'</a></li>'; |
|
|
1055
|
+ $my_account_content .= '<li class="history-course"><a href="user_portal.php?history=1" >'.Display::return_icon('history-course.png', get_lang('HistoryTrainingSessions'), null, ICON_SIZE_SMALL).get_lang('HistoryTrainingSessions').'</a></li>'; |
|
1056
|
1056
|
} |
|
1057
|
1057
|
|
|
1058
|
1058
|
// Course catalog |
|
1059
|
1059
|
|
|
1060
|
1060
|
if ($show_course_link) { |
|
1061
|
1061
|
if (!api_is_drh()) { |
|
1062
|
|
- $my_account_content .= '<li class="list-course"><a href="main/auth/courses.php" >'.Display::return_icon('catalog-course.png',get_lang('CourseCatalog'),null,ICON_SIZE_SMALL).get_lang('CourseCatalog').'</a></li>'; |
|
|
1062
|
+ $my_account_content .= '<li class="list-course"><a href="main/auth/courses.php" >'.Display::return_icon('catalog-course.png', get_lang('CourseCatalog'), null, ICON_SIZE_SMALL).get_lang('CourseCatalog').'</a></li>'; |
|
1063
|
1063
|
} else { |
|
1064
|
1064
|
$my_account_content .= '<li><a href="main/dashboard/index.php">'.get_lang('Dashboard').'</a></li>'; |
|
1065
|
1065
|
} |
|
@@ -1262,7 +1262,7 @@ discard block |
|
|
block discarded – undo |
|
1262
|
1262
|
|
|
1263
|
1263
|
$actions = null; |
|
1264
|
1264
|
if (api_is_platform_admin()) { |
|
1265
|
|
- $actions = api_get_path(WEB_CODE_PATH) .'session/resume_session.php?id_session='.$session_id; |
|
|
1265
|
+ $actions = api_get_path(WEB_CODE_PATH).'session/resume_session.php?id_session='.$session_id; |
|
1266
|
1266
|
} |
|
1267
|
1267
|
|
|
1268
|
1268
|
$coachId = $session_box['id_coach']; |
|
@@ -1273,12 +1273,12 @@ discard block |
|
|
block discarded – undo |
|
1273
|
1273
|
$params['title'] = $session_box['title']; |
|
1274
|
1274
|
//$params['subtitle'] = $extra_info; |
|
1275
|
1275
|
$params['id_coach'] = $coachId; |
|
1276
|
|
- $params['coach_url'] = api_get_path(WEB_AJAX_PATH) . 'user_manager.ajax.php?a=get_user_popup&user_id=' . $coachId; |
|
|
1276
|
+ $params['coach_url'] = api_get_path(WEB_AJAX_PATH).'user_manager.ajax.php?a=get_user_popup&user_id='.$coachId; |
|
1277
|
1277
|
$params['coach_name'] = !empty($session_box['coach']) ? $session_box['coach'] : null; |
|
1278
|
|
- $params['coach_avatar'] =UserManager::getUserPicture($coachId, USER_IMAGE_SIZE_SMALL); |
|
1279
|
|
- $params['date'] = $session_box['dates']; |
|
|
1278
|
+ $params['coach_avatar'] = UserManager::getUserPicture($coachId, USER_IMAGE_SIZE_SMALL); |
|
|
1279
|
+ $params['date'] = $session_box['dates']; |
|
1280
|
1280
|
$params['image'] = isset($imageField['value']) ? $imageField['value'] : null; |
|
1281
|
|
- $params['duration'] = isset($session_box['duration']) ? ' ' . $session_box['duration'] : null; |
|
|
1281
|
+ $params['duration'] = isset($session_box['duration']) ? ' '.$session_box['duration'] : null; |
|
1282
|
1282
|
$params['edit_actions'] = $actions; |
|
1283
|
1283
|
$params['show_description'] = $session_box['show_description']; |
|
1284
|
1284
|
$params['description'] = $session_box['description']; |
|
@@ -1379,7 +1379,7 @@ discard block |
|
|
block discarded – undo |
|
1379
|
1379
|
//$sessionParams['show_link_to_session'] = !api_is_drh() && $sessionTitleLink; |
|
1380
|
1380
|
$sessionParams[0]['course_list_session_style'] = $coursesListSessionStyle; |
|
1381
|
1381
|
$sessionParams[0]['title'] = $session_box['title']; |
|
1382
|
|
- $sessionParams[0]['subtitle'] = (!empty($session_box['coach']) ? $session_box['coach'] . ' | ': '') . $session_box['dates']; |
|
|
1382
|
+ $sessionParams[0]['subtitle'] = (!empty($session_box['coach']) ? $session_box['coach'].' | ' : '').$session_box['dates']; |
|
1383
|
1383
|
$sessionParams[0]['show_actions'] = api_is_platform_admin(); |
|
1384
|
1384
|
$sessionParams[0]['courses'] = $html_courses_session; |
|
1385
|
1385
|
$sessionParams[0]['show_simple_session_info'] = false; |
|
@@ -1426,13 +1426,13 @@ discard block |
|
|
block discarded – undo |
|
1426
|
1426
|
if ( |
|
1427
|
1427
|
!empty($session_category_start_date) |
|
1428
|
1428
|
) { |
|
1429
|
|
- $categoryParams['subtitle'] = get_lang('From') . ' ' . $session_category_start_date; |
|
|
1429
|
+ $categoryParams['subtitle'] = get_lang('From').' '.$session_category_start_date; |
|
1430
|
1430
|
} |
|
1431
|
1431
|
|
|
1432
|
1432
|
if ( |
|
1433
|
1433
|
!empty($session_category_end_date) |
|
1434
|
1434
|
) { |
|
1435
|
|
- $categoryParams['subtitle'] = get_lang('Until') . ' ' . $session_category_end_date; |
|
|
1435
|
+ $categoryParams['subtitle'] = get_lang('Until').' '.$session_category_end_date; |
|
1436
|
1436
|
} |
|
1437
|
1437
|
} |
|
1438
|
1438
|
|
|
@@ -1457,7 +1457,7 @@ discard block |
|
|
block discarded – undo |
|
1457
|
1457
|
|
|
1458
|
1458
|
$this->tpl->assign('all_courses', $allCoursesInSessions); |
|
1459
|
1459
|
$this->tpl->assign('session', $listSession); |
|
1460
|
|
- $this->tpl->assign('show_tutor', (api_get_setting('show_session_coach')==='true' ? true : false)); |
|
|
1460
|
+ $this->tpl->assign('show_tutor', (api_get_setting('show_session_coach') === 'true' ? true : false)); |
|
1461
|
1461
|
$this->tpl->assign('gamification_mode', $gamificationModeIsActive); |
|
1462
|
1462
|
|
|
1463
|
1463
|
if (api_get_configuration_value('view_grid_courses')) { |
|
@@ -1472,7 +1472,7 @@ discard block |
|
|
block discarded – undo |
|
1472
|
1472
|
} |
|
1473
|
1473
|
|
|
1474
|
1474
|
return [ |
|
1475
|
|
- 'html' => $specialCourseList . $sessions_with_category.$sessions_with_no_category.$listCourse, |
|
|
1475
|
+ 'html' => $specialCourseList.$sessions_with_category.$sessions_with_no_category.$listCourse, |
|
1476
|
1476
|
'session_count' => $sessionCount, |
|
1477
|
1477
|
'course_count' => $courseCount |
|
1478
|
1478
|
]; |
|
@@ -1619,7 +1619,7 @@ discard block |
|
|
block discarded – undo |
|
1619
|
1619
|
$htmlCategory .= '<div class="panel panel-default">'; |
|
1620
|
1620
|
} |
|
1621
|
1621
|
$htmlCategory .= '<div class="panel-body">'; |
|
1622
|
|
- $coursesInfo = $listCourse['course']; |
|
|
1622
|
+ $coursesInfo = $listCourse['course']; |
|
1623
|
1623
|
|
|
1624
|
1624
|
$htmlCategory .= self::getHtmlForCourse( |
|
1625
|
1625
|
$coursesInfo, |
|
@@ -1636,7 +1636,7 @@ discard block |
|
|
block discarded – undo |
|
1636
|
1636
|
$listCategorySession['catSessionName'] |
|
1637
|
1637
|
); |
|
1638
|
1638
|
// list of session |
|
1639
|
|
- $htmlSession = ''; // start |
|
|
1639
|
+ $htmlSession = ''; // start |
|
1640
|
1640
|
foreach ($listCategorySession['sessionList'] as $k => $listSession) { |
|
1641
|
1641
|
// add session |
|
1642
|
1642
|
$htmlSession .= '<div class="session-view-row">'; |
|
@@ -1653,8 +1653,8 @@ discard block |
|
|
block discarded – undo |
|
1653
|
1653
|
$htmlSessionCategory .= $htmlSession; |
|
1654
|
1654
|
} |
|
1655
|
1655
|
$htmlSessionCategory .= '</div>'; // end session cat block |
|
1656
|
|
- $htmlCategory .= $htmlSessionCategory .'</div></div>' ; |
|
1657
|
|
- $htmlCategory .= ''; // end course block |
|
|
1656
|
+ $htmlCategory .= $htmlSessionCategory.'</div></div>'; |
|
|
1657
|
+ $htmlCategory .= ''; // end course block |
|
1658
|
1658
|
} |
|
1659
|
1659
|
$userCategoryHtml .= $htmlCategory; |
|
1660
|
1660
|
} |
|
@@ -1681,11 +1681,11 @@ discard block |
|
|
block discarded – undo |
|
1681
|
1681
|
} |
|
1682
|
1682
|
} |
|
1683
|
1683
|
$htmlCategory .= ''; |
|
1684
|
|
- $userCategoryHtml .= $htmlCategory; // end user cat block |
|
|
1684
|
+ $userCategoryHtml .= $htmlCategory; // end user cat block |
|
1685
|
1685
|
if ($userCategoryId != 0) { |
|
1686
|
1686
|
$userCategoryHtml .= '</div>'; |
|
1687
|
1687
|
} |
|
1688
|
|
- $html .= $userCategoryHtml; // |
|
|
1688
|
+ $html .= $userCategoryHtml; // |
|
1689
|
1689
|
} |
|
1690
|
1690
|
$html .= '</div>'; |
|
1691
|
1691
|
|
|
@@ -1826,11 +1826,11 @@ discard block |
|
|
block discarded – undo |
|
1826
|
1826
|
$html = ''; |
|
1827
|
1827
|
|
|
1828
|
1828
|
if ($categorySessionId == 0) { |
|
1829
|
|
- $class1 = 'session-view-lvl-2'; // session |
|
1830
|
|
- $class2 = 'session-view-lvl-4'; // got to course in session link |
|
|
1829
|
+ $class1 = 'session-view-lvl-2'; // session |
|
|
1830
|
+ $class2 = 'session-view-lvl-4'; // got to course in session link |
|
1831
|
1831
|
} else { |
|
1832
|
|
- $class1 = 'session-view-lvl-3'; // session |
|
1833
|
|
- $class2 = 'session-view-lvl-5'; // got to course in session link |
|
|
1832
|
+ $class1 = 'session-view-lvl-3'; // session |
|
|
1833
|
+ $class2 = 'session-view-lvl-5'; // got to course in session link |
|
1834
|
1834
|
} |
|
1835
|
1835
|
|
|
1836
|
1836
|
$icon = Display::return_icon( |
|
@@ -1858,7 +1858,7 @@ discard block |
|
|
block discarded – undo |
|
1858
|
1858
|
if ($listA['userCatTitle'] == $listB['userCatTitle']) { |
|
1859
|
1859
|
if ($listA['title'] == $listB['title']) { |
|
1860
|
1860
|
return 0; |
|
1861
|
|
- } else if($listA['title'] > $listB['title']) { |
|
|
1861
|
+ } else if ($listA['title'] > $listB['title']) { |
|
1862
|
1862
|
return 1; |
|
1863
|
1863
|
} else { |
|
1864
|
1864
|
return -1; |
|
@@ -1879,7 +1879,7 @@ discard block |
|
|
block discarded – undo |
|
1879
|
1879
|
{ |
|
1880
|
1880
|
if ($listA['title'] == $listB['title']) { |
|
1881
|
1881
|
return 0; |
|
1882
|
|
- } else if($listA['title'] > $listB['title']) { |
|
|
1882
|
+ } else if ($listA['title'] > $listB['title']) { |
|
1883
|
1883
|
return 1; |
|
1884
|
1884
|
} else { |
|
1885
|
1885
|
return -1; |