domain/services/mastery_aggregate library

Functions

aggregateMasteryLevel(Map<String, String> topicIdToMastery) int
Aggregates per-topic mastery levels into a single integer rank suitable for the MasteryRing widget. Used by the domain list and the learner home to summarise a domain at a glance.
countInProgress(Map<String, String> topicIdToMastery) int
Number of topics with any progress (anything other than 'unstarted' and non-'mastery').
countMastered(Map<String, String> topicIdToMastery) int
Number of topics whose mastery is 'mastery'.