def set_for_user(self, qt): save = [] from ranking.methods import TopicLevelData, ProficiencyLevelData ptl = TopicLevelData() save.extend(ptl.set(qt)) pl = ProficiencyLevelData() save.extend(pl.set(qt)) db.put(save) return save
def set_all(self): # Set levels for all users -- this can't *actually* be used. return # Deprecated from ranking.methods import TopicLevelData, ProficiencyLevelData quiz_takers = QuizTaker.all().fetch(1000) # this can only do a thousand at a time ptl = TopicLevelData() for qt in quiz_takers: ptl.set(qt) pl = ProficiencyLevelData() for qt in quiz_takers: pl.set(qt)