Add an option to show or hide the login side block

Bug #1434131 reported by Jean-Philippe Gaudreau
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
15.04
Fix Released
Wishlist
Unassigned
15.10
Fix Released
Wishlist
Jean-Philippe Gaudreau

Bug Description

When using Moodle Mnet or CAS as Mahara authentication, it is necessary to have an option that let you hide the login side block because the authentication page is external. So if you have only one type of authentication in your Mahara instance that is external, you need to use the config externallogin (#885029) and have another config that hide the login side block. This way only one login button is shown in the top right section (see attachments).

A patch will follow.

Revision history for this message
Jean-Philippe Gaudreau (jp-gaudreau) wrote :
Revision history for this message
Jean-Philippe Gaudreau (jp-gaudreau) wrote :
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/4440

Changed in mahara:
assignee: nobody → Jean-Philippe Gaudreau (jp-gaudreau)
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hello Jean-Philippe,

Thank you very much for your patch for this new functionality. We are finishing off the Release Candidate for 15.04 and will look at your patch afterwards.

Cheers
Kristina

Changed in mahara:
status: New → In Progress
importance: Undecided → Wishlist
milestone: none → 15.10.0
Revision history for this message
Jean-Philippe Gaudreau (jp-gaudreau) wrote :

Hi Kristina,

Thx for the fast response! No problem, it can wait since it's an amelioration and not a bug.

Best of luck for the new version!

Jean-Philippe

Revision history for this message
Jinelle Foley-Barnes (jinelleb) wrote :

Hi Jean Philippe,

Thanks for this patch, the screen shots were helpful as well.

I'm about to test this patch now to see if it functions the way it should, could you please write some test instructions on here?

Thank you,
Jinelle

Revision history for this message
Jean-Philippe Gaudreau (jeep-gaudreau) wrote :

Hi Jinelle,

Sorry for the delay, I'm from Canada so timezones are a bit different ;)

Here are the testing instructions :
* Go edit the config.php file of your Mahara instance and add the following line : $cfg->showloginsideblock = false;
* Go to your home page. The login sideblock should not be visible and there should be "login" link in the top right bar.
* Click on the login link. You should be redirect to the login page (yourdomain/mahara/?login), where you can enter your login/password and then log in.
* Logout and go edit the config.php file again with the following line : $cfg->showloginsideblock = true;
* You should see the default interface with the login sideblock in your home page and be able to log in/log out.

That's it! Tell me if you need some more information.

Thx!

Jean-Philippe

Revision history for this message
Jinelle Foley-Barnes (jinelleb) wrote :

Hi Jean-Philippe,

It's not a problem at all :)

I've replied on your patch!

Thanks again for the contribution!

Cheers,
Jinelle

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/4440
Committed: http://gitorious.org/mahara/mahara/commit/438d0132b7fa22914886aba9b12e00151b5c5b96
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 438d0132b7fa22914886aba9b12e00151b5c5b96
Author: Jean-Philippe Gaudreau <email address hidden>
Date: Thu Mar 19 11:42:51 2015 -0400

Add an option to show or hide the login side block (Bug #1434131)

Change-Id: Ia2d684f73db963784d70a91098f937a050960d12

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "15.04_STABLE" branch: https://reviews.mahara.org/4489

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/4489
Committed: http://gitorious.org/mahara/mahara/commit/24c70f0f821274ab6b4304744bd522fc42a29443
Submitter: Robert Lyon (<email address hidden>)
Branch: 15.04_STABLE

commit 24c70f0f821274ab6b4304744bd522fc42a29443
Author: Jean-Philippe Gaudreau <email address hidden>
Date: Thu Mar 19 11:42:51 2015 -0400

Add an option to show or hide the login side block (Bug #1434131)

Change-Id: Ia2d684f73db963784d70a91098f937a050960d12

tags: added: nominatedfeature
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Hi Jean-Philippe,

I have a Mahara instance (for the user manual) with a bunch of login options enabled and one institution has MNet, but other institutions don't. When I set your option to "false", I don't get a login link at the top right at all. Whereas when I use it on a Mahara instance with just one proper institution, i.e. one institution besides "No institution", I can see the login link and can still log in with my local credentials.

Thanks for shedding some light on the context in which the option can be used.

Kristina

Revision history for this message
Jean-Philippe Gaudreau (jeep-gaudreau) wrote :

Hi Kristina,

If it can help, the code that displays the login button or not is in the following raw template files : "htdocs/mahara/htdocs/theme/raw/templates/header/topright.tpl". Three variables must be false for the login button to be displayed :
* $LOGGEDIN
* $SIDEBARS
* $LOGINPAGE

My guess is that there's a side bar in your other configuration. Maybe this condition on side bars could be removed but we would have to check that it don't break anything else.

Hope it helps understanding more how it works!

Jean-Philippe

Changed in mahara:
status: Fix Committed → Fix Released
no longer affects: mahara
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.