When a member of multiple institutions, decide which theme to use

Bug #793308 reported by Kristina Hoeppner
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Wishlist
Richard Mansfield

Bug Description

When institutions have a custom theme in Mahara, it is applied. However, what happens when you are a member of two or even more institutions? Which theme is chosen then?

It would be good for a user to be able to choose her default theme and not let Lady Fortuna ;-) decide that for her. E.g. if a teacher is a member of her school institution but at the same time also of an organizational community that both have custom themes, she may only want to see her school theme except when she is in a training session and during a presentation of her work in the community. At the moment, the organizational community's theme may always be the one that is visible which can be disadvantageous when she wants to demo her portfolio during school activities when everybody else has the school theme displayed.

Changed in mahara:
status: New → Triaged
tags: added: institutions
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/1219
Committed: http://gitorious.org/mahara/mahara/commit/e250631de222451fe60aa575cfe4c75e5bba0560
Submitter: Richard Mansfield (<email address hidden>)
Branch: master

commit e250631de222451fe60aa575cfe4c75e5bba0560
Author: Richard Mansfield <email address hidden>
Date: Thu May 17 13:07:29 2012 +1200

    Add config option to allow users to change their theme

    Part of bug #793308

    Adds a config.php option which lets users change their theme (for
    browsing) via a drop-down on the Settings page. The allowed themes
    are the same set accessible to the user when the viewthemes option is
    availiable. Any theme which is restricted to one or more institutions
    in its themeconfig.php file is not available in the drop-down unless
    the user is a member of one of those institutions.

    Change-Id: If6a7db9a4c160e16b38d22a074c128777968c4ca
    Signed-off-by: Richard Mansfield <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1218
Committed: http://gitorious.org/mahara/mahara/commit/c1fda6fefc8aa31b6c8b82a18cc9bfe729aab6d7
Submitter: Richard Mansfield (<email address hidden>)
Branch: master

commit c1fda6fefc8aa31b6c8b82a18cc9bfe729aab6d7
Author: Richard Mansfield <email address hidden>
Date: Wed May 16 15:22:26 2012 +1200

    Add support in User for theme preference

    Part of bug #793308

    If a user has the 'theme' property set in their account preferences,
    this is used instead of the site or institution's theme.

    The LiveUser::reset_institutions() function, which recalculates the
    institution theme, is now called in place of LiveUser::update_theme()
    whenever a user's institutions have changed. reset_institutions() now
    calls update_theme() if the user is a LiveUser.

    Change-Id: I75b36da85a5aa249c3098078b8588b8a20ac9b48
    Signed-off-by: Richard Mansfield <email address hidden>

Revision history for this message
Richard Mansfield (richard-mansfield) wrote :

These commits introduce a config.php setting which, when enabled, adds a drop-down on the settings page where users can choose their preferred theme for browsing the site. The drop-down shows all themes available to the user, including Default, Aqua, etc., not just their institutions' themes. The only themes missing from the drop-down will be those restricted to members of an institution in the $theme->institutions line of the themeconfig.php file.

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

The config.php setting is

$cfg->themeprefs = true;

It can be found in htdocs/lib/config-defaults.php

Changed in mahara:
status: Triaged → Fix Committed
milestone: none → 1.6.0
Changed in mahara:
assignee: nobody → Richard Mansfield (richard-mansfield)
Revision history for this message
Son Nguyen (ngson2000) wrote :

https://reviews.mahara.org/#/c/1506/

- Adding help file to explain the user setting 'Theme'
- Only enable user theme setting if the user belongs to multiple
institutions

Revision history for this message
Son Nguyen (ngson2000) wrote :

I think when a user is member of several institutions, he/she can choose a default institution theme as his/her default theme via 'Default theme of the institution' setting.
(see attached image for more details)

Revision history for this message
Son Nguyen (ngson2000) wrote :
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

That is what is supped to happen. But when I tried it out in my instance, any user - no matter whether in 2 or only 1 institution could choose a theme. This option should only be available for users in multiple institutions and then only show the institution themes that the institution admins had selected (and not all).

Revision history for this message
Son Nguyen (ngson2000) wrote :

Hi Kristina;

I will keep Richard's new option so that if enable user can choose a preferred theme for browsing site.
if this option is not set or = false we will apply my feature.

Is it sound ok?

Revision history for this message
Son Nguyen (ngson2000) wrote :
Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1506
Committed: http://gitorious.org/mahara/mahara/commit/7cf320bc489fa4f437c5ea40dd6299e21d26c08a
Submitter: Melissa Draper (<email address hidden>)
Branch: master

commit 7cf320bc489fa4f437c5ea40dd6299e21d26c08a
Author: Son Nguyen <email address hidden>
Date: Fri Sep 7 17:08:50 2012 +1200

    Allow users to choose institution themes for browsing if in multiple
    institutions (Bug #793308)

    - Add a help file to explain the user setting: 'Theme'
    - By default, users can choose one of their institution's themes as
    their prefered theme.
    - if site admins set $cfg->sitethemeprefs = true in config.php,
    users can ALSO choose standard site's themes as preferred theme for
    browsing the site.
    - remove the option 'No theme selected'
    - sort the themes in alphabetical order

    Change-Id: I6f144747338e88eb1f90c79f0f7934449fe0ab63
    Signed-off-by: Son Nguyen <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/1653
Committed: http://gitorious.org/mahara/mahara/commit/19d6788e2e70f5effbe0db3c2f81ad2926bbee99
Submitter: Hugh Davenport (<email address hidden>)
Branch: 1.6_STABLE

commit 19d6788e2e70f5effbe0db3c2f81ad2926bbee99
Author: Son Nguyen <email address hidden>
Date: Fri Sep 7 17:08:50 2012 +1200

    Allow users to choose institution themes for browsing if in multiple
    institutions (Bug #793308)

    - Add a help file to explain the user setting: 'Theme'
    - By default, users can choose one of their institution's themes as
    their prefered theme.
    - if site admins set $cfg->sitethemeprefs = true in config.php,
    users can ALSO choose standard site's themes as preferred theme for
    browsing the site.
    - remove the option 'No theme selected'
    - sort the themes in alphabetical order

    Change-Id: I6f144747338e88eb1f90c79f0f7934449fe0ab63
    Signed-off-by: Son Nguyen <email address hidden>

Revision history for this message
Hugh Davenport (hugh-davenport) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

 status fixreleased
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iJwEAQECAAYFAlCbHO8ACgkQuMoJ2LQ3zxH8TAP/YN4BiCJZsn5a899/0UzV31Qg
lM8LXAwZWa6zFv6t0BQUHCqe6eFK9wPp51qgCWWXjUZ3vvvVcsyeWp6626aBFKSU
pCQXI9E7huPw802nJQ9WcZXRBUmgw87ww72Tx4mybnu7SPSrkZgXdnPGSMwDs89N
oWvTpl7Xuac48e6p0lU=
=ouU+
-----END PGP SIGNATURE-----

Changed in mahara:
status: Fix Committed → Fix Released
Revision history for this message
Aaron Wells (u-aaronw) wrote :

I noticed that $cfg->themeprefs no longer does anything. It turns out there was a change in the decision of whether or not to use it, which is buried in the gerrit review notes on: https://reviews.mahara.org/1506

$cfg->themeprefs has been replaced with $cfg->sitethemeprefs

Test cases:

1. If $cfg->sitethemeprefs is set to false
1.1 If users belong to only 'No institution' (mahara), their theme will be the site's theme and the setting Theme will not be available.
1.2 If users belong to one institution e.g. 'School A', their theme will be the School A's theme and the setting Theme will not be available.
1.3 If users belong to more than 1 institution e.g. 'School A', 'School B', and 'School C', the setting Theme will be available and they can choose one of institution's themes as their preferred theme such as School B's theme including the institution configurable theme and logo.

2. If $cfg->sitethemeprefs is set to true, the setting Theme will be available and
2.1 If users belong to only 'No institution' (mahara), they can choose one of standard site's themes as their preferred theme.
2.2 If users belong to one institution e.g. 'School A', they can choose one of standard site's themes and the theme of their institution (School A) as their preferred theme.
2.3 If users belong to more than 1 institution e.g. 'School A', 'School B', and 'School C', they can choose one of standard site's themes and other themes of their institutions as their preferred theme.

I'm going to update config-defaults.php to represent this, in https://bugs.launchpad.net/mahara/+bug/1185297

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

Reviewed: https://reviews.mahara.org/2251
Committed: http://gitorious.org/mahara/mahara/commit/46aba6b4dc2e2a2576826be6cc5bab28fed7a355
Submitter: Son Nguyen (<email address hidden>)
Branch: master

commit 46aba6b4dc2e2a2576826be6cc5bab28fed7a355
Author: Aaron Wells <email address hidden>
Date: Thu May 30 11:03:16 2013 +1200

Removing $cfg->themeprefs because it has been replaced by $cfg->sitethemeprefs

Bug #1185297: The $cfg->themeprefs setting was removed in bug #793308

Change-Id: Ifcea19569d62eeb03cb26e098d74ab4d535f61e3
Signed-off-by: Aaron Wells <email address hidden>

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.