Jump to ContentJump to Navigation/Login
` ` ` ` ` `

[Register]

Occasional ATutor release updates


(5 guests in past 15 min.)
Locations of visitors to this page

Support Forums

ATutor Bug Reports

bug in test statistics for open ended questions.


You must be signed-in to post.

AuthorSubject
  Page: 1
vegard

Avatar for vegard
Subject: bug in test statistics for open ended questions.Quote this post in your reply
Found a bug in the statistics page for tests (/tools/tests/results_all_quest.php), for open ended questions.

haven't nailed exactly what is wrong here, but have a look at these two screenshots:

skitch.com/vegardjo/bwr7h/helsekompetanse.no-statistikk-for-sporsmal

6 out of 11 left this empty, which means 5 people did not leave it empty (which is correct, confirmed at test -> submissions)

still, the statistics say there are no results.

then have a look at this screenshot:

skitch.com/vegardjo/bwr6y/helsekompetanse.no-statistikk-for-sporsmal

here it counts 4 results, but when you click it (/tools/tests/results_quest_long.php) you will see that there are infact 7 results, which is correct.

in short, the calculations for open ended questions in /tools/tests/results_all_quest.php is buggy. I have confirmed this for many tests, both anonymous and not. it seems it does not happen if there are *only* open ended questions, but it does happen if there is a mix.

have no idea why it finds some results some times, and no results other times..

here's a last screenshot from a different course:

skitch.com/vegardjo/bwr9r/helsekompetanse.no-statistikk-for-sporsmal
Posted: 2009-06-15 04:42:36
harris

Avatar for harris
Subject: Re: bug in test statistics for open ended questions.Quote this post in your reply
I have reproduced the second part. Hopefully these bugs are caused by the same problem. By the way ,thanks for the screenshots, they are very useful.
Posted: 2009-06-15 11:05:06
harris

Avatar for harris
Subject: Re: bug in test statistics for open ended questions.Quote this post in your reply
Fixed in the trunk.

Thanks.


The error lies in /themes/default/test_questions/long_stats.tmpl.php

Change line 14-15

[code]
<?php if ((count($this->answers)-$this->num_blanks) > 0): ?>
<a href="tools/tests/results_quest_long.php?tid=<?php echo intval($_GET['tid']).SEP; ?>qid=<?php echo $this->row['question_id'].SEP.'q='.urlencode($this->row['question']); ?>"><?php echo _AT('view_responses'); ?> (<?php echo (count($this->answers)-$this->num_blanks); ?>)</a>
[/code]

to:

[code]
<?php if ((count($this->answers) - (isset($this->answers[''])?1:0)) > 0): ?>
<a href="tools/tests/results_quest_long.php?tid=<?php echo intval($_GET['tid']).SEP; ?>qid=<?php echo $this->row['question_id'].SEP.'q='.urlencode($this->row['question']); ?>"><?php echo _AT('view_responses'); ?> (<?php echo (count($this->answers) - (isset($this->answers[''])?1:0)); ?>)</a>
[/code]
Posted: 2009-06-15 12:17:36
vegard

Avatar for vegard
Subject: Re: bug in test statistics for open ended questions.Quote this post in your reply
thanks Harris, that seemed to fix it! smile
Posted: 2009-06-16 04:37:37
 Page: 1

You must be signed-in to post.