In current 2.0 cvs quiz review not showing (blank page).

In current 2.0 cvs quiz review not showing (blank page).

by Christopher Molnar -
Number of replies: 7
Hello,

In the current 2.0 CVS tree I am having problems displaying quiz results as a student - specifically the "review quiz questions" page.

A student clicks on the quiz, then they click on their score a page comes up with the questions and their answers. In the current cvs (I updated less than 5 minutes ago) the quiz does not show, we get a blank page with the following in the logs:

72.248.186.205 - - [24/Mar/2008:16:14:22 -0400] "GET /mod/quiz/review.php?q=65&attempt=404 HTTP/1.1" 500 - "http://training.ourworldservices.com/mod/quiz/view.php?id=955" "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12"



If I go back a little over 2 weeks in time in the cvs (great to keep backups) I can get my quiz reviews to the students and everything works great. This problem only exists for those that are assigned roles of "student" it seems to work as it is supposed to as an instructor.

I am very willing to help track down this problem as it is driving me nuts. Please tell me what to look for and what to post. Also, I tried deleting the entire directory and re-downloading and nothing changed.

-Chris
Average of ratings: -
In reply to Christopher Molnar

Re: In current 2.0 cvs quiz review not showing (blank page).

by Pierre Pichet -
If I go in the history for quiz/view.php Tim has done a lot of work on this code the 2008/03/05 and 2008/03/07.
He wrote
"MDL-13806 - Refactor all the code that implements the rules for whether students can attempt the quiz now into some classes.

This is the bulk of the work. The rule classes implemented to replicate all the existing functionality are:

* num_attempts_access_rule
* open_close_date_access_rule
* inter_attempt_delay_access_rule
* ipaddress_access_rule
* password_access_rule
* time_limit_access_rule
* securewindow_access_rule

These, plus quiz_access_manager are all in mod/quiz/accessrules.php, and as a result mod/quiz/view.php and mod/quiz/attempt.php are greatly simplified.

Along the way, I:

* corrected a number of inconsistencies in how the rules were implemented in different places.
* tidied up the timer and secure mode JavaScript, so bye-bye jstimer.php and protect_js.php.
* written a lot of comments, which is the main reason why diffstat of this patch shows +600 lines.

Still to do:

* Work on review.php
* Write unit tests, which are now possible, thanks to the new structure of the code.

However, I wanted to get the bulk of the work checked in, now I have done it and tested it by hand."


He can more than me comment further your problem .

Pierre


In reply to Christopher Molnar

Re: In current 2.0 cvs quiz review not showing (blank page).

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 you get a blank page, it almost certainly means that PHP hit a fatal error, but your options are set not to display it. The 500 Internal server error in the logs probably confirms that, but does not provide any extra useful information.

Please can you go to Admin -> Server -> Debugging, and turn on display of error messages, then try the review page again, and tell us what error you are getting.

Subsequent to the CVS commit that Pierre talks about, there was another one on 7th March where I finished everything off. The review page is working in 2.0 dev for me - I just checked again.
In reply to Tim Hunt

Re: In current 2.0 cvs quiz review not showing (blank page).

by Christopher Molnar -
OK, I turned on debug and error messages.

The review window opens and this is what I get:

Fatal error: Call to undefined method quiz_access_manager::prevent_review() in /home/training/moodle/mod/quiz/review.php on line 55


On the prior screen I am also seeing a few error messages:


Notice: Undefined variable: windowoptions in /home/training/moodle/mod/quiz/accessrules.php on line 699

Notice: Undefined variable: windowoptions in /home/training/moodle/mod/quiz/accessrules.php on line 699

Notice: Undefined variable: windowoptions in /home/training/moodle/mod/quiz/accessrules.php on line 699

Thanks,
-Chris
In reply to Christopher Molnar

Re: In current 2.0 cvs quiz review not showing (blank page).

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Oops, yes. I did not test this carefully enough. I'm just fixing this now. Try a CVS update in about half an hour.
In reply to Tim Hunt

Re: In current 2.0 cvs quiz review not showing (blank page).

by Christopher Molnar -
Thank you. That worked perfectly!

-Chris
In reply to Christopher Molnar

Re: In current 2.0 cvs quiz review not showing (blank page).

by Ernesto Yannini -

Hi, i get the same error, i get a blank page after any quiz attempt, please tell me how do you fix it?

Thanks!

In reply to Ernesto Yannini

Re: In current 2.0 cvs quiz review not showing (blank page).

by Ernesto Yannini -

I turn on debuggin and i get this:

Fatal error: Call to undefined method quiz_attempt::g

et_attempt_state() in /home/imesfac/public_html/mod/quiz/review.php on line 43
Thanks!