Code Page appears when enrol button is clicked

Code Page appears when enrol button is clicked

by Richard Polk -
Number of replies: 4

We recently updated our site to MOODLE 3.2. Ever since, whenever a student clicks the "enroll me" button, a page of code appears for about 5 seconds before the student is taken to the course page. Is this a known issue? I am sorry I did not include a picture because I am not sure if posting any of the code would violate our company rules. Thank you in advance for any help. 

Average of ratings: -
In reply to Richard Polk

Re: Code Page appears when enrol button is clicked

by Jamie Biddulph -

It seems like you might have debugging enabled and an error on the page is causing a debug message to display to the users.

You can disable debug messages within Site administration > Development > Debugging and untick "Display debug messages".

In reply to Jamie Biddulph

Re: Code Page appears when enrol button is clicked

by Richard Polk -

Thanks for the information. I appreciate it. I will pass this on to the IT staff. 

In reply to Richard Polk

Re: Code Page appears when enrol button is clicked

by Ken Task -
Picture of Particularly helpful Moodlers

Maybe your IT staff did turn on debugging so they could investigate errors.

Before sharing back here, ask your IT if what is shown should be obscured.

Right now, you've not provided much information other than it's broke.

The 'code' you see ... does it look like (not exactly ... this is an example of debug output):

* line 93 of /cache/locallib.php: call to debugging()
* line 578 of /cache/locallib.php: call to cache_config_writer->config_save()
* line 505 of /cache/locallib.php: call to cache_config_writer->write_definitions_to_cache()
* line 603 of /cache/classes/helper.php: call to cache_config_writer::update_definitions()
* line 1810 of /lib/upgradelib.php: call to cache_helper::update_definitions()
* line 175 of /admin/cli/upgrade.php: call to upgrade_core()

That gives folks over here something to go on then! ;)

'spirit of sharing', Ken

In reply to Richard Polk

Re: Code Page appears when enrol button is clicked

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

You'll need to show us the code otherwise we can't help. Simple as that I'm afraid. 

Switching off debugging is not the answer if errors are being shown - that's just covering up a problem.

There is, however, one or two places where extra diagnostic information is displayed with debugging on but they are very rare. 

Anyway, nobody as ever said before - to my knowledge - that company rules prevent them showing diagnostic information.