Moodle quiz Attempt not loading

Moodle quiz Attempt not loading

by craig dsouza -
Number of replies: 13

Hey Guys this is the first time i am seeing such a issue

moodle 3.0 Stable version

A back ground of my course

I have a course which has the quiz in 6 different languages

Now the quiz has a 30 day retrying restriction

THe issue

So off all the courses the a single quiz called "Service & packing in Marathi " is having an issue when you re attempt the quiz . 

Note: I tried using admin user  for the quiz but got no error for the same

Only students users are getting the error 

I have attached the screen shot of the tab that has the error/issue


Really looking forward for your help!

Thanks inAdvance


Craig






Attachment Screen shot of the tab.jpg
Average of ratings: -
In reply to craig dsouza

Re: Moodle quiz Attempt not loading

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Turn debugging on and then see if you get an error message.  

In reply to Emma Richardson

Re: Moodle quiz Attempt not loading

by craig dsouza -
Hi Emma 


 Thanks for the Reply

I turend on debugger mode and found the below error on the blank screen

"Fatal error: Maximum execution time of 30 seconds exceeded in D:\XAMPP for moodle\htdocs\moodle\lib\dml\mysqli_native_moodle_database.php on line 1079

can you suggest what to do next


the below is from the php file near line 1079


public function update_record($table, $dataobject, $bulk=false) {

        $dataobject = (array)$dataobject;


        $columns = $this->get_columns($table);

        $cleaned = array();


        foreach ($dataobject as $field => $value) {

            if (!isset($columns[$field])) {

                continue;

            }

            $column = $columns[$field];

            $cleaned[$field] = $this->normalise_value($column, $value);

        }


        return $this->update_record_raw($table, $cleaned, $bulk);

    }

Attached complete php file

In reply to craig dsouza

Re: Moodle quiz Attempt not loading

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Be aware that XAMPP is designed for developers and so deliberately has just about all security features turned off. Do not use as a live/production site, though it is fine for development (I have used it a great deal myself)

With reference to the specific error you are getting that is a PHP message that can be addressed by one of the values in your php.ini files. Do a search on that to fix it, and for diagnosis, make sure you have a phpinfo.php file to check you are looking at the right php.ini file. Post again with your progress. 

In reply to Marcus Green

Re: Moodle quiz Attempt not loading

by craig dsouza -

Hi Marcus,

Unfortunately the issue is on the Production side and cannot be replicated in the development


I checked the php file and seen that the time out is showing 60  so i increased it to 600 but the error is still showing the same 

Fatal error: Maximum execution time of 30 seconds exceeded in D:\XAMPP for moodle\htdocs\moodle\lib\dml\mysqli_native_moodle_database.php on line 1079


any ideas how to fix it?

In reply to craig dsouza

Re: Moodle quiz Attempt not loading

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

That sounds like you are running your live site on XAMPP is that correct?

Are you sure that the php.ini you have changed is the one that is being used? You can confirm this through php.info which you can find at 

http://yourmoodle/admin/phpinfo.php

(where yourmoodle is the url for you moodle installation).

You may find additional information here

https://docs.moodle.org/31/en/Administration_FAQ#How_to_change_the_maximum_execution_time_for_file_uploads


In reply to Marcus Green

Re: Moodle quiz Attempt not loading

by craig dsouza -
Hi Marcus, You are absolutely right, i am running moodle in xampp in the live environment


but my issue is not with upload time out , it is with the quiz not loading when you click attempt for a user

Can you advice on the above


thanks for the continous replies


In reply to craig dsouza

Re: Moodle quiz Attempt not loading

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

I believe that the mention of upload is because that is a common issue with php timeout, it will effect anything that takes a long time to execute, and the quiz is a resource intensive Moodle component. What is the configuration of your machine (i.e. CPU and RAM). The reason I ask is that insufficient RAM may be causing tasks to take longer than expected. Having said that I normally increase the timeout to over a minute or more.

In reply to Marcus Green

Re: Moodle quiz Attempt not loading

by craig dsouza -

My Ram is 32 GB and processor is Intel(R) Xeon(R) CPU E5-2450 v2@ 2.50 GHZ

should i need more of it??

In reply to craig dsouza

Re: Moodle quiz Attempt not loading

by craig dsouza -
A screen shot of the tab in debugger mode
Attachment debbugger on.jpg
In reply to craig dsouza

Re: Moodle quiz Attempt not loading

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

That should be enough RAM, and I don't know that CPU but it sounds fast. Have you got a dump of your phpinfo output? (don't post that if it is a public facing website just copy the bits that reference php.ini and the value for max_execution_time which you will probably find in the section core)

In reply to craig dsouza

Re: Moodle quiz Attempt not loading

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Did you restart apache after applying the changes?  If the new timeout is not showing then you must have an .htaccess file or something overwriting it.

In reply to Emma Richardson

Re: Moodle quiz Attempt not loading

by craig dsouza -

HI Emma,


I had forgotten to restart the apache after making the changes, That was really silly of me!

Sorry to every one for causing so much trouble