ucfopen / Materia

Engage students with easily embedded apps for online courses. Supercharge your course with compelling experiences and game mechanics.
https://ucfopen.github.io/Materia-Docs/
GNU Affero General Public License v3.0
36 stars 34 forks source link

LTI passback data should be stored in DB, not session #1024

Open clpetersonucf opened 7 years ago

clpetersonucf commented 7 years ago

We found a strange edge-case issue where a student launched several widget instances simultaneously, resulting in some LTI passbacks failing to occur. We suspect it may have been due to the intrinsic fragility of session data, since all the LTI launch information is stored in a session data, and that's where the system looks to determine if a passback to Canvas should occur.

Instead, since we already keep the LTI environment data in a play in the log_play table, let's just use that to determine whether or not a passback is needed, and keep from storing launch data in the session, while is known to be volatile. As an added bonus, we should consider adding logs to log_activity indicating if a passback has occurred.

iturgeon commented 5 years ago

LtiEvents::on_score_updated_event looks like it's still relying on the session - we should switch to pulling this from the play launch table