Need separate string for revoked LTI submissions
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.
Hmm, odd we only get this error if we go through the PluginModuleSub missions: :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 (PluginModuleSu bmissions: :is_active( ) && $group) { ... }
To something along the lines of:
if (PluginModuleSu bmissions: :is_active( ) && $group !group_ external_ group($ group)) { ... }
and have a new function in lib/groups.php file:
function group_external_ group($ group) { exists( 'lti_assessment ', 'group', $group->id)) {
if (is_str($group)) {
$group = get_record('group', 'id', $group);
}
if (record_
return true;
}
return false;
}