Fixing exercise when there are any question added

skala
Julio Montoya 14 years ago
parent 47632eb5cc
commit b3ab2764f1
  1. 9
      main/exercice/exercise_submit.php

@ -218,7 +218,7 @@ if (!empty($exercise_stat_info['questions_to_check'])) {
$my_remind_list = array_filter($my_remind_list);
}
$params = 'exe_id'.$exe_id.'&exerciseId='.$exerciseId.'&origin='.$origin.'&learnpath_id='.$learnpath_id.'&learnpath_item_id='.$learnpath_item_id.'&learnpath_item_view_id='.$learnpath_item_view_id;
$params = 'exe_id='.$exe_id.'&exerciseId='.$exerciseId.'&origin='.$origin.'&learnpath_id='.$learnpath_id.'&learnpath_item_id='.$learnpath_item_id.'&learnpath_item_view_id='.$learnpath_item_view_id;
if ($debug) { error_log("5.1 params: -> $params"); };
if ($reminder == 2 && empty($my_remind_list)) {
@ -231,7 +231,6 @@ if ($reminder == 2 && empty($my_remind_list)) {
* If the expired time is major that zero(0) then the expired time is compute on this time. Disable for learning path
*/
if ($time_control) {
if ($debug) error_log('6.1. Time control is enabled');
if ($debug) {error_log('6.2. $current_expired_time_key '.$current_expired_time_key); };
@ -473,7 +472,7 @@ if (!$current_question || $_REQUEST['num']) {
$current_question++;
}
}
//var_dump($current_question , $question_count);
if ($question_count != 0) {
if (($objExercise->type == ALL_ON_ONE_PAGE || $current_question > $question_count)) {
if (api_is_allowed_to_session_edit()) {
// goes to the script that will show the result of the exercise
@ -518,7 +517,6 @@ if (($objExercise->type == ALL_ON_ONE_PAGE || $current_question > $question_coun
//if ($debug) { error_log('Updating track_e_exercises '.$update_query); }
Database::query($update_query);*/
}
//if ($debug) { error_log('Redirecting to exercise_show.php'); }
header('Location: exercise_reminder.php?'.$params);
exit;
//header("Location: exercise_submit.php?exerciseId=$exerciseId");
@ -529,6 +527,9 @@ if (($objExercise->type == ALL_ON_ONE_PAGE || $current_question > $question_coun
exit;
}
}
} else {
$error = get_lang('QuestionNotFound');
}
if (!empty ($_GET['gradebook']) && $_GET['gradebook'] == 'view') {
$_SESSION['gradebook'] = Security :: remove_XSS($_GET['gradebook']);

Loading…
Cancel
Save