General developer forum

 
 
Picture of Gary Attwood
Customising the log in page
 
I'm not sure where to post this question.

Does anyone know how to customise the log in page so that you just have the simple log in box without the headers or footers or the message box alongside it.

In our site you can't get in without logging in.

We would like the login box with our graphic background to the page and a logo instead of any headings I have included a picture of roughly what we would like to achieve.

We would be using 1.5 and our graphics person is customising the "Wood" theme for this. I am not sure what we would need to edit.

I would be very grateful if anyone could point us in the right direction.

Thank you very much.

Gary Attwood
E-learning Manager
English Teacher

 
Average of ratings:Useful (1)
Picture of Helen Foster
Re: Customising the log in page
Group DevelopersGroup Documentation writersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers
Hi Gary,

Please check Administration >> Users >> Authentication for the option to enter an alternate login URL. smile
 
Average of ratings: -
Picture of Gary Attwood
Re: Customising the log in page
 
Dear Helen,

Thanks for the info.

I wonder if there are any example forms in use. I was a little afraid of testing as it looks as if one can be locked completely out of the site if the form doesn't work.

I'll probably need to post another question on that issue. If you have any ideas though that would be great.

Thank you very much for the help.

Gary Attwood

 
Average of ratings: -
Picture of Helen Foster
Re: Customising the log in page
Group DevelopersGroup Documentation writersGroup Moodle HQGroup Particularly helpful MoodlersGroup Testers
Hi Gary,

Could you test things out on a local Moodle site? I don't know of any examples forms in use, however the code you need to include on the login page is as follows:
<form method="post" action="http://yoursite.com/login/index.php">
<fieldset>
<label for="username">Username:</label><input type="text" name="username" id="username" />
<label for="password">Password:</label><input type="password" name="password" id="password" />
</fieldset>
<fieldset>
<input type="submit" value="Login" />
</fieldset>
</form>

 
Average of ratings:Useful (1)
Picture of Chardelle Busch
Re: Customising the log in page
Group Developers
If you take a look at the very bottom of the login/index.php page, you will see: print header..., include html..., print footer. You could try deleting the print header and footer lines, and then changing the html form by adding your image: login/index_form.html, but be careful with that--it contains a lot of code!
 
Average of ratings: -
Picture of Gary Attwood
Re: Customising the log in page
 
Thanks Chardelle,
This is also very useful for our designer who will certainly have a go at it.
We'll be looking at the design at the end of July, but I have put these questions up well in advance so we can plan ahead.
Thank you for your help.
Gary
 
Average of ratings: -
Picture of W Page
Re: Customising the log in page
 
Hi Gary!

The code Helen provided is essential for logging into a Moodle site.  Also I would suggest (if there is a problem) a link to a contact person or a contact form that sends e-mail.

Chardelle also offered good advice to get the page to layout as you want.  In your design there really is no visible header and footer.

I would only add that a simple way to achieve what you want is to do the layout using tables.  However, it seems that everyone is now CSSing so you may want to try it that way as well.  Your "web" person should be helpful with this.

Please let us see the final design.

WP1
 
Average of ratings: -
Picture of Gary Attwood
Re: Customising the log in page
 
Thanks for the tips.

Yes, our graphics man wants to get rid of the header and footer on the log in page so our clients just see our company name and logo.

Not sure yet what approach we'll eventually try (either customising the current log in page removing code or writing our own log in page after adjusting the settings in moodle). We'll have a meeting in a couple of weeks and go over the ideas we've gathered and set up a few tests.

We will definately let anyone who is interested see the final result.

We currently use our site for course management in our small language school and we also run a small number of private e-learning courses.

Moodle's great.

It's great to get so much very specific and detailed online assistance.

Fantastic.

Thank you all.
 
Average of ratings: -
Picture of W Page
Re: Customising the log in page
 

Hi Gary!

I forgot to add this suggestion in my previous post. Ask your designer about changing the colors of the form button [login, password] so that they blend in better with the color on the page. smile

WP1

 
Average of ratings: -
Picture of Gary Attwood
Re: Customising the log in page
 
Long time in replying to this but our site has now been up a couple of months with a new theme and our customised log in page.

If you want to visit our mirror site then visit:

ecourseline.biz/moodle and log in using Testuser as both id and password.
There are 2 demo courses inside.
They are slightly rough but the writing demo has good samples of quicktime media and video.


Best wishes,
Gary
 
Average of ratings: -
Picture of Gary Attwood
Re: Customising the log in page
 
Wow Helen!
Thanks! This code helps a lot.
I am more of a multi media expert than web form designer, or php scripter, so this shows me the idea.
I'll have to try a few tests.
Thank you for your help.
Cheers,
Gary
 
Average of ratings: -
Picture of Angela Crouch
Re: Customising the log in page
 
I was also trying to do something similar and this posting helped a lot. Thank you. 

Is there a way to provide an option on our smaller login form to enable someone to create an account? 

As it is right now, I have the login username and password boxes but I'd like for a link to direct them to signing up for the site. 

Any tips?
 
Average of ratings: -
Picture of Juan David Martínez Pavony
Re: Customising the log in page
 

Hello Angela.

When you talk about your "small login form" what do you mean? Are you using the login page of Moodle? Are you using an alternative one?

I think you should let us know more about your Moodle setup.

I guess the answer you are looking for is not as easy as it appears to be. It all depends on your authentication method for Moodle.

If you have e-mail authentication method, a person is able to create its own user and password through an e-mail confirmation mechanism. If you choose no authentication method, anyone can sign up. If you select any other method, then an external system must exists to grant access for an user and a person can not choose the one of its preference.

In the other hand, if you choose manual accounts only method, only accounts created by the admin (manually created or loaded up from text files) can login.

Anyway, you EVER can setup an alternative URL to accomplish authentication tasks for all of the authentication methods in Moodle.

Hope this helps.

Good luck.

 
Average of ratings: -
Picture of Angela Crouch
Re: Customising the log in page
 
Hi Juan,

I have a username and password form on my webpage that allows the user to login to their moodle classroom (action is pointing to the moodle login page).  If I have a new user however, is there a seperate link I can use or can I direct them to the original login page to sign up for their account?


 
Average of ratings: -
Picture of Juan David Martínez Pavony
Re: Customising the log in page
 

Hello again.

I think you can try something like http://yourmoodle/login/signup.php

There you can create an user. (see my image down here)

Let us know.


 
Average of ratings: -
Picture of Angela Crouch
Re: Customising the log in page
 
That is an interesting link you sent, but I'm not sure that it relates to what I'm trying to do.

I have this box on my webpage:  Training Login box

I want them to type in their username and password (if they are already signed up) or click on the "New User" link and it will take them to the registration page for Moodle. 

Any ideas?


 
Average of ratings: -
Picture of Juan David Martínez Pavony
Re: Customising the log in page
 

Hello Angela.

Does your whole login page look like mine (see image)? Does it have those options? Which is the authentication method you are using?

Default method for authentication is e-mail based. If you choose it, then you have a "Create new account" button in your login page (instead of the "New User? Register here" link). I guess that is what you are looking for. Doesn't it?

See you.


 
Average of ratings: -
Picture of Bernardo Carvalho
Re: Customising the log in page
 

hi guys this thread is really helpful, but as a newbie I still cant find the solution to my problem: I would like to edit the following block of text on the login page:

Hi! For full access to courses you'll need to take a minute to create a new account for yourself on this web site. Each of the individual courses may also have a one-time "enrolment key", which you won't need until later. Here are the steps:

  1. Fill out the New Account form with your details.
  2. An email will be immediately sent to your email address.
  3. Read your email, and click on the web link it contains.
  4. Your account will be confirmed and you will be logged in.
  5. Now, select the course you want to participate in.
  6. If you are prompted for a "enrolment key" - use the one that your teacher has given you. This will "enrol" you in the course.
  7. You can now access the full course. From now on you will only need to enter your personal username and password (in the form on this page) to log in and access any course you have enrolled in.

but I cant find the source for it??! anyone help, please?

Many thanks,

Bernardo

 
Average of ratings: -
Picture of Joseph Rézeau
Re: Customising the log in page
Group DevelopersGroup Particularly helpful MoodlersGroup TestersGroup Translators
In versions of Moodle up to 1.5.4,
  1. log in as Admin
  2. go to Administration » Configuration » Language » Edit strings
  3. locate string "loginsteps" and edit...
Joseph
 
Average of ratings: -
Picture of Tracy Young
Re: Customising the log in page
 
WHat about version 1.9+?
 
Average of ratings: -
Picture of Nicolas Martignoni
Re: Customising the log in page
Group DevelopersGroup Documentation writersGroup Particularly helpful MoodlersGroup TestersGroup Translators

The same string should be modified. The edition of the strings has changed though since version 1.6. See here: http://docs.moodle.org/en/Language.

 
Average of ratings:Useful (1)
Picture of maryory urdaneta
Re: Customising the log in page
 
Hi good afternoon,

This is to consult as I can do to customize the login, in order to evaluate each user at logon. The idea is to display a message only to some students, those that meet certain characteristics. I mean, the idea is that the system at some point to assess whether a student will pursue a common area will display a warning message should be aware of the messages from your professor.
But I want to evaluate the logon, I have been checking in login / index.php and login / index_form.html but I do not understand where to modify it to evaluate this.

Thanks in advance. triste
 
Average of ratings: -
Picture of John Patten
Re: Customising the log in page - direct to specific course?
 

Hello All!

I was creating a custom login page, thanks to the code Helen submitted. It works fine, but I'd also like to have the student go directly to a specific course and not the main Moodle page. I guess this is being controlled by cookies on the user's browser.

Is there a way I can set a value in the custom log in page so that the student is taken to a specific course and not the front Moodle page?

Thank you!

 
Average of ratings: -
Picture of Cory B
Re: Customising the log in page - direct to specific course?
 
Look for the following two lines of code in the file ~/login/index.php:

            reset_login_count();

            redirect($urltogo);

If you edit the $urltogo, you can change where someone is redirected to after they login. The lines before this code determine how that is set.

I hope this helps. smile
 
Average of ratings: -
Picture of Chuck Daniel
Re: Customising the log in page - direct to specific course?
 

I have a somewhat related question to this reply and to the topic in general.

I am a newbie to moodle but a software design engineer by training so am willing to make code modifications if necessary to accomplish my task.

Moodles design philosophy seems to be one of:

Register as a moodle user
Enroll for specific courses

What I would like to be able to do is have the registration and enrollment occur in one step.

The reason I want to do this is that I would like to have people coming to the site be able to register and join a specific course using an enrollment key that I provide them.  They will have paid to participate in the course outside of Moodle and I only want paid members to be able to join the site/course.

Can anyone please provide me with a method or feedback on the best way to accomplish this?  The multi-step join/enroll method will be confusing to the people I want to give access to the training so if I can combine them that would be the best for what I want to do.

I thought perhaps a custom login page might be the way to do this but am open to all possibilities.

Thanks in advance for your time.

I sincerely appreciate it!

-Chuck Daniel

 
Average of ratings: -
Picture of maryory urdaneta
Re: Customising the log in page
 
Hi good afternoon,

This is to consult as I can do to customize the login, in order to evaluate each user at logon. The idea is to display a message only to some students, those that meet certain characteristics. I mean, the idea is that the system at some point to assess whether a student will pursue a common area will display a warning message should be aware of the messages from your professor.
But I want to evaluate the logon, I have been checking in login / index.php and login / index_form.html but I do not understand where to modify it to evaluate this.

Thanks in advance.
 
Average of ratings: -
Picture of Fátima Silva
Re: Customising the log in page
 

I am a beginner at moodle...

I made this and when I click on access, moddle redirects to my login page, but it doesn´t recognize the login I´ve made im my login page... what I did wrong? I am in a loopong now...

Thanks for your help.

 
Average of ratings: -
Greg watching STS 132 takeoff!
Re: Customising the log in page
 
Just some Guesses Fatima...but:

first off: Make sure you're using a valid login!
second: Make sure you're using form post back to the login/index.php page:
<form id="loginarea" method="POST" action="http://yourserver/yourmoodle/login/index.php">
<p>USER NAME:</p>
<p><input id="uid" type="text" name="username" id="username" /></p>
<p>PASSWORD:</p>
<p><input id="pwd" type="password" name="password" id="password" /></p>
<input id="gobutton" alt="submit" type="submit"value=" " name="submit" >
</form>

third: make sure you've changed your settings in moodle (which you must have or else you wouldn't be stuck in your loop).

Hope it helps!
Greg.
 
Average of ratings: -
Picture of Kester David
Re: Customising the log in page
 

Hi Guys, I'm not sure if i am posting in the right forum. However my issue is like this, how can I let moodle prompt the user with the login/index.php page upon requesting the site.

I want the users to login first before acessing the site.

kesterd@gmail.com

 
Average of ratings: -
Picture of Mike Johnson
Re: Customising the log in page
 

When I try to use the code for the login form posted above on a page outside of Moodle, I get this error message:

CGI Error

The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

But it never shows anything after the :

I'm trying to put this code into a page in our content management system so users can just log into Moodle directly from there.

Any ideas?

 
Average of ratings: -
Picture of Olli Savolainen
Re: Customising the log in page
Group Developers
Hi all,

It seems that if I have a custom login page, there is no way of giving the user feedback about a failed login? Should I just copy some PHP code from login/index.php or do I have to customize login/index.php in place to have a login page that works properly?

Thanks,
Olli
 
Average of ratings: -
Picture of arumugam M
Customising the log in page
 

hi everyone. how to connect moodle with openbiblio with single login.can you explain how to get an idea?is there any plugin made in moodle?pls  let me know.

 
Average of ratings: -