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

Custom score screen qset acquisition changes #1575

Closed clpetersonucf closed 2 months ago

clpetersonucf commented 3 months ago

Previously, the qset sent to the score screen was bundled with instance information as part of the widget_instances_get API call. Unfortunately this only ever provided the newest copy of a qset, which poses a problem when reviewing older plays that used older copies of a qset, since the IDs for individual items would not match (if they existed at all).

This PR instead attaches the qset to the response object of widget_instance_play_scores_get, which is called when the score screen requests detailed information for a given play. Since the response object already contains a pair of properties, overview and details, the hope is it makes intuitive sense to attach the qset property adjacent to those. The qset provided will match the qset used in each play.

In addition to updating the score manager's get_play_details method with the above, the additional parameter for widget_instances_get and the associated changes made to support it have been removed.