Need separate string for revoked LTI submissions

Bug #1972922 reported by Kristina Hoeppner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
21.10
Fix Released
High
Unassigned
22.04
Fix Released
High
Unassigned
22.10
Fix Released
High
Robert Lyon

Bug Description

In bug #1970693 a missing string was added for LTI submissions. That string is followed by "Your last submission of this portfolio or the group task has no evaluation result. Contact your instructor for solving this issue. Your submission was automatically released."

That string is specific to group submissions. There, students cannot revoke their own submissions. Only the instructor can give it back to students and can fix the problem if they forgot to give a result. In the case of LTI though, an instructor couldn't do anything as they can't see the portfolio any more. Therefore, the strings should be separated, depending on where the submission was made: Regular Mahara group with the submissions module in use or LTI 1.1 submission where a fake group is created to faciliate the submissions process. The later is not an actual real group though and thus doesn't use the submissions management workflow.

For LTI, it should be possible for a student to revoke their submission and resubmit the portfolio without an error message as expectedly, there wouldn't have been an evaluation.

To replicate the group submission workflow (needed for testing that the correct string is displayed once changes have been made):

1. As group admin with staff or inst. / site admin permissions, create a group in Mahara that allows submissions.
2. Submit a page as a regular group member.
3. As group admin, release the page, but do not select a result.
4. As group member, submit the same portfolio to the group again.

Expected and actual result: You get the error message: Your last submission of this portfolio or the group task has no evaluation result. Contact your instructor for solving this issue. Your submission was automatically released.

5. As group admin, change the result to 'Revise' and update the status so that it then says 'Released'.
6. As group member, submit the same page again.

Expected and actual result: The page is submitted correctly.

To replicate the LTI submission workflow:

1. In the LMS, set up LTI 1.1, e.g. in Moodle via the 'External tool' option and complete the configuration by clicking the link.
2. As student, click the link in the LMS, which takes you to Mahara where you can submit a portfolio.
3. Immediately revoke that submission.
4. Immediately, resubmit the portfolio.

Results:
- Expected: You can just resubmit the portfolio.
- Actual: You see an error message: ... Your last submission of this portfolio or the group task has no evaluation result. Contact your instructor for solving this issue. Your submission was automatically released.

This last sentence is the same as the one that you see above for the group submission, but you shouldn't get an error message at all. This only prevents you from resubmitting a portfolio.

Tags: bite-sized
tags: added: bite-sized
Revision history for this message
Robert Lyon (robertl-9) wrote (last edit ):

Hmm, odd we only get this error if we go through the PluginModuleSubmissions::add_submission() function. And the 2 calls to this function are wrapped in a check that a group id exists.

Ah, reading the bug report again it sounds like we need to somehow differentiate the add submission when dealing with an internal group versus dealing with a 'fake' LTI group when Submissions plugin is active.

Looking at the 'lti_assessment' table there is a 'group' column we can use - so if the id of the group we are dealing with is not listed there then it's not an LTI group.

So we to change the places from:

if (PluginModuleSubmissions::is_active() && $group) { ... }

To something along the lines of:

if (PluginModuleSubmissions::is_active() && $group !group_external_group($group)) { ... }

and have a new function in lib/groups.php file:

function group_external_group($group) {
    if (is_str($group)) {
      $group = get_record('group', 'id', $group);
   }
   if (record_exists('lti_assessment', 'group', $group->id)) {
      return true;
  }
  return false;
}

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

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

commit 374b14dcffc2e320c9a1482303ae8d3a64d538e1
Author: Robert Lyon <email address hidden>
Date: Wed Sep 7 09:50:40 2022 +1200

Bug 1972922: Ignore LTI groups from submission plugin workflow

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

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

Patch for "22.04_DEV" branch: https://reviews.mahara.org/c/mahara/+/13148

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

Patch for "21.10_DEV" branch: https://reviews.mahara.org/c/mahara/+/13149

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

Reviewed: https://reviews.mahara.org/c/mahara/+/13149
Committed: https://git.mahara.org/mahara/mahara/commit/048b14632c0dd89b1510d548a1f0a7dfef3af4bb
Submitter: "Robert Lyon <email address hidden>"
Branch: 21.10_DEV

commit 048b14632c0dd89b1510d548a1f0a7dfef3af4bb
Author: Robert Lyon <email address hidden>
Date: Wed Sep 7 09:50:40 2022 +1200

Bug 1972922: Ignore LTI groups from submission plugin workflow

Change-Id: I295195df06ce633212144fb5dc4c1f83d05248e9
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 374b14dcffc2e320c9a1482303ae8d3a64d538e1)

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

Reviewed: https://reviews.mahara.org/c/mahara/+/13148
Committed: https://git.mahara.org/mahara/mahara/commit/aaf0444912e244a5e616fa785dd8eb93da51afbc
Submitter: "Robert Lyon <email address hidden>"
Branch: 22.04_DEV

commit aaf0444912e244a5e616fa785dd8eb93da51afbc
Author: Robert Lyon <email address hidden>
Date: Wed Sep 7 09:50:40 2022 +1200

Bug 1972922: Ignore LTI groups from submission plugin workflow

Change-Id: I295195df06ce633212144fb5dc4c1f83d05248e9
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 374b14dcffc2e320c9a1482303ae8d3a64d538e1)

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.