Exercises: fixing wrong counter probably due a bad merge?

skala
Julio Montoya 13 years ago
parent 5ba920e6ed
commit ba4b8224c3
  1. 2
      main/exercice/exercise_result.php
  2. 5
      main/exercice/exercise_show.php

@ -191,7 +191,6 @@ if ($objExercise->selectAttempts() > 0) {
if (api_is_allowed_to_session_edit()) {
$exeId = create_event_exercice($objExercise->selectId());
}
$counter=0;
$user_info = api_get_user_info(api_get_user_id());
if ($show_results || $show_only_score) {
@ -203,7 +202,6 @@ foreach ($questionList as $questionId) {
// destruction of the Question object
unset($objQuestionTmp);
$counter++;
// gets the student choice for this question
$choice = $exerciseResult[$questionId];

@ -254,7 +254,6 @@ if (!empty($track_exercise_info['data_tracking']) && !empty($track_exercise_info
}
// for each question
$counter=0;
$total_weighting = 0;
foreach ($questionList as $questionId) {
$objQuestionTmp = Question::read($questionId);
@ -263,7 +262,7 @@ foreach ($questionList as $questionId) {
$counter = 1;
foreach ($questionList as $questionId) {
$counter++;
$choice = $exerciseResult[$questionId];
// destruction of the Question object
unset($objQuestionTmp);
@ -278,7 +277,7 @@ foreach ($questionList as $questionId) {
if ($show_results) {
echo $objQuestionTmp->return_header($feedback_type, $counter);
}
}
$counter++;
if ($answerType == MULTIPLE_ANSWER || $answerType == MULTIPLE_ANSWER_TRUE_FALSE) {

Loading…
Cancel
Save