read($exercise_id);
}
if (empty($objExercise)) {
api_not_allowed($show_headers);
}
// Only users can see their own results
if (!$is_allowedToEdit) {
if ($student_id != $current_user_id) {
api_not_allowed($show_headers);
}
}
$htmlHeadXtra[] = '';
$htmlHeadXtra[] = '';
$htmlHeadXtra[] = '';
if ($show_headers) {
$interbreadcrumb[] = [
'url' => 'exercise.php?'.api_get_cidreq(),
'name' => get_lang('Exercises'),
];
$interbreadcrumb[] = ['url' => '#', 'name' => get_lang('Result')];
$this_section = SECTION_COURSES;
Display::display_header();
} else {
$htmlHeadXtra[] = '';
Display::display_reduced_header();
}
$message = Session::read('attempt_remaining');
Session::erase('attempt_remaining');
ExerciseLib::displayQuestionListByAttempt(
$objExercise,
$id,
false,
$message
);
if ($show_headers) {
Display::display_footer();
} else {
Display::display_reduced_footer();
}