Block to login and logout moodle...

Block to login and logout moodle...

ved Luis De Sousa -
Antal besvarelser: 51

According to Arthur Andersen, "ease of use"/navigation is the first reason (74%) what makes a person want to come back after to use a website. User should easily find options for login and logout a website. Most sites use the same module to enter and exit. Login block of moodle dissapears after user is logged.

I built a block that provides login and logout options. It has two states: the first is like to standard login block, but when user is logged, it shows a second state that displays the following information:

  • Greeting: Good Morning, Good Afternoon or Good Evening is displayed in block header.
  • User full Name: click to go to the user's profile.
  • User's image.
  • Logout Button: click to exit moodle.
  • Update Profile: click to go to the user data in edit mode.
  • Last login: shows date and time of the last user login. It is different from the last access to the server (showed in user profile).

How to install

  • Download and unzip login_logout.zip file: http://www.ing.uc.edu.ve/~ldesousa/login_logout.zip
  • Copy login_logout folder to http://yourmoodlesite/blocks/
  • Copy login_logout/lang/en_utf8/block_login_logout.php file to http://yourmoodlesite/lang/en_utf8/ folder. Spanish users should also to copy login_logout/lang/es_utf8/block_login_logout.php file in moodle_data/lang/es_utf8/ folder. Instead, you can translate english strings and moodle will create the file in your language folder.
  • Login as Administrator and click on "Turn editing on" button
  • Add "Login_Logout" block in your frontpage (if standard login block is added, remove it)
  • Select a good position for your new block and move it.

     

Luis De Sousa
IMYCA - Facultad de Ingeniería
Universidad de Carabobo
Venezuela

Gennemsnitsbedømmelse: -
I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved Travis Burrell -
I'd like to use this block, but I have followed your instructions, & the block isn't listed as a possibility in the "Add blocks" drop-down list on my front page. Any ideas? We're using 1.9.2.

Also, is it at all possible to remove/hide the standard login prompt up in the corner (not a block)?
I svar til Travis Burrell

Re: Block to login and logout moodle...

ved Travis Burrell -
OK, I've got the block installed. Had to visit the "Notifications" section first, where it displayed this text:

"No warnings - Scroll to the continue button
login_logout
Login/Logout tables have been set up correctly"

After hitting "continue" the block was present in the drop-down list & added successfully.
I svar til Travis Burrell

Re: Block to login and logout moodle...

ved Luis De Sousa -
Travis...
Thanks for installing the block. Excuse me for omitting this step so important. Certainly, after login as Administrator, you must first visit the "Notifications" section and then you can add the block in your frontpage. I will fix this in the installation instructions. Thank you very much approve
Luis De Sousa
IMYCA - Facultad de Ingeniería
Universidad de Carabobo
Venezuela
I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved Rafael Reyes III -
Great block. Works very well. Question, any way to make it work in the mymoodle area?
I svar til Rafael Reyes III

Re: Block to login and logout moodle...

ved Luis De Sousa -

Hi Rafael...

Thank you for your comments. Download the attachment and replaces the file installed in the folder /blocks/login_logout. After that, you can put the block in any moodle area  (frontpage, mymoodle, courses, etc.). Don't forget to go again to "Notifications" section in the "Administration" panel (though this is not essential).
Luis De Sousa
CETICE-IMYCA
Facultad de Ingeniería
Universidad de Carabobo
I svar til Luis De Sousa

Tárgy: Block to login and logout moodle...

ved Császár-Cs. Péter -

Hi,

Great block.

1. How can I align all the content to center?
2. In Firefox the submit button text is aligned to center, but in IE7 left. How can I fix it?

Thx for the help.

I svar til Császár-Cs. Péter

Re: Tárgy: Block to login and logout moodle...

ved Luis De Sousa -
Hello Péter!

On the first question, the file styles.php is used to format the content of the block. The whole block is centered, except the header which receives the same format as other headers, ie to the left. Do You want to align the text of the header to center?

To the second question, submit button text is centered. The following statement in the file styles.php controls that:

.block_login_logout .loginform div.c1.btn (
   text-align: center;
)

Why the text of your button is not centered in IE7?. If text button in hungarian language is wrapped, I should probably change the level of the  "class" tag in the main code of the block. Can I see the block on your site?
I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved Tony Dunsworth -
Thank you for a terrific help!!!

The only thing I noticed is that there was no Spanish file. While my district is normally English predominant. I do want to start enabling Spanish for some of my students down the road.

Thank you much for everything.

Tony Dunsworth
Web Developer
Independence School District
I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved HJWUCGA INC. -
Does anyone have a screenshot of how it looks like? Unfortunately, my test servers are under maintenance for a few days and would like to see it would for our company.
I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved Chris Buehnerkemper -
Thanks so much for this great block! I have it installed on my school's moodle. We are in the process of moving to a new server and are switching from linux to windows. I havn't moved over all the files yet but am slowly installing blocks that we will be using on the new installation. I downloaded the login logout block and placed it first in the 'mod' folder...finally realizing my error i moved it to the 'blocks' folder. Nothing. Many places said to places blocks in the 'block' folder...maybe a typo...so I made a new folder called block and put them there. Nothing. Now I am at a loss. All the blocks are back in the 'blocks' folder now. Any suggestions?
I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved Tamara McIntosh -
Hi there,


Thank you for this it is exactly what I was looking for with the added bonus of pizazz.

I have installed the block and everything works except I get the following message at the top of my home page when I am logged in as admin.

"Module "login_logout" is not readable - check permissions"

Can anyone give me some advise on what may be wrong and how to get rid of the message?

Thanks,
T
I svar til Tamara McIntosh

Re: Block to login and logout moodle...

ved Luis De Sousa -

Hi Tamara...

You need to change folder permissions. If you have a linux server, using your command console, go to the blocks folder (i.e. cd /var/www/html/moodle/blocks) and try it:

chmod 755 login_logout -R

I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved Tamara McIntosh -
Hi Luis,
Thank you for the prompt reply. Can you dumb your answer down for me as I am totally lost.

Thanks again,
Tamara
I svar til Tamara McIntosh

Re: Block to login and logout moodle...

ved Tamara McIntosh -
Hi again.
I think i figured it out, I am using Cpanel. When I click on file permissions, it says they are set to 755. However I am still receiving the message.
Thanks,
T
I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved Tieku Bortei-Doku -
Luis,

What is the best way to uninstall an old version of your block and replace it with an newer version?

Tieku
I svar til Tieku Bortei-Doku

Re: Block to login and logout moodle...

ved Luis De Sousa -
Hi Tieku...
You only need to replace old folder /blocks/login_logout with the new one, and delete the language file that is found in  /lang (and /moodledata/lang if you translated the English file) because the language files are now within the folder /login_loguot/lang. Perhaps you also need to run "Notifications" as Administrator.
I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved Tieku Bortei-Doku -

Luis,

Thanks. I was upgrading my Moodle site, but did not delete the old block first. When I downloaded the latest version of login_logout after the upgrade to install, I got a message saying something about not being able to downgrade. I will give it a try and let you know how it goes.

Tieku

I svar til Tieku Bortei-Doku

Re: Block to login and logout moodle...

ved Luis De Sousa -

Tieku...

I changed version code and date of the block. Please, download and install it again. Don't forget to execute "Notifications". I think your problem should be solved with this.

Luis

I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved Tieku Bortei-Doku -

Luis,

Do you know of any way of getting a popup message display after login to prompt users to go update their users profiles?

Tieku

I svar til Tieku Bortei-Doku

Re: Block to login and logout moodle...

ved Luis De Sousa -
Tieku...
I made a script to force users to enter a PIN. The script checks if the "idnumber" field is empty, if this is so, it opens a popup window that forces the user to complete that field.
I am modifying the script to extend its application to other fields in the user profile. For example, it could check if one or more fields are empty and, if it's true, to open a "alert window" that displays the warning and redirects to the "Edit information" page where users can update their data.
I'm building this script inside login_logouot block. it's comming soon...
Luis
I svar til Tieku Bortei-Doku

Re: Block to login and logout moodle...

ved Brad Mills -
I get this msg when clicking on Notifications after install. It seems to be working fine, but i can't get to the notifications page?
Version mismatch: block login_logout can't downgrade 2008102700 -> 2008101900
I svar til Luis De Sousa

download link?

ved james anderson -
download link is not working.  can anyone else share this with me?
I svar til james anderson

Re: download link?

ved Luis De Sousa -

Hi James...

Yesterday at night there was an electrical failure and the server was shut down for several hours. It is currently running. Please, try again.

Luis De Sousa

I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved Jeroen Kleijn -
High Luis,

I am using your login/logout block

I can only use it to logout since it is not shown on the home page before you are logged in.

Am I missing something?

Jeroen Kleijn (197+)
I svar til Jeroen Kleijn

Trả lời: Re: Block to login and logout moodle...

ved Viet Long Dam -

Hello everybody,

I'm really like Block to login and logout but I can't download it. Can anyone share this with me?

My email address is: longbtre@gmail.com

Thankyou very much!

longbtre

I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved Willman Acosta Lugo -
Hola Luis

Lo he instalado bajo la versión 2.0 y no lo reconoce; ¿es así? o es que hay que hacer otra cosa para que funcione bajo la versión 2.0

Saludos

Willman
I svar til Willman Acosta Lugo

Re: Block to login and logout moodle...

ved Luis De Sousa -

Hola Willman...

No lo he probado con la versión 2.0. Permíteme hacer las pruebas y si hay que modificar el código te envío los cambios. Saludos...

Luis De Sousa

 

I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved Agam Nag -

Hi Luis:

I was wondering if this block could be displayed on the quiz page as well? It will provide  a positive confirmation of identity of the person taking the quiz.

Thanks

Agam

I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved Toshimi Hatanaka -

Hi,

I modified the fullname display code in order to change the order of firstname and lastname depends on language configuration.

line 85 in block_login_logout.php

$this->content->text .= '<div class="logoutusername"><a href="'.$CFG->wwwroot.'/user/view.php?id='.$USER->id.'&amp;course='.$COURSE->id.'">'.fullname($USER).'</a></div>';

fullname() function was come from moodlelib.php.

Using this code, for instance, if user login with Japanese mode, it shows "Hatanaka Toshimi". If user login with other language mode such as English, it shows "Toshimi Hatanaka".

A little bit improved, isn't it?

I svar til Luis De Sousa

Migrate to Moodle 2.0

ved András Gazdag -

¡Hola Luis!

I use your module for years, it's a great job!

Last week I've migrated my site to Moodle 2.0 and I can't find apropriate verson of Login/Logout block for it.

Today I have made some investigation and I've made some changes in your module.

The attached version is installs with Moodle 2.0, has hungarian translation and use the fullname() method for display user's name (thanks for Toshimi Hatanaka).

I svar til András Gazdag

Re: Migrate to Moodle 2.0

ved Wen Hao Chuang -

Hi Andras, thanks for sharing this. Is there any documentation (other than http://docs.moodle.org/en/Login_and_logout_block) about this block? Many thanks!

I svar til Wen Hao Chuang

Re: Migrate to Moodle 2.0

ved Sue Holtz -

I really like this block for 2.0, but my site is already graphic heavy. How do I NOT display the user's picture?

I svar til András Gazdag

Dette forumindlæg er fjernet.

Dette forumindlæg er fjernet og indholdet er ikke længere tilgængeligt.
I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved Andrew Johnson -

I tryed to download the file but it would not let me. It sayed that it could not me found. ANY HELP would be GREAT!!!!!!!

I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved Doris Castilla -

Hi Luis,

Your work seems splendid, but tell me this will work in Moodle 2.0?

I followed the steps here exposed, but the version 2.0 is different, and I could not finish the work.

Please let me know if you already proved in 2.0 and how you did it.

Thanks. Greetings from Iquitos Perú.

 

 

Hola Luis,

Tu trabajo me parece esplendido, pero dime ¿esto funcionará en Moodle 2.0?

He seguido los pasos aqui expuestos, sin embargo la  version 2.0 es distinta, y no he podido finalizar la labor.

Por favor quisiera saber si ya la probaste en 2.0 y cómo lo hiciste.

Muchisimas Gracias.-Saludos desde Iquitos Perú.

 


I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved Carmen Varela -

Estimado Luis:

gracias por darnos un block tan bueno. Pero tengo el siguiente problema. Estoy como administrador y luego de instalar el  block  no puedo editar la portada, no puedo ver los registros vivos. Qué pasó? Cómo soluciono? Por favor, respondeme enseguida. Gracias

Carmen

I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved Aaron Hockett -

Luis,

Thank you so much for this block.  Much better functionality than the stock one and works very well.

Thanks again.

-Aaron

I svar til Luis De Sousa

Re: Block to login and logout moodle...

ved André Santos -

Luiz,
I installed according to instructions login_logout block, add it in the block but FrontPage does not appear. Why?