Reviewed: https://reviews.mahara.org/5704 Committed: https://git.mahara.org/mahara/mahara/commit/fd9f1f821c8dfaf3edbdf235f47700509808ef49 Submitter: Robert Lyon ([email protected]) Branch: master
commit fd9f1f821c8dfaf3edbdf235f47700509808ef49 Author: Hugh Davenport <[email protected]> Date: Fri Nov 13 08:15:45 2015 +1300 Fix behaviour on submitting multiple pages to Moodle Bug 1516823 The moodle plugin for mahara assignment submissions [1] had an issue [2] where is the plugin was configured in non locking mode, multiple submissions of the same view would result in only the latest submitted link working. This was due to the page getting locked then released, which resulted in a new mt token, which made all the old ones not work. This patch changes that by accepting a new parameter which checks whether you are locking and if not, then don't generate and send a token back. When viewing a view, check for the new parameter mnetviewid or mnetcollid along with the parameter assignment. If these are present, then Mahara sends an MNet request back to Moodle which tells Mahara whether the user has the permission to view the page. This requires an update to the Moodle plugin, which is sent for review currently [3]. Mahara detects whether this plugin is upgraded and publishing the new MNet function. If it isn't, it falls back to original behaviour gracefully. This is done by attempting to send a MNet request. [1] https://github.com/MaharaProject/moodle-assignsubmission_mahara [2] https://github.com/MaharaProject/moodle-assignsubmission_mahara/issues/2 [3] https://github.com/MaharaProject/moodle-assignsubmission_mahara/pull/19 behatnotneeded: Can't yet test MNet issues in Behat Change-Id: I80739181b58bf7cf9c326e7b0a588b6239f864f1 -- 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: Fix Committed Status in Mahara 16.04 series: Fix Committed 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 _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : [email protected] Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp

