Cannot View Quizzes

Cannot View Quizzes

by A Purdy -
Number of replies: 8

We have just finished installing Moodle 1.8 last week and am building  a course.. Moodle is workign over PHP5 and Apache 2.2 in a windows 2003 environment on its own server.  IN the course there are 15 students who were manually enrolled

I recently build a quiz in which I have 10 Questions that are all viewable in the "preview mode" of the test" BUT when I click on the test itself from the course's main page nothing appears but the white screen. No introduction page, no questions.

Any Ideas???

Thanks

Andrew

Average of ratings: -
In reply to A Purdy

Re: Cannot View Quizzes

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The 'white screen' effect is normally the result of an error occurring before anything is output, and if debugging is turned off (as it should be in a production environment) then you don't get anything at all.

To find out what the problem is, temporarily turn on debug mode by going to Admin -> Server -> Debugging, then try reloading the page that was blank. You should then get an error message, which may help you diagnose the problem, or at least give us more information.

When you have finished investigating, remember to turn debug mode off again.
In reply to Tim Hunt

Re: Cannot View Quizzes

by A Purdy -

well that is a very useful thing to know. Thanks..

Now for the problem..

Notice: Undefined index: http:moodle.pdsmodquizview in C:\AppServ\www\moodle\lib\pagelib.php on line 103

Notice: Undefined index: http:moodle.pdsmodquizview in C:\AppServ\www\moodle\lib\pagelib.php on line 104

Page class mapping for id "http:moodle.pdsmodquizview" exists but class "" is not defined



Notice: Undefined index: http:moodle.pdsmodquizview in C:\AppServ\www\moodle\lib\pagelib.php on line 107

Fatal error: Class name must be a valid object or a string in C:\AppServ\www\moodle\lib\pagelib.php on line 67

In reply to A Purdy

Re: Cannot View Quizzes

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Oh, that one. I remember that people have posted about it before in these forums, but I can't remember exactly what the solution is. I think iti is something to do with $CFG->wwwroot being set wrongly. Try searching these forums for keywords like page class undefined.
In reply to Tim Hunt

Re: Cannot View Quizzes

by A Purdy -
WOOOHOOO

Yep that did it..

http://moodle.org/mod/forum/search.php?id=5&search=%24CFG-%3Ewwwroot+

IT WAS MISSING THE WWWROOT VARIABLE AS LISTED BELOW.


Your config.php file must have this layout. There is one extra line moodle makes which can be deleted from the config.php file.
$CFG->dbtype = 'mysql'; // mysql or postgres7 (for now)
$CFG->dbhost = 'db123.yourdomain.net'; // eg localhost or db.isp.com
$CFG->dbname = 'db123456789'; // database name, eg moodle
$CFG->dbuser = 'dbo123456789'; // your database username
$CFG->dbpass = 'yourpassword'; // your database password
$CFG->prefix = 'mdl_'; // Prefix to use for all table names

Other variables must be defined as follows:

$CFG->wwwroot = 'http://www.yourdomain.com';
$CFG->dirroot = '/homepages/12/d123456789/htdocs/yourdirectory';
$CFG->dataroot = '/homepages/12/d123456789/htdocs/moodledata';

THANKS

ANDREW

In reply to Tim Hunt

Re: Cannot View Quizzes

by Richard Williamson -
I have a similar problem: when I try to create a quiz, I complete the first screen, click Save changes, and I just get a blank screen. Debugging info shows:
Warning: require_once(/var/www/html/moodle/mod/assignment/type/uploadreview/assignment.class.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/html/moodle/mod/assignment/lib.php on line 2327

On the course page, only the quiz icon is shown, no quiz title. Instead, the debugging info shows:
Notice: Undefined index: 9376 in /var/www/html/moodle/course/lib.php on line 1353

Notice: Trying to get property of non-object in /var/www/html/moodle/course/lib.php on line 1353

When I click on the quiz, I get a blank page with the following debugging info:
Trying to get property of non-object in /var/www/html/moodle/course/lib.php on line 1353

This appears to be a different problem to the one addressed, but provides similar symptoms.

System:
Moodle 1.8.2+ (2007021520)
PHP 5.2.2
Apache 2.2.4
MySQL 5.0.37

Any help much appreciated
Richard
In reply to Richard Williamson

Re: Cannot View Quizzes

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The thing that leaps out at me from this is 'mod/assignment'. Why is editing a quiz trying to call something in the assignment module? Editing activity settings is actually handled more by the course code than the indivifual modles, so the bug here may lie outside the quiz.
In reply to Tim Hunt

Re: Cannot View Quizzes

by Richard Williamson -
I've had no responses from the assignment forum. Is there anything else you can think of Tim?

Cheers
RW