Moodle Login button does not work after add line at Additional HTML

Moodle Login button does not work after add line at Additional HTML

by T K -
Number of replies: 7

Moodle 3.4

i was setting up some js script path on the Moodle additional HTML as below.



And then i logged out and tried to login again, i cant LOGIN!!!
The login page looks fine, but when i click login nothing happens! I can click forgot password/login as guest, but the login button just wont work.

Anyone can help?

Average of ratings: -
In reply to T K

Re: Moodle Login button does not work after add line at Additional HTML

by T K -
Urgently need help here
In reply to T K

Re: Moodle Login button does not work after add line at Additional HTML

by Ken Task -
Picture of Particularly helpful Moodlers

Could add to config.php

$CFG->additionalhtmlhead='';   
$CFG->additionalhtmltopofbody='';
$CFG->additionalhtmlfooter='';

'SoS', Ken


Average of ratings: Useful (1)
In reply to T K

Re: Moodle Login button does not work after add line at Additional HTML

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

The information is stored in the database. You could edit it directly there.

Average of ratings: Useful (1)
In reply to Michael Milette

Re: Moodle Login button does not work after add line at Additional HTML

by T K -

Can you show me which table?

In reply to T K

Re: Moodle Login button does not work after add line at Additional HTML

by Ken Task -
Picture of Particularly helpful Moodlers

mysql> select * from mdl_config where name like 'additional%';

Suggest adding the lines to config.php to set them to 'blanks' ... ie, no value.

That should allow you to login again at least and get to the config of it in the admin UX.

To be able to enter a value in one, comment out the config lines that blanked them ... no restart/reboot necessary ... just comment out or make active - which ever is the need.

Enter whatever in the form and save.

If what you put in locks you out again ... un-comment the line in config.php to blank it again.  Refresh the Moodle Admin UX screen.

Even for developers, think the general advice is not to edit DB directly ... unless you really know what you are doing.

Am not a developer myself and have found that advice a pretty good idea! smile

BTW, there is a cfg.php script in code/admin/cli/ which is supposed to allow changing any setting it knows about.

php cfg.php --help

'SoS', Ken


Average of ratings: Useful (1)
In reply to Ken Task

Re: Moodle Login button does not work after add line at Additional HTML

by T K -
THanks Ken!
Any idea why this js line addition fails?
In reply to T K

Re: Moodle Login button does not work after add line at Additional HTML

by Ken Task -
Picture of Particularly helpful Moodlers

Welcome!  Let me repeat ... am not a developer.  Normally I should stay away from responding in the developer forum, but due to your plea and 'urgency', I happened to know how to un-do.

Now for the question ... 'why this js line addition fails' ... trying to think like a developer, I'd probably ask what is in the .js file.   So if a true developer decides to jump in here and help, be prepared to provide some more info. smile

Best of luck!  Outta here ... have done all I can do! smile

'SoS', Ken