General developer forum

Custom Login Page in Moodle 3.2

 
Picture of Umar Farooq
Custom Login Page in Moodle 3.2
 

Hello,

I have successfully implemented the SSO using Oauth2 and "Log in with Google" button is dosplayed on log in page. On log in page for users I only want to show the  "Log in with Google" button and hide log in form. A solution like given in this post https://moodle.org/mod/forum/discuss.php?d=261950 . But, in moodle 3.2 moodle/login/index_form.html has been removed.

How can I customize my page at https://imdcollege.edu.pk/lmstest/login/index.php to only show the "Log in with Google" button or alternatively use a custom log in page and keep this page for admin access only.

Thanks

 
Average of ratings: Useful (1)
Dan at desk in Moodle HQ, Perth
Re: Custom Login Page in Moodle 3.2
 
Average of ratings: -
Picture of Luis Ibhiabor
Re: Custom Login Page in Moodle 3.2
 

Hello Dan,

I am using the boost theme in moodle 3.2. I would also like to customize my login page. I just want to have the 'Username', 'Password', 'Login' fields and a logo (not site title) displayed on the login page.

Thanks for giving directions to the current location for the login.mustache files. However, I have a question. Are you suggesting one edits the core module? Is there an easy way to style it with css by increasing the width of the username and password fields, and hide other sections that are not required to be displayed but by not editing any core module?

Attached is a screenshot of the current login page that I would like to customize to something else please.

Thanks.


 
Average of ratings: -
Picture of Farney Jiménez
Re: Custom Login Page in Moodle 3.2
 

Hi Dan, thanks for this answer, it has helped me.


 
Average of ratings: -
Picture of begum karat
Re: Custom Login Page in Moodle 3.2
 

Hi,

Desperately need help. We have implemented SSO using Oauth2 and "Log in with Google" button is displayed on the index.php page and works fine. However, we only want the admin to go to the index page to login. For our users we want them to see the  "Log in with Google" button on the front page (currently shown as 'You are not logged in. (Log in)' on the upper left hand of the screenshot. 

Can someone please tell me the steps (as I'm not very familiar with the backend) so I can replace 'You are not logged in. (Log in)' with "Log in with Google" button on the front page. 

Thank you.


Frontpage



 
Average of ratings: -
Picture of Guillermo Dova
Re: Custom Login Page in Moodle 3.2
 

To avoid editing core files nor setting up an alternate login page, I´ve been able to show only the "login in with google" button by hidding the other elements with CSS.

For example, in Boost theme, just add this to Boost theme > advanced settings > raw SCSS


form#login input#username,
form#login input#password,
form#login div.rememberpass,
form#login button#loginbtn{
    display:none
}
 
Average of ratings: Useful (2)