Error releasing submissions

Bug #2012419 reported by Laurent
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
22.10
Fix Released
High
Unassigned
23.04
Fix Released
High
Unassigned

Bug Description

To reproduce the issue, setup a new Mahara install (22.10.0 STABLE, Mysql).
* Create 2 users Student and Teacher
* Create an institution
* Add the two users in the institution
* Add a new group (Group 1) - With the 3 roles (Tutor, Member, Admin)
* Add Student as Member of Group 1 and Teacher as Tutor in Group 1
* As Student create a page and submit it for review in Group 1
* As Teacher release the Page

From this point an error will be displayed and the page will never be released and will be marked as "Pending release after archiving."

The Error displayed is:

Failed to get a recordset: mysqli error: [1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '? LIMIT 1' at line 1] in EXECUTE("SELECT * FROM "lti_assessment" WHERE "group" = ? LIMIT 1")Command was: SELECT * FROM "lti_assessment" WHERE "group" = ?

...

When examining the issue with a debugger it seems that group_external_group($group) is called with an integer instead of a string, so it means that record_exists('lti_assessment', 'group', $group->id) is called with the wrong value (as $group->id does not exist).

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "22.10_DEV" branch: https://reviews.mahara.org/c/mahara/+/13867

Laurent (laurentdcall)
description: updated
Revision history for this message
Mahara Bot (dev-mahara) wrote :
summary: - Error releasing submissions - Mahara 22.10.0
+ Error releasing submissions
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/c/mahara/+/13868
Committed: https://git.mahara.org/mahara/mahara/commit/94c6d0cbd526a505f6e9c631060cbc87eb973447
Submitter: "Robert Lyon <email address hidden>"
Branch: main

commit 94c6d0cbd526a505f6e9c631060cbc87eb973447
Author: Laurent David <email address hidden>
Date: Tue Mar 21 18:50:14 2023 +0100

Bug 2012419: Error releasing submissions

Fix an issue with the $group parameter when calling group_external_group
with an integer identifier

Change-Id: I5acd1c1bcfb94f03947903acf88b2b97e40380f5

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

Reviewed: https://reviews.mahara.org/c/mahara/+/13867
Committed: https://git.mahara.org/mahara/mahara/commit/6112219aadb32ceb6cba270dd0bcdec414af414c
Submitter: "Robert Lyon <email address hidden>"
Branch: 22.10_DEV

commit 6112219aadb32ceb6cba270dd0bcdec414af414c
Author: Laurent David <email address hidden>
Date: Tue Mar 21 18:50:14 2023 +0100

Bug 2012419: Error releasing submissions

Fix an issue with the $group parameter when calling group_external_group
with an integer identifier

Change-Id: I5acd1c1bcfb94f03947903acf88b2b97e40380f5

Robert Lyon (robertl-9)
Changed in mahara:
milestone: 23.04.0 → none
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
no longer affects: mahara
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.