Hi All
We are currently running Moodle 3.0.3 and have implemented, for our university, a custom theme that uses Clean as the parent.
As part of the custom look and feel, we have also modified the login page via a core code change to /login/index.php and /login/index_form.html
We're currently working on upgrading to 3.2 and in reviewing our core code changes, I have managed to incorporate the changes needed to the login page into our theme using a layout and mustache template:
- under our "cambridge" theme directory there is a templates directory that contains a login.mustache file, which is the entire login page
(incidentally to get this to work I found I needed a core directory under templates with another login.mustache file - this is currently empty) - in the cambridge_theme/layout directory is a login.php file that sets the context array for the template and calls $OUTPUT->render_from_template()
This all works well, apart from when authentication fails.
The auth check happens in the core /login/index.php file, and if login fails, the page sets the error message on the login form and renders it using $OUTPUT->render($loginform)
However, I can't detect a login failure in my theme login template because I can't seem to pick up any context/variable/environment from /login/index.php - e.g. $errormsg and $loginform are undefined.
Does anyone have experience of setting this up, or have any suggestions that might help?
Cheers
Raad
Moodle Technical Developer/DBA
University Information Services
University of Cambridge, UK