hpi-schul-cloud / gamification

A reusable microservice for gamification.
GNU Affero General Public License v3.0
45 stars 18 forks source link

Introduce maxAwardedTotal achievement rule option #57

Closed cmfcmf closed 6 years ago

cmfcmf commented 6 years ago

This splits the maxAwarded option into two: maxAwarded and maxAwardedTotal, like discussed in #27. maxAwarded works as before, but maxAwardedTotal now looks at the total amount of the particular achievement ever granted to the user. This is achieved (hehe) by splitting the amount database field in the achievements table into current_amount and total_amount. current_amount is set to 0 when the achievement is replaced by another achievement, but total_amount only counts upwards. This makes replaces a bit more useful.

cmfcmf commented 6 years ago

@frederike-ramin could you please review again? We also need another reviewer, maybe @KBorchar?

coveralls commented 6 years ago

Pull Request Test Coverage Report for Build 92


Totals Coverage Status
Change from base Build 88: 0.5%
Covered Lines: 297
Relevant Lines: 301

💛 - Coveralls
cmfcmf commented 6 years ago

This is ready for another review.