Feature request: Institution-specific default languages

Bug #1266320 reported by Aaron Wells on 2014-01-06
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Wishlist
Aaron Wells

Bug Description

This feature would allow an institution to specify the default language for its users.

Aaron Wells (u-aaronw) on 2014-01-06
Changed in mahara:
importance: Undecided → Wishlist
assignee: nobody → Aaron Wells (u-aaronw)
milestone: none → 1.9.0
status: New → In Progress
tags: added: institutions languages
Aaron Wells (u-aaronw) wrote :

It sounds simple enough, but it turns out there are some weird corner cases, the most obvious of which is if a user belongs to multiple institutions that specify languages. Here is how I have implemented it, which I think is the most straightforward way:

1. The institution's language setting doesn't show up unless there are at least two languages installed in the site (the same as the user's language setting)

2. Each institution can set a language for their users, or they can leave it on "site default".

3. If a user belongs to multiple institutions that specify a language, then we arbitrarily use the language from the "first" institution. This is an okay solution because the language is *only* a default. If the user ever chooses a specific language, either via their account settings or the pre-login language menu, existing code ensures that will override the default henceforth.

4. The existing system is that the user's language account preference can be a specific language, or it can be the string "default" (or NULL), in which case you use the site default. This remains true, except now, if you choose "default" we use your institution default if you have one, and otherwise we use the site default.

5. In the user language menu, if your default is an institution language then we say "<institution display name> (English)" instead of "Site default (English)".

The wonky things about this are: 1) arbitrarily picking one language if you belong to multiple institutions that specify languages; 2) if you switch between institutions with different selected languages, your displayed language will change even though you didn't manually change it (but that's kind of the point); 3) if you switch institutions with different languages, the value you see selected in the user language menu will be different even though you didn't change it, i.e. it can change from "UNR (English)" to "Site default (English)". But I believe those are acceptable design compromises that won't cause too much user confusion.

Aaron Wells (u-aaronw) wrote :

Code is here: https://reviews.mahara.org/2871

For testing, note that you have to install at least one additional language pack before any of the language menus will display.

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

commit f291642c53b6794d9bf7847f71f85b17c68a6aa8
Author: Aaron Wells <email address hidden>
Date: Fri Dec 27 16:48:38 2013 +1300

Allow institutions to specify their users' default language

Bug 1266320

Change-Id: I24f72049f13e145f46145df2d248a02e2a3af8ba

Robert Lyon (robertl-9) on 2014-01-15
Changed in mahara:
status: In Progress → Fix Committed
Aaron Wells (u-aaronw) wrote :

I pushed a second patch to fix a small code duplication issue I noticed while glancing over the code one last time.

Aaron Wells (u-aaronw) on 2014-01-15
Changed in mahara:
status: Fix Committed → In Progress

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

commit 690f60061810cd6a225430dc01ed7e6f197d6f06
Author: Aaron Wells <email address hidden>
Date: Wed Jan 15 14:26:48 2014 +1300

Reduce code duplication around user's institution language

Bug 1266320: We've got a function to determine a user's institution language,
we should use that.

Change-Id: I9ee4dc99e5876c8b44ca141b0ea5c85aa3f75582

tags: added: nominatedfeature
Changed in mahara:
status: In Progress → Fix Committed
Robert Lyon (robertl-9) on 2014-04-22
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers