Moodle 3.3.1 - error inserting activity

Moodle 3.3.1 - error inserting activity

by Cláudia Sousa -
Number of replies: 4

Good morning


I installed moodle in my pc using wampserver and it has been working fine for a year now. I am creating several courses with several activities and I never had any problem. Today I was creating a new question in the questions bank, as I already did before and moodle started to be very slow. Now, when I try to edit or insert a question, and even when I try to insert a file in a certain course it doesn't work. It keeps thinking for a while and I can see that it says "waiting for localhost" but, after that, a blank page appears and I can't do anything else.

Yesterday I updated my them but I don't believe that the problem is because of that, since after I updated the theme, moodle was working fine. 

Today, I installed a program to edit pdf files and it seems that moodle started having problems after a while. I already uninstalled the program, but the problem in moodle still exists.


Could you please help me?


Thank you

Cláudia Sousa

Average of ratings: -
In reply to Cláudia Sousa

Re: Moodle 3.3.1 - error inserting activity

by Cláudia Sousa -

I am sending you an image of the error that I get


In reply to Cláudia Sousa

Re: Moodle 3.3.1 - error inserting activity

by Ken Task -
Picture of Particularly helpful Moodlers

Look at the very top of the debug output.   The 'fatal' line ... Maximum execution time of 120 seconds exceeded.

If that is the only issue, that setting is in the php.ini file of PHP.   Increase maximum time to execute to something larger than 120 seconds.

To find the php.ini that is being loaded, Site Admin -> Server -> PHP Info and you should see a row near the top that shows what php.ini file is being loaded.   Edit that one.

For changes to take affect, must restart web service.

'spirit of sharing', Ken


In reply to Ken Task

Re: Moodle 3.3.1 - error inserting activity

by Cláudia Sousa -

I really appreciate your help.  Unfortunately it didn't work. I just found out that this error only appears when I log in as administrator. If I log in as an user, it doesn't appear.


Could you please help me?


Thank you

In reply to Cláudia Sousa

Re: Moodle 3.3.1 - error inserting activity

by Ken Task -
Picture of Particularly helpful Moodlers

In re-reading things ... adding plugins/themes to an already struggling instance could compound things.   I generally take such things slowly.  Upgrading/installing something new usually doesn't fix a problem unless the problem is related.   One should not guess. ;)

So ... am not a Windows person .... this to say it might be a windows thing .... however, think I'd try:

manually removing any session files one finds in moodledata/sessions/

That will kick everyone out of the moodle ... so you might want to do that during 'non-prime-time'.   That's ok, they should be able to log back in again.

purging the cache manually.   In moodledata there is a cache directory and a localcache directory.   *manually* remove the contents of both of those.   If your moodle is semi-funcioning it should re-populate those caches as you login and do stuff.

Leave debugging on for a while to see what you might be getting ... login as admin still getting same error?

'spirit of sharing', Ken