Better keep track of which sets are complete in achievements.#2964
Better keep track of which sets are complete in achievements.#2964somiaj wants to merge 1 commit into
Conversation
drgrice1
left a comment
There was a problem hiding this comment.
Other than minor code quibbles this looks good.
021ac3b to
268d5e3
Compare
|
If a student completes a set, and then that setID is stored as completed because of this commit, and then the instructor unassigns/reassigns the set, will everything be working here as expected? I don't recall what's going on with the |
|
The This was also true before this change, unassiging a set that was complete would not reduce the completed counter. Overall achievements are very fragile to stuff like this. This is just a little more robust than before because it won't allow double counting a set even in the case you describe. |
Store the setID of all completed sets in the globalHash when evaluating achievements. This allows achievements to use this data vs just counting the number of completed sets. One use case is being able to exclude optional sets, such as review sets, from some achievements without completely excluding them from all achievements. In addition saving all the setIDs can avoid a double counting completed sets, as there is currently no check to ensure a set is not counted multiple times.
268d5e3 to
ca1bdcd
Compare
Store the setID of all completed sets in the
globalDatahash when evaluating achievements. This allows achievements to use this data vs just counting the number of completed sets. One use case is being able to exclude optional sets, such as review sets, from some achievements without completely excluding them from all achievements.In addition saving all the setIDs can avoid a double counting completed sets, as there is currently no check to ensure a set is not counted multiple times, and a student can earn the complete N sets achievements by submitting a problem on the same completed set over and over.
This also cleans up some typos in the comments and formats them better.