Items Analysis Not Displaying Results

Items Analysis Not Displaying Results

by Andy Greaves -
Number of replies: 6

Can you help?

We are currently running Moodle 1.7.2 + (2006101020).

I have a multiple choice test of 75 questions attempted by approx 330 candidates.

I am attempting to review the answers via the Item Analysis functionality but everytime I click to view, I just get a blank screen with no returns.

I have several other tests of lesser size which work i.e. 50 ques & 300 delegates.

Any advice?

Thanks

Andy Greaves

Average of ratings: -
In reply to Andy Greaves

Re: Items Analysis Not Displaying Results

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
If smaller tests work and a bigger one fails, it is quite likely that the problem is that PHP is running out of memory. Can you check your server logs?
In reply to Tim Hunt

Re: Items Analysis Not Displaying Results

by Andrew Greaves -

Tim,

Thanks for the response. I have got my It chaps to look into the php file & they have responded with the following.

I have looked at how much memory allocated and double checked -

the default is 16M, it was set at 128M , which is a lot ! , it is now 256M which is 'a lot'

the moodle application has its own application pool now and the keep alive / marshalling on that is 60seconds

I have restarted the server but honestly believe it is not memory or the 30 now 60second limit ..

if it makes no difference suggest post a reply saying " 'memory_limit = 256M' (default is 16M) what next "

I have again tried to see if the item analysis will run but it just returns the blank screen, can you shed anymore light on this.

Thanks

Andy Greaves

In reply to Andrew Greaves

Re: Items Analysis Not Displaying Results

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Sorry, I'm baffled then. It would be worth turning on debug mode on your server to see if you then get an error message, instead of a completely blank screen.
In reply to Tim Hunt

Re: Items Analysis Not Displaying Results

by Andrew Greaves -
Tim, I have got my IT chap to look at carrying out a debug & he has come back with the following.
"We get the errors below on entry to the tab page , and no other errors reported - selecting excel or word download simple creates a byte stream of the correct form but there is never any data output , the period of 60secs passes until the webserver decides that nothing is happening and then kicks the process and consequently the file closed - result blank file no data -  I think it is all those invalid context parameters resulting in no top level objects to create the output data"
 
Error: Invalid context creation request for level "70", instance "".

Incorrect context parameter "" for has_capability(), object expected! This should be fixed in code.

Error: Invalid context creation request for level "70", instance "".

Incorrect context parameter "" for has_capability(), object expected! This should be fixed in code.

Error: Invalid context creation request for level "70", instance "".

Incorrect context parameter "" for has_capability(), object expected! This should be fixed in code.

Error: Invalid context creation request for level "70", instance "".

Incorrect context parameter "" for has_capability(), object expected! This should be fixed in code.

Error: Invalid context creation request for level "70", instance "".

Incorrect context parameter "" for has_capability(), object expected! This should be fixed in code.

Error: Invalid context creation request for level "70", instance "".

Incorrect context parameter "" for has_capability(), object expected! This should be fixed in code.

Error: Invalid context creation request for level "70", instance "".

Incorrect context parameter "" for has_capability(), object expected! This should be fixed in code.

Error: Invalid context creation request for level "70", instance "".

Incorrect context parameter "" for has_capability(), object expected! This should be fixed in code.

Error: Invalid context creation request for level "70", instance "".

Incorrect context parameter "" for has_capability(), object expected! This should be fixed in code.

Error: Invalid context creation request for level "70", instance "".

Incorrect context parameter "" for has_capability(), object expected! This should be fixed in code.

Error: Invalid context creation request for level "70", instance "".

Incorrect context parameter "" for has_capability(), object expected! This should be fixed in code.

Error: Invalid context creation request for level "70", instance "".

Incorrect context parameter "" for has_capability(), object expected! This should be fixed in code.

Error: Invalid context creation request for level "70", instance "".

Incorrect context parameter "" for has_capability(), object expected! This should be fixed in code.

Error: Invalid context creation request for level "70", instance "".

Incorrect context parameter "" for has_capability(), object expected! This should be fixed in code.
In reply to Andrew Greaves

Re: Items Analysis Not Displaying Results

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
That is really helpful. Sadly, not quite helpful enough. There is clearly a bogus call to get_context_instance somewhere, but I can't find where. (I found another bug in the quiz code while looking though!)

Annoyingly, in Moodle 1.8, I made some changes to the error display function to make it display more information about where the problem occurred. Would it be possible for you to make the same changes in your version (details in the attached text file) and then try again.

That would almost certainly provide enough information for me to fix the bug.
In reply to Tim Hunt

Re: Items Analysis Not Displaying Results

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Yep, there was a bug in the navmenulist method in lib/weblib.php. The bit that says
 //Only add visible or teacher mods to jumpmenu
 if ($mod->visible or has_capability('moodle/course:viewhiddenactivities', get_context_instance(CONTEXT_MODULE, $mod->id))) {
should say
 //Only add visible or teacher mods to jumpmenu
 if ($mod->visible or has_capability('moodle/course:viewhiddenactivities', get_context_instance(CONTEXT_MODULE, $mod->cm))) {
I have checked this fix into all branches it applies to.

How come no-one found this bug before?