0) {
echo str_repeat(' ',0).'Entered exercise_result.php'."
\n";var_dump($_POST);
}
// general parameters passed via POST/GET
if ( empty ( $learnpath_id ) ) {
$learnpath_id = $_REQUEST['learnpath_id'];
}
if ( empty ( $learnpath_item_id ) ) {
$learnpath_item_id = $_REQUEST['learnpath_item_id'];
}
if ( empty ( $formSent ) ) {
$formSent= $_REQUEST['formSent'];
}
if ( empty ( $exerciseResult ) ) {
$exerciseResult = $_SESSION['exerciseResult'];
}
if ( empty ( $questionId ) ) {
$questionId = $_REQUEST['questionId'];
}
if ( empty ( $choice ) ) {
$choice = $_REQUEST['choice'];
}
if ( empty ( $questionNum ) ) {
$questionNum = $_REQUEST['questionNum'];
}
if ( empty ( $nbrQuestions ) ) {
$nbrQuestions = $_REQUEST['nbrQuestions'];
}
if ( empty ( $questionList ) ) {
$questionList = $_SESSION['questionList'];
}
if ( empty ( $objExercise ) ) {
$objExercise = $_SESSION['objExercise'];
}
if ( empty ( $exeId ) ) {
$exeId = $_REQUEST['id'];
}
if ( empty ( $action ) ) {
$action = $_GET['action'];
}
$is_allowedToEdit=api_is_allowed_to_edit() || $is_courseTutor;
$nameTools=get_lang('CorrectTest');
if (isset($_SESSION['gradebook'])){
$gradebook= $_SESSION['gradebook'];
}
if (!empty($gradebook) && $gradebook=='view') {
$interbreadcrumb[]= array (
'url' => '../gradebook/'.$_SESSION['gradebook_dest'],
'name' => get_lang('Gradebook')
);
}
if($origin=='user_course') {
$interbreadcrumb[] = array ("url" => "../user/user.php?cidReq=".Security::remove_XSS($_GET['course']), "name" => get_lang("Users"));
$interbreadcrumb[] = array("url" => "../mySpace/myStudents.php?student=".Security::remove_XSS($_GET['student'])."&course=".$_course['id']."&details=true&origin=".Security::remove_XSS($_GET['origin']) , "name" => get_lang("DetailsStudentInCourse"));
} else if($origin=='tracking_course') {
$interbreadcrumb[] = array ("url" => "../mySpace/index.php", "name" => get_lang('MySpace'));
$interbreadcrumb[] = array ("url" => "../mySpace/myStudents.php?student=".Security::remove_XSS($_GET['student']).'&details=true&origin='.$origin.'&course='.Security::remove_XSS($_GET['cidReq']), "name" => get_lang("DetailsStudentInCourse"));
} else if($origin=='student_progress') {
$interbreadcrumb[] = array ("url" => "../auth/my_progress.php?id_session".Security::remove_XSS($_GET['id_session'])."&course=".$_cid, "name" => get_lang('MyProgress'));
unset($_cid);
} else {
$interbreadcrumb[]=array("url" => "exercice.php?gradebook=$gradebook","name" => get_lang('Exercices'));
$this_section=SECTION_COURSES;
}
if ($origin != 'learnpath') {
Display::display_header($nameTools,"Exercise");
}
$emailId = $_REQUEST['email'];
$user_name = $_REQUEST['user'];
$test = $_REQUEST['test'];
$dt = $_REQUEST['dt'];
$marks = $_REQUEST['res'];
$id = $_REQUEST['id'];
?>
|
0 && isset($id)) {
$test=Database::result($result,0,0);
$exerciseTitle=api_parse_tex($test);
$exerciseDescription=Database::result($result,0,1);
// if the results_disabled of the Quiz is 1 when block the script
$result_disabled=Database::result($result,0,2);
if (!(api_is_platform_admin() || api_is_course_admin()) ) {
if ($result_disabled==1) {
//api_not_allowed();
$show_results = false;
//Display::display_warning_message(get_lang('CantViewResults'));
if ($origin!='learnpath') {
Display::display_warning_message(get_lang('ThankYouForPassingTheTest').' '.(get_lang('BackToExercisesList')).'', false); echo ' |
|
|
| '; if ($answerId==1) { display_unique_or_multiple_answer($answerType, $studentChoice, $answer, $answerComment, $answerCorrect,$id,$questionId,$answerId); } else { display_unique_or_multiple_answer($answerType, $studentChoice, $answer, $answerComment, $answerCorrect,$id,$questionId,""); } echo ' |
| '; if ($answerId==1) { display_unique_or_multiple_answer($answerType, $studentChoice, $answer, $answerComment, $answerCorrect,$id,$questionId,$answerId); } else { display_unique_or_multiple_answer($answerType, $studentChoice, $answer, $answerComment, $answerCorrect,$id,$questionId,""); } echo ' |
| '; display_fill_in_blanks_answer($answer,$id,$questionId); echo ' | '; $i++; } echo '
| '.display_free_answer($choice, $id, $questionId).' |
| '.get_lang("ElementList").' | '.get_lang("CorrespondsTo").' |
| '.$s_answer_label.' | '.$s_user_answer.' / '.$s_correct_answer.' | '; echo '
|
| |
| '. // | |