|
@@ -59,7 +59,7 @@ discard block |
|
|
block discarded – undo |
|
59
|
59
|
{ |
|
60
|
60
|
$exercise_list = array(); |
|
61
|
61
|
if (!empty($personal_course_list)) { |
|
62
|
|
- foreach($personal_course_list as $course_item) { |
|
|
62
|
+ foreach ($personal_course_list as $course_item) { |
|
63
|
63
|
$course_code = $course_item['c']; |
|
64
|
64
|
$session_id = $course_item['id_session']; |
|
65
|
65
|
|
|
@@ -68,10 +68,10 @@ discard block |
|
|
block discarded – undo |
|
68
|
68
|
$session_id |
|
69
|
69
|
); |
|
70
|
70
|
|
|
71
|
|
- foreach($exercises as $exercise_item) { |
|
72
|
|
- $exercise_item['course_code'] = $course_code; |
|
73
|
|
- $exercise_item['session_id'] = $session_id; |
|
74
|
|
- $exercise_item['tms'] = api_strtotime($exercise_item['end_time'], 'UTC'); |
|
|
71
|
+ foreach ($exercises as $exercise_item) { |
|
|
72
|
+ $exercise_item['course_code'] = $course_code; |
|
|
73
|
+ $exercise_item['session_id'] = $session_id; |
|
|
74
|
+ $exercise_item['tms'] = api_strtotime($exercise_item['end_time'], 'UTC'); |
|
75
|
75
|
|
|
76
|
76
|
$exercise_list[] = $exercise_item; |
|
77
|
77
|
} |
|
@@ -186,7 +186,7 @@ discard block |
|
|
block discarded – undo |
|
186
|
186
|
} |
|
187
|
187
|
} |
|
188
|
188
|
|
|
189
|
|
- if ($show_menu && ($show_create_link || $show_course_link )) { |
|
|
189
|
+ if ($show_menu && ($show_create_link || $show_course_link)) { |
|
190
|
190
|
$show_menu = true; |
|
191
|
191
|
} else { |
|
192
|
192
|
$show_menu = false; |
|
@@ -198,14 +198,14 @@ discard block |
|
|
block discarded – undo |
|
198
|
198
|
if ($show_menu) { |
|
199
|
199
|
$html .= '<ul class="nav nav-pills nav-stacked">'; |
|
200
|
200
|
if ($show_create_link) { |
|
201
|
|
- $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>'; |
|
|
201
|
+ $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>'; |
|
202
|
202
|
} |
|
203
|
203
|
|
|
204
|
204
|
if ($show_course_link) { |
|
205
|
205
|
if (!api_is_drh() && !api_is_session_admin()) { |
|
206
|
|
- $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>'; |
|
|
206
|
+ $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>'; |
|
207
|
207
|
} else { |
|
208
|
|
- $html .= '<li><a href="' . api_get_path(WEB_CODE_PATH) . 'dashboard/index.php">'.get_lang('Dashboard').'</a></li>'; |
|
|
208
|
+ $html .= '<li><a href="'.api_get_path(WEB_CODE_PATH).'dashboard/index.php">'.get_lang('Dashboard').'</a></li>'; |
|
209
|
209
|
} |
|
210
|
210
|
} |
|
211
|
211
|
$html .= '</ul>'; |
|
@@ -229,7 +229,7 @@ discard block |
|
|
block discarded – undo |
|
229
|
229
|
$html = ''; |
|
230
|
230
|
|
|
231
|
231
|
if (!empty($_GET['include']) && preg_match('/^[a-zA-Z0-9_-]*\.html$/', $_GET['include'])) { |
|
232
|
|
- $open = @(string)file_get_contents($this->home.$_GET['include']); |
|
|
232
|
+ $open = @(string) file_get_contents($this->home.$_GET['include']); |
|
233
|
233
|
$html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
|
234
|
234
|
} else { |
|
235
|
235
|
// Hiding home top when user not connected. |
|
@@ -259,15 +259,15 @@ discard block |
|
|
block discarded – undo |
|
259
|
259
|
$home_top_temp = file_get_contents($this->home.'home_top.html'); |
|
260
|
260
|
} else { |
|
261
|
261
|
if (file_exists($this->default_home.'home_top.html')) { |
|
262
|
|
- $home_top_temp = file_get_contents($this->default_home . 'home_top.html'); |
|
|
262
|
+ $home_top_temp = file_get_contents($this->default_home.'home_top.html'); |
|
263
|
263
|
} |
|
264
|
264
|
} |
|
265
|
265
|
} |
|
266
|
266
|
|
|
267
|
267
|
if (trim($home_top_temp) == '' && api_is_platform_admin()) { |
|
268
|
|
- $home_top_temp = '<div class="welcome-mascot">' . get_lang('PortalHomepageDefaultIntroduction') . '</div>'; |
|
|
268
|
+ $home_top_temp = '<div class="welcome-mascot">'.get_lang('PortalHomepageDefaultIntroduction').'</div>'; |
|
269
|
269
|
} else { |
|
270
|
|
- $home_top_temp = '<div class="welcome-home-top-temp">' . $home_top_temp . '</div>'; |
|
|
270
|
+ $home_top_temp = '<div class="welcome-home-top-temp">'.$home_top_temp.'</div>'; |
|
271
|
271
|
} |
|
272
|
272
|
$open = str_replace('{rel_path}', api_get_path(REL_PATH), $home_top_temp); |
|
273
|
273
|
$html = api_to_system_encoding($open, api_detect_encoding(strip_tags($open))); |
|
@@ -282,9 +282,9 @@ discard block |
|
|
block discarded – undo |
|
282
|
282
|
|
|
283
|
283
|
$html = ''; |
|
284
|
284
|
// Notice |
|
285
|
|
- $home_notice = @(string)file_get_contents($this->home.'home_notice_'.$user_selected_language.'.html'); |
|
|
285
|
+ $home_notice = @(string) file_get_contents($this->home.'home_notice_'.$user_selected_language.'.html'); |
|
286
|
286
|
if (empty($home_notice)) { |
|
287
|
|
- $home_notice = @(string)file_get_contents($this->home.'home_notice.html'); |
|
|
287
|
+ $home_notice = @(string) file_get_contents($this->home.'home_notice.html'); |
|
288
|
288
|
} |
|
289
|
289
|
|
|
290
|
290
|
if (!empty($home_notice)) { |
|
@@ -315,7 +315,7 @@ discard block |
|
|
block discarded – undo |
|
315
|
315
|
} |
|
316
|
316
|
|
|
317
|
317
|
$html = null; |
|
318
|
|
- $home_menu = @(string)file_get_contents($this->home.'home_menu_'.$user_selected_language.'.html'); |
|
|
318
|
+ $home_menu = @(string) file_get_contents($this->home.'home_menu_'.$user_selected_language.'.html'); |
|
319
|
319
|
if (!empty($home_menu)) { |
|
320
|
320
|
$home_menu_content = '<ul class="nav nav-pills nav-stacked">'; |
|
321
|
321
|
$home_menu_content .= api_to_system_encoding($home_menu, api_detect_encoding(strip_tags($home_menu))); |
|
@@ -345,9 +345,9 @@ discard block |
|
|
block discarded – undo |
|
345
|
345
|
if (!api_is_anonymous()) { |
|
346
|
346
|
$certificatesItem = Display::tag( |
|
347
|
347
|
'li', |
|
348
|
|
- Display::url(Display::return_icon('graduation.png',get_lang('MyCertificates'),null,ICON_SIZE_SMALL). |
|
|
348
|
+ Display::url(Display::return_icon('graduation.png', get_lang('MyCertificates'), null, ICON_SIZE_SMALL). |
|
349
|
349
|
get_lang('MyCertificates'), |
|
350
|
|
- api_get_path(WEB_CODE_PATH) . "gradebook/my_certificates.php" |
|
|
350
|
+ api_get_path(WEB_CODE_PATH)."gradebook/my_certificates.php" |
|
351
|
351
|
) |
|
352
|
352
|
); |
|
353
|
353
|
} |
|
@@ -357,29 +357,29 @@ discard block |
|
|
block discarded – undo |
|
357
|
357
|
if (api_get_setting('allow_public_certificates') == 'true') { |
|
358
|
358
|
$searchItem = Display::tag( |
|
359
|
359
|
'li', |
|
360
|
|
- Display::url(Display::return_icon('search_graduation.png',get_lang('Search'),null,ICON_SIZE_SMALL). |
|
|
360
|
+ Display::url(Display::return_icon('search_graduation.png', get_lang('Search'), null, ICON_SIZE_SMALL). |
|
361
|
361
|
get_lang('Search'), |
|
362
|
|
- api_get_path(WEB_CODE_PATH) . "gradebook/search.php" |
|
|
362
|
+ api_get_path(WEB_CODE_PATH)."gradebook/search.php" |
|
363
|
363
|
) |
|
364
|
364
|
); |
|
365
|
365
|
} |
|
366
|
366
|
|
|
367
|
367
|
if (empty($certificatesItem) && empty($searchItem)) { |
|
368
|
368
|
return null; |
|
369
|
|
- }else{ |
|
370
|
|
- $content.= $certificatesItem; |
|
371
|
|
- $content.= $searchItem; |
|
|
369
|
+ } else { |
|
|
370
|
+ $content .= $certificatesItem; |
|
|
371
|
+ $content .= $searchItem; |
|
372
|
372
|
} |
|
373
|
373
|
|
|
374
|
374
|
if (api_get_setting('allow_skills_tool') == 'true') { |
|
375
|
375
|
|
|
376
|
|
- $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')); |
|
|
376
|
+ $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')); |
|
377
|
377
|
$allowSkillsManagement = api_get_setting('allow_hr_skills_management') == 'true'; |
|
378
|
378
|
if (($allowSkillsManagement && api_is_drh()) || api_is_platform_admin()) { |
|
379
|
379
|
$content .= Display::tag('li', |
|
380
|
380
|
Display::url(Display::return_icon('edit-skill.png', get_lang('MySkills'), null, |
|
381
|
|
- ICON_SIZE_SMALL) . get_lang('ManageSkills'), |
|
382
|
|
- api_get_path(WEB_CODE_PATH) . 'admin/skills_wheel.php')); |
|
|
381
|
+ ICON_SIZE_SMALL).get_lang('ManageSkills'), |
|
|
382
|
+ api_get_path(WEB_CODE_PATH).'admin/skills_wheel.php')); |
|
383
|
383
|
} |
|
384
|
384
|
} |
|
385
|
385
|
$content .= '</ul>'; |
|
@@ -478,7 +478,7 @@ discard block |
|
|
block discarded – undo |
|
478
|
478
|
FROM $main_category_table t1 |
|
479
|
479
|
LEFT JOIN $main_category_table t2 ON t1.code=t2.parent_id |
|
480
|
480
|
LEFT JOIN $main_course_table t3 ON (t3.category_code = t1.code $platform_visible_courses) |
|
481
|
|
- WHERE t1.parent_id ". (empty ($category) ? "IS NULL" : "='$category'")." |
|
|
481
|
+ WHERE t1.parent_id ".(empty ($category) ? "IS NULL" : "='$category'")." |
|
482
|
482
|
GROUP BY t1.name,t1.code,t1.parent_id,t1.children_count ORDER BY t1.tree_pos, t1.name"; |
|
483
|
483
|
|
|
484
|
484
|
// Showing only the category of courses of the current access_url_id |
|
@@ -553,10 +553,10 @@ discard block |
|
|
block discarded – undo |
|
553
|
553
|
} |
|
554
|
554
|
$result .= $htmlTitre; |
|
555
|
555
|
if ($thereIsSubCat) { |
|
556
|
|
- $result .= $htmlListCat; |
|
|
556
|
+ $result .= $htmlListCat; |
|
557
|
557
|
} |
|
558
|
558
|
while ($categoryName = Database::fetch_array($resCats)) { |
|
559
|
|
- $result .= '<h3>' . $categoryName['name'] . "</h3>\n"; |
|
|
559
|
+ $result .= '<h3>'.$categoryName['name']."</h3>\n"; |
|
560
|
560
|
} |
|
561
|
561
|
$numrows = Database::num_rows($sql_result_courses); |
|
562
|
562
|
$courses_list_string = ''; |
|
@@ -654,12 +654,12 @@ discard block |
|
|
block discarded – undo |
|
654
|
654
|
if ($courses_shown > 0) { |
|
655
|
655
|
// Only display the list of courses and categories if there was more than |
|
656
|
656
|
// 0 courses visible to the world (we're in the anonymous list here). |
|
657
|
|
- $result .= $courses_list_string; |
|
|
657
|
+ $result .= $courses_list_string; |
|
658
|
658
|
} |
|
659
|
659
|
if ($category != '') { |
|
660
|
|
- $result .= '<p><a href="'.api_get_self().'"> ' . |
|
|
660
|
+ $result .= '<p><a href="'.api_get_self().'"> '. |
|
661
|
661
|
Display :: return_icon('back.png', get_lang('BackToHomePage')). |
|
662
|
|
- get_lang('BackToHomePage') . '</a></p>'; |
|
|
662
|
+ get_lang('BackToHomePage').'</a></p>'; |
|
663
|
663
|
} |
|
664
|
664
|
return $result; |
|
665
|
665
|
} |
|
@@ -736,14 +736,14 @@ discard block |
|
|
block discarded – undo |
|
736
|
736
|
) { |
|
737
|
737
|
if (!empty($idAccordion)) { |
|
738
|
738
|
$html = null; |
|
739
|
|
- $html .= '<div class="panel-group" id="'.$idAccordion.'" role="tablist" aria-multiselectable="true">' . PHP_EOL; |
|
740
|
|
- $html .= '<div class="panel panel-default" id="'.$id.'">' . PHP_EOL; |
|
741
|
|
- $html .= '<div class="panel-heading" role="tab"><h4 class="panel-title">' . PHP_EOL; |
|
742
|
|
- $html .= '<a role="button" data-toggle="collapse" data-parent="#'.$idAccordion.'" href="#'.$idCollapse.'" aria-expanded="true" aria-controls="'.$idCollapse.'">'.$title.'</a>' . PHP_EOL; |
|
743
|
|
- $html .= '</h4></div>' . PHP_EOL; |
|
744
|
|
- $html .= '<div id="'.$idCollapse.'" class="panel-collapse collapse in" role="tabpanel">' . PHP_EOL; |
|
745
|
|
- $html .= '<div class="panel-body">'.$content.'</div>' . PHP_EOL; |
|
746
|
|
- $html .= '</div></div></div>' . PHP_EOL; |
|
|
739
|
+ $html .= '<div class="panel-group" id="'.$idAccordion.'" role="tablist" aria-multiselectable="true">'.PHP_EOL; |
|
|
740
|
+ $html .= '<div class="panel panel-default" id="'.$id.'">'.PHP_EOL; |
|
|
741
|
+ $html .= '<div class="panel-heading" role="tab"><h4 class="panel-title">'.PHP_EOL; |
|
|
742
|
+ $html .= '<a role="button" data-toggle="collapse" data-parent="#'.$idAccordion.'" href="#'.$idCollapse.'" aria-expanded="true" aria-controls="'.$idCollapse.'">'.$title.'</a>'.PHP_EOL; |
|
|
743
|
+ $html .= '</h4></div>'.PHP_EOL; |
|
|
744
|
+ $html .= '<div id="'.$idCollapse.'" class="panel-collapse collapse in" role="tabpanel">'.PHP_EOL; |
|
|
745
|
+ $html .= '<div class="panel-body">'.$content.'</div>'.PHP_EOL; |
|
|
746
|
+ $html .= '</div></div></div>'.PHP_EOL; |
|
747
|
747
|
|
|
748
|
748
|
} else { |
|
749
|
749
|
if (!empty($id)) { |
|
@@ -752,9 +752,9 @@ discard block |
|
|
block discarded – undo |
|
752
|
752
|
$params['class'] = 'panel panel-default'; |
|
753
|
753
|
$html = null; |
|
754
|
754
|
if (!empty($title)) { |
|
755
|
|
- $html .= '<div class="panel-heading">'.$title.'</div>' . PHP_EOL; |
|
|
755
|
+ $html .= '<div class="panel-heading">'.$title.'</div>'.PHP_EOL; |
|
756
|
756
|
} |
|
757
|
|
- $html.= '<div class="panel-body">'.$content.'</div>' . PHP_EOL; |
|
|
757
|
+ $html .= '<div class="panel-body">'.$content.'</div>'.PHP_EOL; |
|
758
|
758
|
$html = Display::div($html, $params); |
|
759
|
759
|
} |
|
760
|
760
|
return $html; |
|
@@ -800,7 +800,7 @@ discard block |
|
|
block discarded – undo |
|
800
|
800
|
$usergroup_list = $usergroup->get_usergroup_by_user(api_get_user_id()); |
|
801
|
801
|
$classes = ''; |
|
802
|
802
|
if (!empty($usergroup_list)) { |
|
803
|
|
- foreach($usergroup_list as $group_id) { |
|
|
803
|
+ foreach ($usergroup_list as $group_id) { |
|
804
|
804
|
$data = $usergroup->get($group_id); |
|
805
|
805
|
$data['name'] = Display::url($data['name'], api_get_path(WEB_CODE_PATH).'user/classes.php?id='.$data['id']); |
|
806
|
806
|
$classes .= Display::tag('li', $data['name']); |
|
@@ -809,7 +809,7 @@ discard block |
|
|
block discarded – undo |
|
809
|
809
|
if (api_is_platform_admin()) { |
|
810
|
810
|
$classes .= Display::tag( |
|
811
|
811
|
'li', |
|
812
|
|
- Display::url(get_lang('AddClasses') ,api_get_path(WEB_CODE_PATH).'admin/usergroups.php?action=add') |
|
|
812
|
+ Display::url(get_lang('AddClasses'), api_get_path(WEB_CODE_PATH).'admin/usergroups.php?action=add') |
|
813
|
813
|
); |
|
814
|
814
|
} |
|
815
|
815
|
if (!empty($classes)) { |
|
@@ -831,11 +831,11 @@ discard block |
|
|
block discarded – undo |
|
831
|
831
|
$content = null; |
|
832
|
832
|
|
|
833
|
833
|
if (api_get_setting('allow_social_tool') == 'true') { |
|
834
|
|
- $content .= '<a style="text-align:center" href="' . api_get_path(WEB_PATH) . 'main/social/home.php"> |
|
835
|
|
- <img class="img-circle" src="' . $userPicture . '" ></a>'; |
|
|
834
|
+ $content .= '<a style="text-align:center" href="'.api_get_path(WEB_PATH).'main/social/home.php"> |
|
|
835
|
+ <img class="img-circle" src="' . $userPicture.'" ></a>'; |
|
836
|
836
|
} else { |
|
837
|
|
- $content .= '<a style="text-align:center" href="' . api_get_path(WEB_PATH) . 'main/auth/profile.php"> |
|
838
|
|
- <img class="img-circle" title="' . get_lang('EditProfile') . '" src="' . $userPicture. '" ></a>'; |
|
|
837
|
+ $content .= '<a style="text-align:center" href="'.api_get_path(WEB_PATH).'main/auth/profile.php"> |
|
|
838
|
+ <img class="img-circle" title="' . get_lang('EditProfile').'" src="'.$userPicture.'" ></a>'; |
|
839
|
839
|
} |
|
840
|
840
|
|
|
841
|
841
|
$html = self::show_right_block( |
|
@@ -887,12 +887,12 @@ discard block |
|
|
block discarded – undo |
|
887
|
887
|
if (api_get_setting('allow_social_tool') == 'true') { |
|
888
|
888
|
$link = '?f=social'; |
|
889
|
889
|
} |
|
890
|
|
- $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>'; |
|
891
|
|
- $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>'; |
|
|
890
|
+ $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>'; |
|
|
891
|
+ $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>'; |
|
892
|
892
|
|
|
893
|
893
|
if (api_get_setting('allow_social_tool') == 'true') { |
|
894
|
894
|
$total_invitations = Display::badge($total_invitations); |
|
895
|
|
- $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>'; |
|
|
895
|
+ $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>'; |
|
896
|
896
|
} |
|
897
|
897
|
|
|
898
|
898
|
if (isset($_configuration['allow_my_files_link_in_homepage']) && $_configuration['allow_my_files_link_in_homepage']) { |
|
@@ -908,7 +908,7 @@ discard block |
|
|
block discarded – undo |
|
908
|
908
|
|
|
909
|
909
|
$editProfileUrl = Display::getProfileEditionLink($user_id); |
|
910
|
910
|
|
|
911
|
|
- $profile_content .= '<li class="profile-social"><a href="' . $editProfileUrl . '">'.Display::return_icon('edit-profile.png',get_lang('EditProfile'),null,ICON_SIZE_SMALL).get_lang('EditProfile').'</a></li>'; |
|
|
911
|
+ $profile_content .= '<li class="profile-social"><a href="'.$editProfileUrl.'">'.Display::return_icon('edit-profile.png', get_lang('EditProfile'), null, ICON_SIZE_SMALL).get_lang('EditProfile').'</a></li>'; |
|
912
|
912
|
$profile_content .= '</ul>'; |
|
913
|
913
|
$html = self::show_right_block( |
|
914
|
914
|
get_lang('Profile'), |
|
@@ -983,17 +983,17 @@ discard block |
|
|
block discarded – undo |
|
983
|
983
|
if ($show_create_link) { |
|
984
|
984
|
$my_account_content .= '<li class="add-course"><a href="main/create_course/add_course.php">'; |
|
985
|
985
|
if (api_get_setting('course_validation') == 'true' && !api_is_platform_admin()) { |
|
986
|
|
- $my_account_content .= Display::return_icon('new-course.png',get_lang('CreateCourseRequest'),null,ICON_SIZE_SMALL); |
|
|
986
|
+ $my_account_content .= Display::return_icon('new-course.png', get_lang('CreateCourseRequest'), null, ICON_SIZE_SMALL); |
|
987
|
987
|
$my_account_content .= get_lang('CreateCourseRequest'); |
|
988
|
988
|
} else { |
|
989
|
|
- $my_account_content .= Display::return_icon('new-course.png',get_lang('CourseCreate'),null,ICON_SIZE_SMALL); |
|
|
989
|
+ $my_account_content .= Display::return_icon('new-course.png', get_lang('CourseCreate'), null, ICON_SIZE_SMALL); |
|
990
|
990
|
$my_account_content .= get_lang('CourseCreate'); |
|
991
|
991
|
} |
|
992
|
992
|
$my_account_content .= '</a></li>'; |
|
993
|
993
|
|
|
994
|
994
|
if (SessionManager::allowToManageSessions()) { |
|
995
|
995
|
$my_account_content .= '<li class="add-course"><a href="main/session/session_add.php">'; |
|
996
|
|
- $my_account_content .= Display::return_icon('session.png',get_lang('AddSession'),null,ICON_SIZE_SMALL); |
|
|
996
|
+ $my_account_content .= Display::return_icon('session.png', get_lang('AddSession'), null, ICON_SIZE_SMALL); |
|
997
|
997
|
$my_account_content .= get_lang('AddSession'); |
|
998
|
998
|
$my_account_content .= '</a></li>'; |
|
999
|
999
|
} |
|
@@ -1001,21 +1001,21 @@ discard block |
|
|
block discarded – undo |
|
1001
|
1001
|
|
|
1002
|
1002
|
//Sort courses |
|
1003
|
1003
|
$url = api_get_path(WEB_CODE_PATH).'auth/courses.php?action=sortmycourses'; |
|
1004
|
|
- $img_order= Display::return_icon('order-course.png',get_lang('SortMyCourses'),null,ICON_SIZE_SMALL); |
|
|
1004
|
+ $img_order = Display::return_icon('order-course.png', get_lang('SortMyCourses'), null, ICON_SIZE_SMALL); |
|
1005
|
1005
|
$my_account_content .= '<li class="order-course">'.Display::url($img_order.get_lang('SortMyCourses'), $url, array('class' => 'sort course')).'</li>'; |
|
1006
|
1006
|
|
|
1007
|
1007
|
// Session history |
|
1008
|
1008
|
if (isset($_GET['history']) && intval($_GET['history']) == 1) { |
|
1009
|
|
- $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>'; |
|
|
1009
|
+ $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>'; |
|
1010
|
1010
|
} else { |
|
1011
|
|
- $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>'; |
|
|
1011
|
+ $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>'; |
|
1012
|
1012
|
} |
|
1013
|
1013
|
|
|
1014
|
1014
|
// Course catalog |
|
1015
|
1015
|
|
|
1016
|
1016
|
if ($show_course_link) { |
|
1017
|
1017
|
if (!api_is_drh()) { |
|
1018
|
|
- $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>'; |
|
|
1018
|
+ $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>'; |
|
1019
|
1019
|
} else { |
|
1020
|
1020
|
$my_account_content .= '<li><a href="main/dashboard/index.php">'.get_lang('Dashboard').'</a></li>'; |
|
1021
|
1021
|
} |
|
@@ -1208,7 +1208,7 @@ discard block |
|
|
block discarded – undo |
|
1208
|
1208
|
|
|
1209
|
1209
|
$actions = null; |
|
1210
|
1210
|
if (api_is_platform_admin()) { |
|
1211
|
|
- $actions = api_get_path(WEB_CODE_PATH) .'session/resume_session.php?id_session='.$session_id; |
|
|
1211
|
+ $actions = api_get_path(WEB_CODE_PATH).'session/resume_session.php?id_session='.$session_id; |
|
1212
|
1212
|
} |
|
1213
|
1213
|
|
|
1214
|
1214
|
$coachId = $session_box['id_coach']; |
|
@@ -1219,12 +1219,12 @@ discard block |
|
|
block discarded – undo |
|
1219
|
1219
|
$params['title'] = $session_box['title']; |
|
1220
|
1220
|
//$params['subtitle'] = $extra_info; |
|
1221
|
1221
|
$params['id_coach'] = $coachId; |
|
1222
|
|
- $params['coach_url'] = api_get_path(WEB_AJAX_PATH) . 'user_manager.ajax.php?a=get_user_popup&user_id=' . $coachId; |
|
|
1222
|
+ $params['coach_url'] = api_get_path(WEB_AJAX_PATH).'user_manager.ajax.php?a=get_user_popup&user_id='.$coachId; |
|
1223
|
1223
|
$params['coach_name'] = !empty($session_box['coach']) ? $session_box['coach'] : null; |
|
1224
|
|
- $params['coach_avatar'] =UserManager::getUserPicture($coachId, USER_IMAGE_SIZE_SMALL); |
|
1225
|
|
- $params['date'] = $session_box['dates']; |
|
|
1224
|
+ $params['coach_avatar'] = UserManager::getUserPicture($coachId, USER_IMAGE_SIZE_SMALL); |
|
|
1225
|
+ $params['date'] = $session_box['dates']; |
|
1226
|
1226
|
$params['image'] = isset($imageField['value']) ? $imageField['value'] : null; |
|
1227
|
|
- $params['duration'] = isset($session_box['duration']) ? ' ' . $session_box['duration'] : null; |
|
|
1227
|
+ $params['duration'] = isset($session_box['duration']) ? ' '.$session_box['duration'] : null; |
|
1228
|
1228
|
$params['edit_actions'] = $actions; |
|
1229
|
1229
|
$params['show_description'] = $session_box['show_description']; |
|
1230
|
1230
|
$params['description'] = $session_box['description']; |
|
@@ -1332,7 +1332,7 @@ discard block |
|
|
block discarded – undo |
|
1332
|
1332
|
//$sessionParams['show_link_to_session'] = !api_is_drh() && $sessionTitleLink; |
|
1333
|
1333
|
$sessionParams['course_list_session_style'] = $coursesListSessionStyle; |
|
1334
|
1334
|
$sessionParams['title'] = $session_box['title']; |
|
1335
|
|
- $sessionParams['subtitle'] = (!empty($session_box['coach']) ? $session_box['coach'] . ' | ': '') . $session_box['dates']; |
|
|
1335
|
+ $sessionParams['subtitle'] = (!empty($session_box['coach']) ? $session_box['coach'].' | ' : '').$session_box['dates']; |
|
1336
|
1336
|
$sessionParams['show_actions'] = api_is_platform_admin(); |
|
1337
|
1337
|
$sessionParams['courses'] = $html_courses_session; |
|
1338
|
1338
|
$sessionParams['show_simple_session_info'] = false; |
|
@@ -1382,14 +1382,14 @@ discard block |
|
|
block discarded – undo |
|
1382
|
1382
|
!empty($session_category_start_date) && |
|
1383
|
1383
|
$session_category_start_date != '0000-00-00' |
|
1384
|
1384
|
) { |
|
1385
|
|
- $categoryParams['subtitle'] = get_lang('From') . ' ' . $session_category_start_date; |
|
|
1385
|
+ $categoryParams['subtitle'] = get_lang('From').' '.$session_category_start_date; |
|
1386
|
1386
|
} |
|
1387
|
1387
|
|
|
1388
|
1388
|
if ( |
|
1389
|
1389
|
!empty($session_category_end_date) && |
|
1390
|
1390
|
$session_category_end_date != '0000-00-00' |
|
1391
|
1391
|
) { |
|
1392
|
|
- $categoryParams['subtitle'] = get_lang('Until') . ' ' . $session_category_end_date; |
|
|
1392
|
+ $categoryParams['subtitle'] = get_lang('Until').' '.$session_category_end_date; |
|
1393
|
1393
|
} |
|
1394
|
1394
|
} |
|
1395
|
1395
|
|
|
@@ -1414,10 +1414,10 @@ discard block |
|
|
block discarded – undo |
|
1414
|
1414
|
|
|
1415
|
1415
|
$this->tpl->assign('all_courses', $allCoursesInSessions); |
|
1416
|
1416
|
$this->tpl->assign('session', $listSession); |
|
1417
|
|
- $this->tpl->assign('show_tutor', (api_get_setting('show_session_coach')==='true' ? true : false)); |
|
|
1417
|
+ $this->tpl->assign('show_tutor', (api_get_setting('show_session_coach') === 'true' ? true : false)); |
|
1418
|
1418
|
$this->tpl->assign('gamification_mode', $gamificationModeIsActive); |
|
1419
|
1419
|
|
|
1420
|
|
- if (api_get_configuration_value('view_grid_courses')){ |
|
|
1420
|
+ if (api_get_configuration_value('view_grid_courses')) { |
|
1421
|
1421
|
$sessions_with_no_category = $this->tpl->fetch( |
|
1422
|
1422
|
$this->tpl->get_template('/user_portal/grid_session.tpl') |
|
1423
|
1423
|
); |
|
@@ -1562,7 +1562,7 @@ discard block |
|
|
block discarded – undo |
|
1562
|
1562
|
} else { |
|
1563
|
1563
|
$htmlCategory .= '<div class="session-view-row" >'; |
|
1564
|
1564
|
} |
|
1565
|
|
- $coursesInfo = $listCourse['course']; |
|
|
1565
|
+ $coursesInfo = $listCourse['course']; |
|
1566
|
1566
|
|
|
1567
|
1567
|
$htmlCategory .= self::getHtmlForCourse( |
|
1568
|
1568
|
$coursesInfo, |
|
@@ -1579,7 +1579,7 @@ discard block |
|
|
block discarded – undo |
|
1579
|
1579
|
$listCategorySession['catSessionName'] |
|
1580
|
1580
|
); |
|
1581
|
1581
|
// list of session |
|
1582
|
|
- $htmlSession = ''; // start |
|
|
1582
|
+ $htmlSession = ''; // start |
|
1583
|
1583
|
foreach ($listCategorySession['sessionList'] as $k => $listSession) { |
|
1584
|
1584
|
// add session |
|
1585
|
1585
|
$htmlSession .= '<div class="session-view-row">'; |
|
@@ -1596,8 +1596,8 @@ discard block |
|
|
block discarded – undo |
|
1596
|
1596
|
$htmlSessionCategory .= $htmlSession; |
|
1597
|
1597
|
} |
|
1598
|
1598
|
$htmlSessionCategory .= '</div>'; // end session cat block |
|
1599
|
|
- $htmlCategory .= $htmlSessionCategory .'</div>' ; |
|
1600
|
|
- $htmlCategory .= ''; // end course block |
|
|
1599
|
+ $htmlCategory .= $htmlSessionCategory.'</div>'; |
|
|
1600
|
+ $htmlCategory .= ''; // end course block |
|
1601
|
1601
|
} |
|
1602
|
1602
|
$userCategoryHtml .= $htmlCategory; |
|
1603
|
1603
|
} |
|
@@ -1622,11 +1622,11 @@ discard block |
|
|
block discarded – undo |
|
1622
|
1622
|
} |
|
1623
|
1623
|
} |
|
1624
|
1624
|
$htmlCategory .= ''; |
|
1625
|
|
- $userCategoryHtml .= $htmlCategory; // end user cat block |
|
|
1625
|
+ $userCategoryHtml .= $htmlCategory; // end user cat block |
|
1626
|
1626
|
if ($userCategoryId != 0) { |
|
1627
|
1627
|
$userCategoryHtml .= '</div>'; |
|
1628
|
1628
|
} |
|
1629
|
|
- $html .= $userCategoryHtml; // |
|
|
1629
|
+ $html .= $userCategoryHtml; // |
|
1630
|
1630
|
} |
|
1631
|
1631
|
$html .= '</div>'; |
|
1632
|
1632
|
|
|
@@ -1767,11 +1767,11 @@ discard block |
|
|
block discarded – undo |
|
1767
|
1767
|
$html = ''; |
|
1768
|
1768
|
|
|
1769
|
1769
|
if ($categorySessionId == 0) { |
|
1770
|
|
- $class1 = 'session-view-lvl-2'; // session |
|
1771
|
|
- $class2 = 'session-view-lvl-4'; // got to course in session link |
|
|
1770
|
+ $class1 = 'session-view-lvl-2'; // session |
|
|
1771
|
+ $class2 = 'session-view-lvl-4'; // got to course in session link |
|
1772
|
1772
|
} else { |
|
1773
|
|
- $class1 = 'session-view-lvl-3'; // session |
|
1774
|
|
- $class2 = 'session-view-lvl-5'; // got to course in session link |
|
|
1773
|
+ $class1 = 'session-view-lvl-3'; // session |
|
|
1774
|
+ $class2 = 'session-view-lvl-5'; // got to course in session link |
|
1775
|
1775
|
} |
|
1776
|
1776
|
|
|
1777
|
1777
|
$icon = Display::return_icon( |
|
@@ -1799,7 +1799,7 @@ discard block |
|
|
block discarded – undo |
|
1799
|
1799
|
if ($listA['userCatTitle'] == $listB['userCatTitle']) { |
|
1800
|
1800
|
if ($listA['title'] == $listB['title']) { |
|
1801
|
1801
|
return 0; |
|
1802
|
|
- } else if($listA['title'] > $listB['title']) { |
|
|
1802
|
+ } else if ($listA['title'] > $listB['title']) { |
|
1803
|
1803
|
return 1; |
|
1804
|
1804
|
} else { |
|
1805
|
1805
|
return -1; |
|
@@ -1820,7 +1820,7 @@ discard block |
|
|
block discarded – undo |
|
1820
|
1820
|
{ |
|
1821
|
1821
|
if ($listA['title'] == $listB['title']) { |
|
1822
|
1822
|
return 0; |
|
1823
|
|
- } else if($listA['title'] > $listB['title']) { |
|
|
1823
|
+ } else if ($listA['title'] > $listB['title']) { |
|
1824
|
1824
|
return 1; |
|
1825
|
1825
|
} else { |
|
1826
|
1826
|
return -1; |