Login Form

#195 – Trouble with stats page

Posted in ‘BF Quiz’
This is a public ticket. Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.
Friday, 11 April 2014 00:18 AEST
Joomla! version: 2.5.19
BF Quiz Plus: 1.2.10 (thanks)

First, thanks for your product. It serves us well in testing our students.

We have a quiz of 100 questions (100 questions in specific category). Students take the quiz from a menu set up as "Save as you go" to cut down on cheating (them printing the whole exam, logging off, finding the answers, logging back in and completing) and system problems (their ISP kicking them off part way through). Still have the occasional problems, but they can be worked around.

Except - I am having trouble with the stats page. When I click on it I am given a great report (nice job), but for only 20 questions. How do I get it to show all 100 questions. I use this report to zero in on bad questions (poorly worded or coded wrong).

Also - If I delete a quiz, it is still factored in for the stats. Can I change this? (i.e., false starts that have score of "0" are calculated into the average score even if I have removed them from the results.)

Monday, 14 April 2014 19:55 AEST 15'
BF Quiz Plus 3 Years
Hi Michael,
Sorry for the delay. Assuming you are talking about the backend stats view, you could add the following function to /administrator/components/com_bfquiz_plus/models/stats.php

public function getItems()
// Get a storage key.
$store = $this->getStoreId();

// Try to load the data from internal storage.
if (isset($this->cache[$store]))
return $this->cache[$store];

// Load the list items.
$query = $this->_getListQuery();

//$items = $this->_getList($query, $this->getStart(), $this->getState('list.limit'));
$items = $this->_getList($query, $this->getStart(), 100);
catch (RuntimeException $e)

return false;

// Add the items to the internal cache.
$this->cache[$store] = $items;

return $this->cache[$store];

The 100 above can be adjusted to suit the number of questions. Note that you may face timeout issues if you have too many questions on the stats page.

To only show published questions in the stats view, you can make a minor change to the getListQuery function.

$query->where('(a.state IN (0, 1))');

//change to
$query->where('(a.state IN (1))');

Let me know how you go.


Follow us on twitter http://twitter.com/tamlynsoftware
Sunday, 27 April 2014 00:44 AEST
Thanks. This worked.
This ticket is closed, therefore read-only. You can no longer reply to it. If you need to provide more information, please open a new ticket and mention this ticket's number.
Go to top