Unable to delete LTI external app if there is assessments associated with it

Bug #1952362 reported by Robert Lyon
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
Unassigned
22.04
High
Unassigned

Bug Description

To test:

1) Install new site

2) Go to Administration -> Webservices -> External apps and create a new instance of the LTI 1.1 and make note of the instance id

3) Create a new person and make note of the [user id]

4) Log in as that person and create a collection and make note of the [collection id]

5) Normally we'd test this with a connection to an external site but for speed we can insert some info directly to the database - swapping out [instance id]

INSERT INTO lti_assessment (oauthserver, resourcelinkid, contextid, lisoutcomeserviceurl, contexttitle, resourcelinktitle, "group", emailnotifications, lock, archive, timeconfigured) VALUES ([instance id], '123', '107', 'https://example.com', 'Catalyst', 'Mahara assignment', 1, 1, 0, 0, '2019-04-26 07:34:27');

Then select the info from lti_assessment to find the [id from lti]

INSERT INTO lti_assessment_submission (usr, ltiassessment, lisresultsourceid, timesubmitted, grade, timegraded, gradedbyusr, collectionid, viewid) VALUES ([user id], [id from lti], 'this is a test', '2019-04-26 07:38:11', 90, '2019-04-27 07:08:09', 1, [collection id], null);

6) Go to Administration -> Webservices -> External apps and try and delete the external app

Expected - app deleted

Actual - get an SQL error

Robert Lyon (robertl-9)
Changed in mahara:
milestone: none → 22.04.0
status: New → In Progress
importance: Undecided → High
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

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

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/12276
Committed: https://git.mahara.org/mahara/mahara/commit/8a4677354d4a1005f9ca0d9c6247107a0911961c
Submitter: Robert Lyon (<email address hidden>)
Branch: main

commit 8a4677354d4a1005f9ca0d9c6247107a0911961c
Author: Robert Lyon <email address hidden>
Date: Fri Nov 26 11:31:44 2021 +1300

Bug 1952362: Unable to delete an LTI 1.1 external app

When there are submissions added to it

Change-Id: I23b1f6900b9e57fb3f12dcd5ab6ec3c8b2ad6eb3
Signed-off-by: Robert Lyon <email address hidden>

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "20.10_DEV" branch: https://reviews.mahara.org/12373

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

Patch for "21.04_DEV" branch: https://reviews.mahara.org/12374

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

Patch for "21.10_DEV" branch: https://reviews.mahara.org/12375

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/12373
Committed: https://git.mahara.org/mahara/mahara/commit/d00efc46e34381b6d14a3291add044e619db3ab7
Submitter: Robert Lyon (<email address hidden>)
Branch: 20.10_DEV

commit d00efc46e34381b6d14a3291add044e619db3ab7
Author: Robert Lyon <email address hidden>
Date: Fri Nov 26 11:31:44 2021 +1300

Bug 1952362: Unable to delete an LTI 1.1 external app

When there are submissions added to it

Change-Id: I23b1f6900b9e57fb3f12dcd5ab6ec3c8b2ad6eb3
Signed-off-by: Robert Lyon <email address hidden>

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

Reviewed: https://reviews.mahara.org/12374
Committed: https://git.mahara.org/mahara/mahara/commit/325c8dce5028e9eb2509984eb9379fa11ecf8072
Submitter: Robert Lyon (<email address hidden>)
Branch: 21.04_DEV

commit 325c8dce5028e9eb2509984eb9379fa11ecf8072
Author: Robert Lyon <email address hidden>
Date: Fri Nov 26 11:31:44 2021 +1300

Bug 1952362: Unable to delete an LTI 1.1 external app

When there are submissions added to it

Change-Id: I23b1f6900b9e57fb3f12dcd5ab6ec3c8b2ad6eb3
Signed-off-by: Robert Lyon <email address hidden>

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

Reviewed: https://reviews.mahara.org/12375
Committed: https://git.mahara.org/mahara/mahara/commit/40d5a3e1c17c4cacd49acd3b93c4efbf85fb3670
Submitter: Robert Lyon (<email address hidden>)
Branch: 21.10_DEV

commit 40d5a3e1c17c4cacd49acd3b93c4efbf85fb3670
Author: Robert Lyon <email address hidden>
Date: Fri Nov 26 11:31:44 2021 +1300

Bug 1952362: Unable to delete an LTI 1.1 external app

When there are submissions added to it

Change-Id: I23b1f6900b9e57fb3f12dcd5ab6ec3c8b2ad6eb3
Signed-off-by: Robert Lyon <email address hidden>

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers