module Handler.ExternalExam.Users
  ( getEEUsersR, postEEUsersR
  ) where

import Import

import Handler.Utils.ExternalExam.Users

getEEUsersR, postEEUsersR :: TermId -> SchoolId -> CourseName -> ExamName -> Handler Html
getEEUsersR = postEEUsersR
postEEUsersR tid ssh coursen examn = do
  (_, table) <- runDB $ do
    eExam <- getBy404 $ UniqueExternalExam tid ssh coursen examn
    makeExternalExamUsersTable EEUMUsers eExam

  siteLayoutMsg (MsgExternalExamUsers coursen examn) $ do
    setTitleI MsgBreadcrumbExternalExamUsers
    table
