Merge pull request #1341 from jloguercio/1.11.x

Remove Student/Teacher view from places that is not in the course and it tools
pull/2487/head
José Loguercio 9 years ago committed by GitHub
commit aacf46e500
  1. 2
      main/inc/lib/banner.lib.php

@ -729,7 +729,7 @@ 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_get_setting('student_view_enabled') == 'true') { if ((api_is_course_admin() || api_is_platform_admin()) && 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();
} }
} }

Loading…
Cancel
Save