Allow site stats column options to respect enabled config options

Bug #1824731 reported by Robert Lyon on 2019-04-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Medium
Robert Lyon

Bug Description

Some of the options in Mahara need to be enabled in the config file or in the Site configuration settings.

If these options also cause statistical information to be displayed we need to make sure the option is enabled.

For example there is the user's details statistics where we can show probation number but only if $cfg->probationenabled = true;

So we should disable the choosing of that column if the 'probationenabled' is false

This can be seen under the Reports -> User details report

Robert Lyon (robertl-9) wrote :
Changed in mahara:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Robert Lyon (robertl-9)
Steven (stevens-q) wrote :

Commit hash: 297d3275704f7c58f76ee9f4b740ba1d141256c7
Environment tested: Master
Browser tested: Chrome

PRECONDITIONS:
------------------------
1) SIte has the following code on the config.php file (found in the htdocs folder)
 a) $cfg->probationenabled = true;
2) site admin user exists
3) Mahara users exist - min of 5 users (User1, User2, User3, User4, User5)
4) Set the probation points to 7 for 2 of the users (User3, User5)

TEST STEPS:
------------------------
1) Log in as Site admin user
2) Browse to the reports page (admin menu > Reports)
3) Configure the report with the report type = User details
4) Open the columns accordion tab and select the desired columns to display
5) Verify that the Probation checkbox list item is displayed ✔
6) Verify that you can select the checkbox ✔
7) Select the checkbox and submit the form
8) Verify that the report page displays the Probation column ✔
9) Verify that the correct probation points are displayed for the users (7 points for User3 and User5) ✔
10) Set the $cfg->probationenabled =False; in the config.php file
11) Clear the cache and refresh the page
12) Open the report configuration flyout modal - set the report type to User details and open the columns accirdion tab
13) Verify that the Probation checkbox list item is not checked and is displayed and user is unable to interact with the checkbox ✔

NOTE: The checkbox may be selected - this is dependant on the settings used for the last report columns selected during the user session (User sessions can be over ridden by opening a new private window to do testing should work)

14) Submit the form
15) Verify that the User details report is displayed ✔

Catalyst QA Apporved ✔

Reviewed: https://reviews.mahara.org/9763
Committed: https://git.mahara.org/mahara/mahara/commit/297d3275704f7c58f76ee9f4b740ba1d141256c7
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 297d3275704f7c58f76ee9f4b740ba1d141256c7
Author: Robert Lyon <email address hidden>
Date: Mon Apr 15 07:06:51 2019 +1200

Bug 1824731: Allow stats column options to be enabled / disabled

If the site's config has enabled a setting or not

behatnotneeded

Change-Id: Ie526dd7dfe9506702b5676e13c459866f3f675be
Signed-off-by: Robert Lyon <email address hidden>

Reviewed: https://reviews.mahara.org/9813
Committed: https://git.mahara.org/mahara/mahara/commit/95e286130cbbf81bbec76a9f398a21e01552e97d
Submitter: Robert Lyon (<email address hidden>)
Branch: 19.04_STABLE

commit 95e286130cbbf81bbec76a9f398a21e01552e97d
Author: Robert Lyon <email address hidden>
Date: Mon Apr 15 07:06:51 2019 +1200

Bug 1824731: Allow stats column options to be enabled / disabled

If the site's config has enabled a setting or not

behatnotneeded

Change-Id: Ie526dd7dfe9506702b5676e13c459866f3f675be
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 297d3275704f7c58f76ee9f4b740ba1d141256c7)

Robert Lyon (robertl-9) on 2019-04-20
Changed in mahara:
status: In Progress → Fix Committed
milestone: none → 19.04.0
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