Should fix bug when student is a tutor in a course see #5542

skala
Julio Montoya 12 years ago
parent c32554fcf7
commit 2df9df4900
  1. 12
      main/mySpace/myStudents.php

@ -23,8 +23,12 @@ require_once api_get_path(SYS_CODE_PATH).'survey/survey.lib.php';
api_block_anonymous_users();
if (!api_is_allowed_to_create_course() && !api_is_session_admin() && !api_is_drh()) {
api_not_allowed(true);
if (!api_is_allowed_to_create_course() && !api_is_session_admin() && !api_is_drh()) {
// Check if the user is tutor of the course
$user_course_status = CourseManager::get_tutor_in_course_status(api_get_user_id(), api_get_course_id());
if ($user_course_status != 1) {
api_not_allowed(true);
}
}
$htmlHeadXtra[] = '<script>
@ -283,15 +287,13 @@ if (!empty($student_id)) {
api_not_allowed();
}
}
Display :: display_header($nameTools);
if (isset($message)) {
echo $message;
}
if (!empty($student_id)) {
// Actions bar

Loading…
Cancel
Save