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
37 stars 32 forks source link

Some LTI scores are not passed back due to score screen URL race condition #1558

Closed clpetersonucf closed 3 months ago

clpetersonucf commented 6 months ago

Score passback is not occurring in the following edge case:

  1. Students are playing widgets in an LTI context
  2. Students complete a widget and then select Play Again to begin a new session immediately afterwards
  3. The token GET parameter, assigned at the start of the subsequent play, is sometimes missing from the score screen URL the students are navigated to. The LTI event hook in FuelPHP that looks for score updates doesn't see the token parameter, and thus doesn't send anything back to the LTI provider.

We put a lot of work into the widget player to ensure logs are immutable, queued properly, and transmitted properly before a play is finished. If played in an LTI context, a score_url property is included in the response from play_logs_save when the end log is received. However, score screen URLs are saved on a different state object, and under certain circumstances the scoreScreenURL state value is not updated before window.location.assign(scoreScreenURL) is called.

clpetersonucf commented 3 months ago

Resolved in #1559