Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LTI Tool v1.3: add LTI grading support for Acos exercises (AJAX submission) #1154

Closed
markkuriekkinen opened this issue Jan 20, 2023 · 2 comments · Fixed by #1166
Closed

LTI Tool v1.3: add LTI grading support for Acos exercises (AJAX submission) #1154

markkuriekkinen opened this issue Jan 20, 2023 · 2 comments · Fixed by #1166
Assignees
Labels
area: LTI LTI protocol (Learning Tools Interoperability, worldwide standard) area: points/grade Includes points and grader per user and for all effort: weeks Estimated to take less than one month, from the creation of a new branch to the merging experience: moderate required knowledge estimate requester: team The issue is raised by a person inside the A+ developer team type: feature New feature or change to a feature
Milestone

Comments

@markkuriekkinen
Copy link
Contributor

Pull request #1104 added the LTI Tool v1.3 feature to A+. However, the LTI gradebook integration does not yet include assignments that submit the final (graded) solution directly to the grader backend (via AJAX), which then forwards it to the A+ front (including the submission and grading data as well as the feedback and points). For example, Acos and JSAV. The A+ front creates the submission in the database only in the end and attaches the points at the same time.

A+ code where Acos grading is received and the submission is created:

status, errors, students = self.exercise.check_submission_allowed(student)
if status != self.exercise.SUBMIT_STATUS.ALLOWED:
return Response({'success': False, 'errors': errors})
submission = Submission.objects.create(exercise=self.exercise)
submission.submitters.set(students)
# grade and update submission with data
return Response(_post_async_submission(request, self.exercise, submission, errors))

The API endpoint above matches the submission_url argument of the A+ grader protocol when A+ retrieves the assignment description from the grader (HTTP GET):
https://github.com/apluslms/a-plus/blob/6f7da8cbc52ef01da1799097f7cf737e99b05862/doc/GRADERS.md

@markkuriekkinen markkuriekkinen added type: feature New feature or change to a feature area: LTI LTI protocol (Learning Tools Interoperability, worldwide standard) effort: weeks Estimated to take less than one month, from the creation of a new branch to the merging experience: moderate required knowledge estimate requester: team The issue is raised by a person inside the A+ developer team area: points/grade Includes points and grader per user and for all labels Jan 20, 2023
@markkuriekkinen markkuriekkinen moved this to In Progress in A+ sprints Jan 20, 2023
@PasiSa PasiSa moved this from In Progress to Under review in A+ sprints Mar 21, 2023
@markkuriekkinen markkuriekkinen added this to the v1.18 milestone Mar 22, 2023
@markkuriekkinen
Copy link
Contributor Author

@markkuriekkinen markkuriekkinen changed the title LTI Tool v1.3: add LTI grading support for Acos and JSAV exercises (AJAX submission) LTI Tool v1.3: add LTI grading support for Acos exercises (AJAX submission) Apr 11, 2023
markkuriekkinen pushed a commit to murhum1/a-plus that referenced this issue Apr 11, 2023
When the A+ LTI Tool v1.3 feature was added in v1.18,
there was no support yet for the LTI grading of Acos server
assignments. Now, those grades can be sent to the LTI Platform.

Short description of the implementation:

- When the A+ front retrieves the exercise description from
  the exercise service, the HTTP GET request includes an extra
  parameter `lti_launch_id` if the user's current session includes
  LTI parameters from an LTI v1.3 launch (to A+ as the LTI Tool).
- The Aplus protocol at the Acos server
  (acos-server/acos-aplus#8) is modified
  so that it will store the LTI launch id parameter in
  the user's browser in a hidden HTML  `<input>` element.
- Acos server forwards the LTI launch parameter to the A+ front
  when the exercise submission is sent to the Acos server.
- When A+ receives the graded submission from the Acos server,
  A+ stores the LTI launch id in the submission `meta_data` field.
  The LTI launch id is then used to send the grade to
  the LTI Platform.

Fixes apluslms#1154
markkuriekkinen pushed a commit that referenced this issue Apr 11, 2023
When the A+ LTI Tool v1.3 feature was added in v1.18,
there was no support yet for the LTI grading of Acos server
assignments. Now, those grades can be sent to the LTI Platform.

Short description of the implementation:

- When the A+ front retrieves the exercise description from
  the exercise service, the HTTP GET request includes an extra
  parameter `lti_launch_id` if the user's current session includes
  LTI parameters from an LTI v1.3 launch (to A+ as the LTI Tool).
- The Aplus protocol at the Acos server
  (acos-server/acos-aplus#8) is modified
  so that it will store the LTI launch id parameter in
  the user's browser in a hidden HTML  `<input>` element.
- Acos server forwards the LTI launch parameter to the A+ front
  when the exercise submission is sent to the Acos server.
- When A+ receives the graded submission from the Acos server,
  A+ stores the LTI launch id in the submission `meta_data` field.
  The LTI launch id is then used to send the grade to
  the LTI Platform.

Fixes #1154
@github-project-automation github-project-automation bot moved this from Under review to Done in A+ sprints Apr 11, 2023
markkuriekkinen pushed a commit to murhum1/acos-aplus that referenced this issue Apr 11, 2023
If the A+ front sends the parameter `lti_launch_id` when
loading the assignment, then Acos-aplus adds the parameter to
the assignment iframe content in a hidden HTML `<input>` element.
When the student submits a solution, the LTI launch id is also
sent back to the A+ front in the grading data/payload.

Part of the issue
apluslms/a-plus#1154
markkuriekkinen pushed a commit to acos-server/acos-aplus that referenced this issue Apr 11, 2023
If the A+ front sends the parameter `lti_launch_id` when
loading the assignment, then Acos-aplus adds the parameter to
the assignment iframe content in a hidden HTML `<input>` element.
When the student submits a solution, the LTI launch id is also
sent back to the A+ front in the grading data/payload.

Part of the issue
apluslms/a-plus#1154
@markkuriekkinen
Copy link
Contributor Author

This was fixed by slightly changing the Aplus protocol in the Acos server. Thus, the fix does not immediately help with JSAV assignments.

markkuriekkinen pushed a commit to markkuriekkinen/a-plus that referenced this issue Jun 2, 2023
When the A+ LTI Tool v1.3 feature was added in v1.18,
there was no support yet for the LTI grading of Acos server
assignments. Now, those grades can be sent to the LTI Platform.

Short description of the implementation:

- When the A+ front retrieves the exercise description from
  the exercise service, the HTTP GET request includes an extra
  parameter `lti_launch_id` if the user's current session includes
  LTI parameters from an LTI v1.3 launch (to A+ as the LTI Tool).
- The Aplus protocol at the Acos server
  (acos-server/acos-aplus#8) is modified
  so that it will store the LTI launch id parameter in
  the user's browser in a hidden HTML  `<input>` element.
- Acos server forwards the LTI launch parameter to the A+ front
  when the exercise submission is sent to the Acos server.
- When A+ receives the graded submission from the Acos server,
  A+ stores the LTI launch id in the submission `meta_data` field.
  The LTI launch id is then used to send the grade to
  the LTI Platform.

Fixes apluslms#1154
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: LTI LTI protocol (Learning Tools Interoperability, worldwide standard) area: points/grade Includes points and grader per user and for all effort: weeks Estimated to take less than one month, from the creation of a new branch to the merging experience: moderate required knowledge estimate requester: team The issue is raised by a person inside the A+ developer team type: feature New feature or change to a feature
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants