apluslms / a-plus

A+ frontend portal - A+ LMS documentation:
https://apluslms.github.io/
Other
65 stars 72 forks source link

A+ LTI Tool sends LTI grades to the Platform on non-LTI courses due to leftover LTI session #1297

Closed markkuriekkinen closed 10 months ago

markkuriekkinen commented 10 months ago

If a student has used some A+ course via an LTI Platform like Moodle (A+ as the LTI Tool v1.3) and then the student goes to the normal A+ site to work on another course that does not use LTI, then A+ tries to send LTI grades to the LTI Platform on the other course as well. This causes errors: A+ crashes and the LTI Platform responds with errors to the grading messages (the Platform does not have grade items corresponding to the other course).

Since the student's A+ session includes LTI session ids, A+ thinks that the student is still using the LTI Tool even though the student is now using A+ directly and normally without LTI.

markkuriekkinen commented 10 months ago

Commit https://github.com/apluslms/a-plus/commit/638988cb0bd2f6dc7b042f1d1de76512a057f8e7 resolves this issue in the v1.20_stable branch. It must be fixed in the master branch too. The master branch does not yet include the function has_lti_access_to_course that is used in the commit.

markkuriekkinen commented 10 months ago

By the way, the LTI activity in Moodle must be launched into a new window, not in iframe, so that the LTI session really stays in A+ and can be used later by browsing A+ directly.