Error when viewing quizes

Error when viewing quizes

by Patrick Fitchie -
Number of replies: 7

Hello Everyone,

  Hope someone can help me with this problem.  If i'm in a course and add a quiz to the course, I can do everything with that quiz (i.e. add questions/change questions/update quiz...)  However once I return to the course page and then attempt to view the quiz I receive the following error.







Now this occurs when accessing the quiz using the following link on the course page:
https://webmail.brsd.ab.ca/moodle/mod/quiz/view.php?id=167
However if I attempt to access the quiz using the following link which I found in another forumn post it works:
https://webmail.brsd.ab.ca/moodle/mod/quiz/attempt.php?id=167

I am then presented with the password for the quiz,  from this page an can no get back to editing the quiz.  Before adding questions to the quiz everything works fine and after removing all the questions I can get to the edit quiz page.

I'm at a loss!

Thanks

Patrick

Average of ratings: -
In reply to Patrick Fitchie

Re: Error when viewing quizes

by Anthony Borrow -
Picture of Core developers Picture of Plugin developers Picture of Testers
Patrick - Which version of Moodle are you using? Also could you provide some background on your environment (OS, PHP version, Database and version, and webserver and version). Thanks - Anthony
In reply to Anthony Borrow

Re: Error when viewing quizes

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
This has been reported before, and I worked out the answer, but I have since forgotten what it is. You will have to search the forums.
In reply to Tim Hunt

Re: Error when viewing quizes

by Patrick Fitchie -

Hey Tim, 

  After searching through 40 pages of forum search results posted by you I found this one that sounds like the problem but the original posters fix is not the issue.

 I have ensured my cfg->wwwroot is correct (https://webmail.brsd.ab.ca/moodle) like other posts have suggested and still no fix.

 

http://moodle.org/mod/forum/discuss.php?d=57793

That is not actually a URL.

What's happening is that Moodle has started with the URL, and is doing some processing to work out what 'page type' this is.

The weird thing is it should have stripped off the
http://dmk.hopto.org/ part before it started, and got the answer mod-quiz-view.

That is, it is the call from mod/quiz/view.php to the function page_create_instance() in lib/pagelib.php that is returning the wrong answer. I think the actual bit that is wrong is the bit in the funtion page_id_and_class().

This means that it is not actually a quiz-specific problem, and I don't know how that bit of code is meant to work. I suggest you try asking again in a more general
forum, including the techinical information above.

In reply to Patrick Fitchie

Re: Error when viewing quizes

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 the post I was half-remembering. Your problem must be similar, but not exactly the same. As I said before, this is probably a problem with the blocks system, not the quiz specifically. Sorry, I can't think of anything else to try at the moment.
In reply to Anthony Borrow

Re: Error when viewing quizes

by Patrick Fitchie -

My Appologies,

  I am using the windows package of xamp & moodle 1.8.2+

Patrick