Bug #3347

Missing report on some questions after test is taken

Added by Marko Kastelic over 9 years ago. Updated about 8 years ago.

Bug resolved
Target version:
Start date:
Due date:
% Done:


Estimated time:
SCRUM pts - complexity:


test conditions:
single page mode / Show score to learner
first question in the questions list is of type unique answer with unknown or multiple answer with unknown or combination true,false,don't know

if learner does not provide (any)answer to the mentioned question(s), thus question(s) is/are omited from the report after test is taken, any provided answer on the question causes the question report shown right


missing_answers.PNG (103 KB) missing_answers.PNG relevant DB content Marko Kastelic, 05/05/2011 13:16



Updated by Marko Kastelic over 9 years ago

it is not limited on single page mode only.
report is not shown because there is no record in the 'track_e_attempt' if a learner does not select any answer. But the records from this table are used to select which question(s) will be shown on the report.

exercise_submit.php around line 297 controls recording attemps :

    // if the user has answered at least one question

    if (is_array($choice)) {

the easiest solution would be to set default answer to 'don't know' ....


Updated by Marko Kastelic over 9 years ago

or to change a query from the line 263 of the exercise_show.php to add report on the questions that are not answered ?
in this case, the query should be (i hope) as

$query = "SELECT quizz_rel_questions.question_id, answer from ".$TBL_EXERCICE_QUESTION." as quizz_rel_questions
inner join ".$TBL_TRACK_EXERCICES." as stats_exercices on quizz_rel_questions.exercice_id=stats_exercices.exe_exo_id
left outer join ".$TBL_TRACK_ATTEMPT." as attempts on stats_exercices.exe_id = attempts.exe_id and quizz_rel_questions.question_id = attempts.question_id
where stats_exercices.exe_id='".Database::escape_string($id)."' $user_restriction 
GROUP BY attempts.question_id
ORDER BY quizz_rel_questions.`question_order` ASC";


Updated by Julio Montoya over 9 years ago

  • Status changed from New to Needs more info

I can't reproduced the error. After the student finished the test, the teacher logs in and then I can see a new result in the result list page.

I create a test here:

login as an student with jbrion:jbrion
and admin/admin


Updated by Marko Kastelic over 9 years ago

i added a few new questions to the test on testing platform. Look's like everything is going o.k. Before you close this task, please give me a couple of hours; i will do some additional testing on my platform.

meanwhile consider about using corrected query, basicaly is the same as the original one, except that is the base for joining taken from test definition not from statistics; so if anything goes wrong while stats is written, you can still get report on all questions


Updated by Marko Kastelic over 9 years ago

here is the content of my DB tables:

red marked : all questions answered
green marked: first question left unanswered
look at the execution nr.61 : I just looked at the first question of the test in single q. per page mode and left the quiz (if this is qualified as an attempt, should be recorded as is, if not, this can be a problem)

test platform :
Apache/2.2.12 (Win32) DAV/2 mod_ssl/2.2.12 OpenSSL/0.9.8k mod_wsgi/3.3 Python/2.6.6 mod_autoindex_color PHP/5.3.0 mod_perl/2.0.4 Perl/v5.10.0
MySQL server/client version: 5.1.37
PHP extension: mysqli

install is 5 day old / i will do clean install and will try again


Updated by Marko Kastelic over 9 years ago

fresh new install with changeset 14710 : results are the same as shown at the earlier picture, sorry. Will try some detail tracking late this night.


Updated by Yannick Warnier over 8 years ago

  • Target version set to 1.9.2

Updated by Marko Kastelic about 8 years ago

  • Status changed from Needs more info to Feature implemented
  • Assignee set to Julio Montoya

i can't reproduce this one any more. Reports are ok, so does reviews after tests are taken. I'm closing this one.


Updated by Yannick Warnier about 8 years ago

  • Status changed from Feature implemented to Bug resolved
  • % Done changed from 0 to 100
Hi Marko, this is one of your first times closing a task, I think, so I'll update you on the internals. When closing, please follow these few simple rules:
  • if it was a bug, use "Resolved" instead of "Closed" (if it was a Feature, use "Closed")
  • mark the progress to "100%" unless you think this wasn't totally fixed but that it gave birth to anothe task and that this part can now be closed (or any other reason that might make you think the closure was not entirely satisfactory)
  • assign it to the person who you think has done the most work on this task. This is very subjective but will hopefully help us put in place a mechanism of merit in the (far away) future (when we will have nothing better to do)

Updated by Marko Kastelic about 8 years ago

ok. Thanks for clarification of resolved/closed.

Also available in: Atom PDF