public ActionResult Index(string id) { List <AchievementModel> model = new List <AchievementModel>(); PrepareAchievementModel(model, _achievementService.GetAchievementList(), id); _studentActivityService.InsertActivity("Game.Achievements.List", "ActivityLog.Game.Achievements.List." + id); return(View(model)); }
private void ProcessPlatinumAchievement(Student student) { var achievements = _achievementService.GetAchievementList(); var studentAchievements = _achievementService.GetStudentAchievementList(student.Id); // Remove platinum achievement from comparison achievements.Remove( _achievementService.GetAchievementBySystemName(SystemStudentAchievementNames.EarntAllAchievements)); var comparisionList = achievements.Except(studentAchievements).ToList(); if (comparisionList.Count == 0) { student.AddAchievementHistoryEntry(_achievementService.GetAchievementBySystemName(SystemStudentAchievementNames.EarntAllAchievements)); _studentService.UpdateStudent(student); } }