assignedReviews :: Assignment -> IO [ReviewAssignment]
assignedReviews a = databaseProviderReviews $ do
    reviews <- selectList [ReviewAssignmentAssignment ==. a] []
    liftIO $ return $ map unwrapEntity reviews


-- | Retrieves all ReviewAssignments for an Assignment and
-- | a UserIdentifier, i.e. all the reviews for that assigment
-- | the user has to perform.
assignedReviews :: Assignment -> IO [ReviewAssignment]
assignedReviews a = databaseProviderReviews $ do
    reviews <- selectList [ReviewAssignmentAssignment ==. a] []
    liftIO $ return $ map unwrapEntity reviews


-- | Retrieves all ReviewAssignments for an Assignment and
-- | a UserIdentifier, i.e. all the reviews for that assigment
-- | the user has to perform.
assignedReviews a = databaseProviderReviews $ do
    reviews <- selectList [ReviewAssignmentAssignment ==. a] []
    liftIO $ return $ map unwrapEntity reviews


-- | Retrieves all ReviewAssignments for an Assignment and
-- | a UserIdentifier, i.e. all the reviews for that assigment
-- | the user has to perform.