You are not logged in. (Log in)

You are not logged in. (Log in)

by Albert Leatherman -
Number of replies: 13

Hi, I'd like to change "You are not logged in. (Log in)" to "You are not logged in. (Create account)". Does anyone know how I can do that? I need to do two things: change the linked text in parentheses and change that text's link from /login/index.php to http://xyzschoolaccess.vamoo.org/login/signup.php. Thanks a lot!

Average of ratings: -
In reply to Albert Leatherman

Re: You are not logged in. (Log in)

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

What about people who are not logged in and HAVE an account?

Anyway, see - Language_customisation

In reply to Howard Miller

Re: You are not logged in. (Log in)

by Albert Leatherman -

Thanks a lot, Howard. I have a customized login page where people with accounts can log in. Can you tell me how to change the link for the text as well? Thanks.

In reply to Albert Leatherman

Re: You are not logged in. (Log in)

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

Click the link in blue ^^^

In reply to Howard Miller

Re: You are not logged in. (Log in)

by Albert Leatherman -
The link about explains how to change the wording. My previous question, which was the same as the second part of my original question, was how to change the link from link from /login/index.php to /login/signup.php.
In reply to Albert Leatherman

Re: You are not logged in. (Log in)

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Albert - I think you are asking how to enable people to sign up / create accounts on your site? See the documentation Email-based self-registration

In reply to Mary Cooch

Re: You are not logged in. (Log in)

by Albert Leatherman -

Hi Mary, I’m actually asking how to change “(Log in)” to “(Create account)” after the text “You are not logged in” and, consequently, how to make “Create account” link to /login/signup.php. Thanks. 

In reply to Albert Leatherman

Ang: Re: You are not logged in. (Log in)

by Bente Olsen -
Picture of Testers Picture of Translators

Hi Albert

To change the login link is not that easy, it is hard coded into Moodle, it can not be found in the language pack. Thus it requires you to edit the code itself. It does not necessarily be difficult, but your customization will be overwritten every time you update Moodle.

Bente

In reply to Bente Olsen

Re: Ang: Re: You are not logged in. (Log in)

by Albert Leatherman -

Thanks Bente. Can you tell me which file I need to modify?

In reply to Albert Leatherman

Re: Ang: Re: You are not logged in. (Log in)

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

I would strongly encourage you not to mess about with core code. Just because you can doesn't mean it's a good idea to do so. 

Can you explain why you're doing what you're doing? There's almost certainly a better way.

In reply to Howard Miller

Re: Ang: Re: You are not logged in. (Log in)

by Albert Leatherman -

Hi Howard, I have a good bit of experience working with Moodle’s php files and am just wondering which one is relevant for changing the link as described above. The purpose is to improve the flow and user experience on my site, which is highly customized. Thanks. 

In reply to Albert Leatherman

Re: Ang: Re: You are not logged in. (Log in)

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

"highly customised" == massive pain when it comes to upgrading. 

Anyway, I'm surprised you had trouble finding this if you have a lot of experience modifying Moodle. I just grepped the message. 

https://github.com/moodle/moodle/blob/MOODLE_34_STABLE/lib/outputrenderers.php#L997

However... you might want to read this, https://docs.moodle.org/dev/Overriding_a_renderer

Overriding the core renderer in, say, a custom theme is the correct way to do this. Editing core code directly most certainly is not.

In reply to Howard Miller

Re: Ang: Re: You are not logged in. (Log in)

by William Workman -

I also have a similar problem with this issue. I need(at my employer's request) to replace the (Login) portion of the text "You are not logged in (Login)" with an image. This image is just a simple button shaped rectangle with the word LOGIN inside of it, but it is important to the client for branding purposes and because their sister-sites all have this standard appearance.  

The idea is that I want to replace the word (Login) with an <a href="to the login page"><img src="mybuttonimage></a> 

Our client also had us disable the pull down dashboard in moodle,and to be able to logout they want us to add a logout button on the right side of the user's gravatar when logged in. 

So it would look like this when logged out

                                You are not logged in. (Login BUTTON IMAGE) - link goes to login page

And it would look like this when logged in.

                                  User NAme (GRAVATAR IMAGE) (Logout BUTTON Image)

Naturally the Logout Button image would have the <a href> that we use to logout of moodle. 

I appreciate any help in this. Thanks.

I attached an image of the sister site header which the client wants us to make the moodle site look like as well. 

Attachment Picture1.png
In reply to Albert Leatherman

Ang: You are not logged in. (Log in)

by Bente Olsen -
Picture of Testers Picture of Translators
No, I do not know where you have to edit the link, you will find it if
it is that important :) I actually agree with Howard, it is no good idea
to change the code. I would try hard to find another solution.