Remote (MNet) collection submissions fail to release

Bug #1943792 reported by Jeremy FitzPatrick
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Status tracked in 22.04
20.10
High
Unassigned
21.04
High
Unassigned
21.10
High
Doris Tam
22.04
High
Unassigned

Bug Description

Mahara 21.04.1
Totara 12.?
Mahara assignment submission 2017101601

Set up MNet Connection from a Moodle/ Totara to Mahara allowing users from Moodle to log in to Mahara
Install Mahara assignment submissions plugin to the Moodle site.
Set up an assignment allowing Mahara submissions
 - lock submitted pages after grading

Create a collection as a learner
Log in to Moodle
Submit a Mahara collection to the assignment

Log out

Log in to Moodle as a teacher who does not have an account on Mahara
Grade the submitted assignment and allow a new attempt

Expected
The collection and pages are released and a new attempt is available

Actual
Error is returned: optional_userobj no userid and no logged in user

----

Diagnosis
In /lib/collection.php relase()
$releaseuser = optional_userobj($releaseuser);

$releaseuser does not exist.
Called in xmlrpc/lib.php release_submitted_view()
find_remote_user($teacherusername, $REMOTEWWWROOT)
returns no user.

This was introduced in 87f0664d3bae37184581425a995a6a534dc16c39 Bug 1908837: Setting $releaseuser correctly

Suggested fix
In /lib/collection.php relase()
wrap $releaseuser = optional_userobj($releaseuser); in an if statement

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

Mōrena Jeremy,

Thank you very much for the patch. We'll add it to our code review system. If you wish to push it there next time directly, you are welcome to set up the connection to Gerrit for a more streamlined workflow: https://wiki.mahara.org/wiki/Developer_Area/Contributing_Code

Ngā mihi
Kristina

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/12012

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Patch for "main" branch: https://reviews.mahara.org/12095

Robert Lyon (robertl-9)
no longer affects: mahara/20.04
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers