Introduce data model change to add achievements
See original GitHub issueThe goal of my bachelor thesis is to integrate gamification with achievements into Artemis (Proposal on Confluence page).
Achievements should be introduced as a new entity with properties as seen in the model down below: a title, a description, an icon, and a rank. The title and description are used to describe the achievement while the icon would be used to display an achievement in the browser. The rank should represent the degree of difficulty of attaining an achievement, gold could represent the highest level, silver and bronze the levels below. For example “Score a 100% in an exercise” would be golden rank. At the beginning the few achievements should be predefined, but later there could be the possibility to add more new ones.
Now a user can receive several achievements while using artemis throughout the semester and an achievement may have been received by several users. For example user A can hold achievements “Score a 100% in an exercise” and “Hand in your solution within the first day of the exercise´s release” while user B holds achievements “Score a 100% in an exercise” and “Hand in 3 submissions in a row”. So in this case it would make sense to link the achievement entity to the already existing user entity by a many-to-many mapping. Also the user should be able to access the list of the achievements he/she earned so far.
For the courses the link to achievements is quite similar: the courses should be able to give an overview of which achievements can be achieved within the course. Also in one course several achievements can be achieved by users and one achievement can possibly be achieved in several courses. For example course A could contain achievements “Score a 100% in an exercise” and “Hand in your solution within the first day of the exercise´s release” while course B contains achievements “Score a 100% in an exercise” and “Hand in 3 submissions in a row”. So this link can also be modeled by a many-to-many mapping.
To realize this on database level, we need a new table achievement
, which persists all achievements contained in Artemis with their attributes and a table user_achievement
which links achievements to users by their respective IDs. Once again the same goes for courses only that the connecting table for that would be course_achievement
with columns course_id
and achievement_id
.
Alternative Options
- Omit the display of all accessible achievements in a course to make it more like a hidden easter egg hunt.
- Link achievements to exercises to be able to show which achievements can be achieved on an exercise level.
- Link achievements to participations, submissions and/or results to have further information about the submission/participation/result by which the achievement was obtained.
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (8 by maintainers)
Top GitHub Comments
The checks can be very different depending on what kind of achievement we are talking about, point based (reach 80% of the points), time based (submit your work within 3 days) or progress based (work on your first exercise, hand in three submissions in a row). My approach would be to check certain parameters of the submissions/results mainly after the assessment. Regarding your suggestion for checks on point based achievements that was quite my idea 😄 And I would define criteria like this in code for more flexibility, but it could also make sense to store them in the database. So that´s actually a good point.
I like your proposed changes and the way you presented them. It doesn’t change existing entities and can be extended by links to other entities for more specific achievements as described in alternative options. Good job! How are you planning to check, if an user has earned an achievements? For the example ‘Score a XX% in an exercise’ XX could be 80 for bronze, 90 for silver and 100 for gold. This mapping must be defined either in code or in the database. Do you think it would make sense store these kinds of conditions in the database or do you need more flexibility for more creative achievements?