forked from filipg/gonito
filtre out closed courses in achievements
This commit is contained in:
parent
d4d4d4c5ad
commit
ab76d28b43
@ -45,7 +45,8 @@ postAchievementsR = do
|
|||||||
doAchievements mUser formWidget formEnctype = do
|
doAchievements mUser formWidget formEnctype = do
|
||||||
achievements <- runDB $ selectList [] [Asc AchievementName]
|
achievements <- runDB $ selectList [] [Asc AchievementName]
|
||||||
mUser <- maybeAuth
|
mUser <- maybeAuth
|
||||||
achievementInfos <- runDB $ mapM (getAchievementInfo mUser) achievements
|
achievementInfos' <- runDB $ mapM (getAchievementInfo mUser) achievements
|
||||||
|
let achievementInfos = Import.filter (not . courseClosed . entityVal . achievementInfoCourse) achievementInfos'
|
||||||
|
|
||||||
tagsAvailableAsJSON <- runDB $ getAvailableTagsAsJSON
|
tagsAvailableAsJSON <- runDB $ getAvailableTagsAsJSON
|
||||||
|
|
||||||
|
@ -104,7 +104,8 @@ WorkingOn
|
|||||||
UniqueWorkingOnAchievementUser achievement user
|
UniqueWorkingOnAchievementUser achievement user
|
||||||
Course
|
Course
|
||||||
name Text
|
name Text
|
||||||
code Text Maybe
|
code Text
|
||||||
closed Bool Maybe
|
closed Bool
|
||||||
UniqueCourseName name
|
UniqueCourseName name
|
||||||
|
UniqueCourseCode code
|
||||||
-- By default this file is used in Model.hs (which is imported by Foundation.hs)
|
-- By default this file is used in Model.hs (which is imported by Foundation.hs)
|
||||||
|
Loading…
Reference in New Issue
Block a user