-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmitGradesGeneric.urs
28 lines (22 loc) · 1.39 KB
/
mitGradesGeneric.urs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
(* Assignment of final grades, with export in MIT Online Grades format *)
functor Make(M : sig
con grades :: {Unit}
val grades : $(mapU string grades)
val gfl : folder grades
end) : sig
functor Make(M : sig
con groups :: {Unit}
(* Boolean flags indicating membership in classes of users *)
con others :: {Type}
(* Miscellaneous remaining fields of the users table *)
constraint groups ~ others
constraint [MitId, UserName, IsStudent, IsListener, Units, SubjectNum, SectionNum, LastName, FirstName, MiddleInitial, Grade, Min, Max] ~ (mapU bool groups ++ others)
con keyName :: Name
con otherKeys :: {{Unit}}
constraint [keyName] ~ otherKeys
val users : sql_table ([MitId = string, UserName = string, IsStudent = bool, IsListener = bool, Units = string, SubjectNum = string, SectionNum = string, LastName = string, FirstName = string, MiddleInitial = string] ++ mapU bool groups ++ others) ([keyName = [UserName]] ++ otherKeys)
val grades : Grades.t
(* Current user allowed to access grades interface? *)
val access : transaction FinalGrades.access
end) : Ui.S0
end