adamc@1030: val decision = {Nam = "Decision", adamc@1030: Initialize = None, adamc@1030: Show = fn bo => cdata (case bo of adamc@1030: None => "?" adamc@1030: | Some True => "Accept" adamc@1030: | Some False => "Reject"), adamc@1030: Inject = _} adamc@1030: adamc@1030: functor Make(M : sig adamc@1030: con paperOther :: {Type} adamc@1030: constraint [Id, Decision] ~ paperOther adamc@1030: include Conference.INPUT adamc@1030: where con paper = [Decision = option bool] ++ paperOther adamc@1031: adamc@1032: val status : ctx ::: {Unit} -> [[Body] ~ ctx] => $([Id = paperId] ++ paperOther) adamc@1032: -> transaction (xml ([Body] ++ ctx) [] []) adamc@1030: end) = struct adamc@1030: open M adamc@1030: adamc@1030: val linksForChair = adamc@1030: let adamc@1030: fun makeDecisions () = adamc@1032: ps <- queryX' (SELECT paper.Id, paper.Decision, paper.{{M.paperOther}} adamc@1032: FROM paper adamc@1032: ORDER BY paper.Id) adamc@1032: (fn r => st <- status (r.Paper -- #Decision); adamc@1032: return adamc@1032: {useMore (summarizePaper (r.Paper -- #Id))} adamc@1032: {useMore st} adamc@1032: adamc@1032: adamc@1032: adamc@1032: adamc@1032: adamc@1032: adamc@1032: adamc@1032: ); adamc@1030: return adamc@1030:

Make acceptance decisions

adamc@1030: adamc@1032:
adamc@1032: adamc@1032: adamc@1032: adamc@1032: {ps} adamc@1032:
Paper Status Decision
adamc@1032: adamc@1032: adamc@1032: adamc@1030:
adamc@1032: adamc@1032: and saveDecisions r = adamc@1032: List.app (fn {Paper = pid, Decision = dec} => adamc@1032: dml (UPDATE paper adamc@1032: SET Decision = {[case dec of adamc@1032: "?" => None adamc@1032: | "Accept" => Some True adamc@1032: | "Reject" => Some False adamc@1032: | _ => error Invalid decision code]} adamc@1032: WHERE Id = {[readError pid]})) r.Papers; adamc@1032: makeDecisions () adamc@1030: in adamc@1030: adamc@1030:
  • Make acceptance decisions
  • adamc@1030:
    adamc@1030: end adamc@1030: adamc@1030: val linksForPc = adamc@1030: adamc@1030: con yourPaperTables = [] adamc@1030: constraint [Paper] ~ yourPaperTables adamc@1030: fun joinYourPaper [tabs] [paper] [[Paper] ~ tabs] [[Paper] ~ _] [tabs ~ yourPaperTables] [[Id] ~ paper] adamc@1030: uid (fi : sql_from_items ([Paper = [Id = paperId] ++ paper] ++ tabs)) = fi adamc@1030: end