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
Won't Fix
High
Dianne Tennent

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
Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

The MNet plugin has been replaced in favour of the webservices one in Moodle. The fix does not resolve the issue, and the project team focuses on LTI instead of MNet since Moodle is deprecating that more, and the PHP XML-RPC plugin will not be included per default any more with PHP 8.

If the fix works locally for you, keep it there. :-)

no longer affects: mahara/22.04
no longer affects: mahara/21.10
no longer affects: mahara/21.04
no longer affects: mahara/20.10
Changed in mahara:
milestone: 21.10.1 → none
status: In Progress → Won't Fix
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.