Skip to content

Add a leaderboard with time-based point calculation for content groups

Daniel Gerhardt requested to merge leaderboard into master

The new leaderboard endpoint returns a list of all users which have participated in any content of the group. Each entry includes the alias object for the user and the total score. If a contentId is set, it also includes the result for the content with points, duration in ms and a flag for correctness.

A duration can now be set for contents. When it is set, answering for the content need to be started explicitly. The duration since answering was started is then stored with answers and used to calculate points.

Endpoints:

/room/{roomId}/contentgroup/{groupId}/leaderboard[?contentId={contentId}]
/room/{roomId}/content/{contentId}/start

Related: particify/dev/common-concerns#66
Depends-on: !777 (merged)

Edited by Daniel Gerhardt

Merge request reports