← Back to team overview

mahara-contributors team mailing list archive

[Bug 1516823] Re: MNet: Separate the acts of locking a page, and granting view access to a page

 

Testing instructions:

1. Install Moodle (2.7, 2.8, 2.9, or 3.0).

2. Install Mahara (with this patch applied:
https://reviews.mahara.org/#/c/5704/ )

3. Install the Mahara assignment submission plugin into Moodle, using
the "issue2-fix" branch.

cd /path/to/moodle/mod/assign/submission
git clone https://github.com/catalyst/moodle-assignsubmission-mahara.git mahara
cd ./mahara
git checkout issue2-fix

4. Install the Mahara local plugin into Moodle, using the Catalyst
version

cd /path/to/moodle/local
git clone https://github.com/catalyst/moodle-local_mahara.git mahara
cd ./mahara
git checkout master

5. Connect Moodle & Mahara using MNet (Instructions here:
https://wiki.mahara.org/wiki/User:Aaronw/Quick_Mnet_setup )

6. In a course in Moodle, set up two Mahara assignments. Set them both
to never lock the submitted page/collection in Mahara.

7. Log in a student in the course and submit a page to the first
assignment. Then submit the same page to the second assignment.

8. Log in as a teacher in the course, look at the second assignment's
gradebook, and view the student's submission in the second assignment.

9. Open a separate browser session, log in as the teacher in the course,
look at the first assignment's gradebook, and view the student's
submission in the first assignment. (Using a separate browser session
lets us ensure the access control works correctly, and isn't just using
a cookie to cache it.)

Expected result: You should be able to view the assignment, using the
gradebook link from the first assignment or the second assignment.

Actual result: If you don't have all three of 1) the Mahara patch for
this bug, 2) the issue2-fix branch for the assignment submission plugin,
and 3) the Catalyst version of the Mahara local plugin; then the teacher
will not be able to view the student's submitted page using the link
from the first assignment's gradebook.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1516823

Title:
  MNet: Separate the acts of locking a page, and granting view access to
  a page

Status in Mahara:
  In Progress
Status in Mahara 16.04 series:
  In Progress

Bug description:
  See also: https://github.com/MaharaProject/moodle-
  assignsubmission_mahara/issues/2

  The Mahara assignment submission plugin was originally written with
  the idea that submitted pages would always be locked. So, we used the
  presence of the lock record as a way to check for whether or not the
  page should be visible to a specific MNet user.

  With the new generation assignment submission plugin, the plugin now
  supports modes of operation where the Mahara page *never* gets locked.
  In this case, it was relying on a bug in the original code, where the
  view access record would remain present after you locked & unlocked a
  page, until another submission instance came along and subsequently
  locked the page.

  To handle this in a more correct manner, we need separate methods for
  locking a page, and for checking whether a user has access to a page.
  The way we've decided to handle this, is to delegate the access
  control to Moodle. When a user comes from the Moodle gradebook to view
  a submitted Mahara page, Mahara will make an MNet function call back
  to Moodle to check whether that user should be able to view that page
  or not. This will replace the current confused system of secret URL
  tokens and locks.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1516823/+subscriptions


References