page theme brakes when changing theme settings in institution

Bug #1668492 reported by Cecilia Vela Gurovic on 2017-02-28
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cecilia Vela Gurovic

Bug Description

For a normal user that is part of more than one institution:

In user settings, select as a theme one of the institution themes that is different from raw/default

Create a page, it will have the selected theme.

If we now, as a site admin, change that institution theme for Configurable theme,

1. the page will still have the old theme.
2. When the normal user creates a smartevidence collection including that page, the first page of the collection will show the wrong theme.

Changed in mahara:
assignee: nobody → Cecilia Vela Gurovic (ceciliavg)
status: New → In Progress
description: updated

The way that is working now:

1. If the user sets a personal theme in account settings, when it creates a page the theme will be saved in the view table on the DB for that page. Every time the user sees the page, it will show this theme. Even if the user changes the theme on the account settings, the page will be displayed with old theme.

The part of the code that does this is old, it was added before the user could change the theme in the account settings. It was made to take the user institution's theme.

But now, the user can change the account setting theme any time.

2. For the smart evidence collection, the matrix view (first on the collection) will pick the theme/skin from the first page of the collection. So if the first page has a wrong theme hardcoded in the DB, the matrix view will show the wrong theme. Fixing the first issue will fix this one too.

The solution I see is allowing to set the theme in view table on the DB only when
  we have userscanchooseviewthemes = true and
  the theme is set when we are editing page

for any other pages created, the system should decide which theme to show based on the user, institution and site settings.

summary: - page theme brakes when changing them settings in institution
+ page theme brakes when changing theme settings in institution

Notes for testing:

Theme settings

* site theme

a site admin can change the site theme under
 Configure site
 Site settings
This is the theme shown when there is no other personal or institution theme set

* browsing theme

The theme that a user sees in its own portfolio
If the user is a member of an institution, the browsing theme by default is the institution theme
If the user is a member of more than one institution or the $cfg->sitethemeprefs is set to true in the config.php file
this theme can be changed in
 the top right menu

If the site or institution admin changes the theme of the institution, the user will see this change in the next login
If the user shares a view with other users, they will not see the browsing theme of the user,
instead they will see the views with:
 the view theme, if it has one
 if not, the owner institution theme
 if the view owner is not in an institution, the site theme

* view theme

If this is enabled in the site by the site admin
 Configure site
 User settings
 User can choose page themes

then when editing a view a user can set a theme for that view only

Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 556e58cc2562dfab546a6b99fed73fac2bf24b5e
Author: Cecilia Vela Gurovic <email address hidden>
Date: Thu Mar 2 11:17:02 2017 +1300

Bug 1668492: institution/account setting theme not set in view table

Allow to set the theme in view table on the DB only when
we have userscanchooseviewthemes = true and
the theme is set when we are editing page


Change-Id: I16ef25e8efa6060aa7e5a30a44ed2f4698f6d625

Robert Lyon (robertl-9) on 2017-03-15
Changed in mahara:
importance: Undecided → Medium
status: In Progress → Fix Committed
tags: added: usermanualupdate
Robert Lyon (robertl-9) on 2017-04-27
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