|
|
@ -545,7 +545,6 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools) |
|
|
|
$my_session_name = is_null($session_name) ? '' : ' ('.$session_name.')'; |
|
|
|
$my_session_name = is_null($session_name) ? '' : ' ('.$session_name.')'; |
|
|
|
|
|
|
|
|
|
|
|
if (!empty($_course) && !isset($_GET['hide_course_breadcrumb'])) { |
|
|
|
if (!empty($_course) && !isset($_GET['hide_course_breadcrumb'])) { |
|
|
|
|
|
|
|
|
|
|
|
$navigation_item['url'] = $web_course_path . $_course['path'].'/index.php'.(!empty($session_id) ? '?id_session='.$session_id : ''); |
|
|
|
$navigation_item['url'] = $web_course_path . $_course['path'].'/index.php'.(!empty($session_id) ? '?id_session='.$session_id : ''); |
|
|
|
$_course['name'] = api_htmlentities($_course['name']); |
|
|
|
$_course['name'] = api_htmlentities($_course['name']); |
|
|
|
$course_title = cut($_course['name'], MAX_LENGTH_BREADCRUMB); |
|
|
|
$course_title = cut($_course['name'], MAX_LENGTH_BREADCRUMB); |
|
|
@ -668,8 +667,13 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools) |
|
|
|
/* Part 4 . Show the teacher view/student view button at the right of the breadcrumb */ |
|
|
|
/* Part 4 . Show the teacher view/student view button at the right of the breadcrumb */ |
|
|
|
$view_as_student_link = null; |
|
|
|
$view_as_student_link = null; |
|
|
|
if ($user_id && isset($course_id)) { |
|
|
|
if ($user_id && isset($course_id)) { |
|
|
|
if ((api_is_course_admin() || api_is_platform_admin() || api_is_coach(null, null, false)) && |
|
|
|
if (( |
|
|
|
api_get_setting('student_view_enabled') === 'true' && api_get_course_info()) { |
|
|
|
api_is_course_admin() || |
|
|
|
|
|
|
|
api_is_platform_admin() || |
|
|
|
|
|
|
|
api_is_coach(null, null, false) |
|
|
|
|
|
|
|
) && |
|
|
|
|
|
|
|
api_get_setting('student_view_enabled') === 'true' && api_get_course_info() |
|
|
|
|
|
|
|
) { |
|
|
|
$view_as_student_link = api_display_tool_view_option(); |
|
|
|
$view_as_student_link = api_display_tool_view_option(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -715,7 +719,6 @@ function return_breadcrumb($interbreadcrumb, $language_file, $nameTools) |
|
|
|
if (!empty($lis)) { |
|
|
|
if (!empty($lis)) { |
|
|
|
$html .= Display::tag('ul', $lis, array('class'=>'breadcrumb')); |
|
|
|
$html .= Display::tag('ul', $lis, array('class'=>'breadcrumb')); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return $html; |
|
|
|
return $html; |
|
|
|
} |
|
|
|
} |
|
|
|