Turn peer role into configurable role so it can see content

Bug #1892428 reported by Kristina Hoeppner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Wishlist
Cecilia Vela Gurovic

Bug Description

It shall be possible for a peer to see the portfolio content. Currently, Mahara does not allow someone with the 'Peer' role to see the content of the portfolio pages to which the peer has access to. This is restrictive for some organisations. Therefore, we are going to turn it into an institution setting so that an institution administrator can determine how that role shall behave.

Since this is an assessment feature that may be more often then not be determined by an organisation rather than individuals, it is best to make it an institution setting and not require the decision to be made on each individual peer block.

We propose to create a new institution setting 'Allow peers to see portfolio content' for the peer role with the two possible states:

1. Can't see any content but can create peer assessment (the current setting)
2. Can see the entire portfolio and can create peer assessment

This setting decides what the peer assessor can do when they are commenting on a portfolio in that particular institution.

More details as determined with Cecilia:

1. A new field will be added to institution settings.

If set to 'Yes': if the portfolio owner belongs to this institution, all account holders that have peer role access to that portfolio will be able to see the block contents.

For multiple institutions: If the owner of the portfolio belongs to more than one institution, then the most restrictive rule will apply. In other words, if an account holder has peer access to a portfolio, they will be able to see the block content only if all the institutions the owner belongs to have this setting set to 'Yes'.

Default value will be 'No'. This will be saved on the 'institution_config' table on the DB.

This new field could be placed just below 'Allow public institution portfolios'.

Field name: Allow peers to see portfolio content

Description: Allow account holders who receive the 'Peer' role on a portfolio to see the entire content in the portfolio.

Help file text: The 'Peer' role is only available for portfolio access. If it is set to 'No', the peer can only see the block headings on pages on which peer assessments are required. On pages where there is no peer assessment, they will not be able to see anything. If an account holder has the role of 'Peer and manager', they can always see the entire portfolio, no matter this setting here.

2.Accessing a portfolio by a peer

The check to see whether a peer can see the block content or not will be done when rendering a block instance (on view display).

This change can be done in the PluginBlocktype class, by adding a code to the display_for_roles function. This is the function that defines if the block should display content or not.

If an account holder has more than one portfolio access role, then the more permissive one counts, e.g. account holder has
a) Peer role with access to content in one institution and peer role without access to content in another institution: Can't see content (see 1 above)
b) Peer role without access to content and manager role, i.e. 'Peer and manager', then they can see the content on the portfolio because the manager role is more permissive and thus counts.
b) Peer role with access to content and manager role: Can see content

Tags: newfeature
Changed in mahara:
status: Confirmed → In Progress
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/11176

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

Test results from the initial test. The tests in orange are incorrect.

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

Database that goes with the test results.

Revision history for this message
Cecilia Vela Gurovic (ceciliavg) wrote :

I'm a bit confused by the cases that include 'without peer assessment on the page'
Does this mean that the page has been shared with peer role but does not include a peer assessment block in it?
If this is the case, how is it supposed to work? On master we are not allowing to see any content to a peer unless there is a peer assessment block in it. Are we changing that functionality or is it a bug?

see commit 3ef359321cc0ff637abf91e1b0991ad4bfe0ecae

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

There is no bug in the current code. It is a change that is necessary because a collection can contain pages that have peer assessment and pages that don't have peer assessment. Since the role is given for the entire collection and not individual pages in a collection, the decision on whether content can be viewed by a peer needs to consider pages without peer assessment as well.

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

Test results from today (I kept the previous results on a separate sheet in the file).

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

Reviewed: https://reviews.mahara.org/11176
Committed: https://git.mahara.org/mahara/mahara/commit/104517a1c1a41a059d14ca02c47b66d3467864a6
Submitter: Robert Lyon (<email address hidden>)
Branch: master

commit 104517a1c1a41a059d14ca02c47b66d3467864a6
Author: Cecilia Vela Gurovic <email address hidden>
Date: Mon Aug 24 17:24:48 2020 +1200

Bug 1892428: Turn peer role into configurable role so it can see content

If a user has access with peer role to a portfolio
and the owner of the portfolio belongs to institutions
that allow the peer role to see content of blocks
then the logged in user will be able to see the content of pages
even if they don't have a peer assessment block in it

If the owner of the portfolio belongs to at least one institution
that doesn't allow the peer role to see content of blocks
then the fuctionality remains the same:
a peer doesn't see any content if there is no peer assessment block in the page
a peer only sees block headers if there is a peer assessment block in the page

behatnotneeded

Change-Id: I6bf84d919cc897cb912be463817b64dfb11c0c1a

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
tags: added: newfeature
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
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/11744

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.