This shows you the differences between two versions of the page.
stats:schema:exercise [2011/09/28 20:12] Patrick Michel [Group Management] |
stats:schema:exercise [2013/07/10 12:49] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Exercise Groups, Sheets and Management ====== | ||
- | |||
- | This page describes a major part of the [[:stats:start]] [[:stats:schema]], namely the exercise management, including groups, sheets and student results. | ||
- | |||
- | ===== Schema ===== | ||
- | |||
- | <code xcend> | ||
- | element exercises { | ||
- | element exercise * id { | ||
- | attribute lecture { string } | ||
- | attribute term { string } | ||
- | |||
- | element assistant * account {[ exists //accounts/account[./account] ]} | ||
- | element groups { | ||
- | element group * id { [ count(./id, ..exercise/students/student/group) < ./maxSize ] | ||
- | attribute day { "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday" | "Sunday" } | ||
- | attribute time { string } | ||
- | attribute location { string } | ||
- | attribute maxSize { integer [ . >= 0 ]} | ||
- | |||
- | element tutor * account {[ exists //accounts/account[./account] ]} | ||
- | } | ||
- | } | ||
- | element sheets { | ||
- | element sheet * id { | ||
- | attribute maxPoints { double [ . >= 0 ]} | ||
- | } | ||
- | } | ||
- | element students { | ||
- | element student * id { [ exists //accounts/account/student[./id] ] | ||
- | attribute group ? { ident [ exists ..exercise/groups/group[.] ]} | ||
- | element result * sheet { [ exists ..exercise/sheets/sheet[./sheet] ] | ||
- | attribute points { double [ . >= 0 && . <= ..exercise/sheets/sheet[../sheet]/maxPoints ]} | ||
- | } | ||
- | } | ||
- | } | ||
- | } | ||
- | } | ||
- | </code> | ||
- | |||
- | ===== Procedures ===== | ||
- | |||
- | ==== Change Attributes ==== | ||
- | |||
- | {{page>stats:proc:changeAttributes (Exercise)&noheader&nofooter}} | ||
- | |||
- | |||
- | ==== Assistant Management ==== | ||
- | |||
- | The procedures from [[:stats:schema:account]] for the assistant role can be directly reused. | ||
- | |||
- | {{page>stats:proc:grantAssistantRights&noheader&nofooter}} | ||
- | |||
- | {{page>stats:proc:revokeAssistantRights&noheader&nofooter}} | ||
- | |||
- | ==== Group Management ==== | ||
- | |||
- | The tutor role from section [[:stats:schema:account]] and the students depend on groups, which restricts deletion. | ||
- | |||
- | {{page>stats:proc:createGroup&noheader&nofooter}} | ||
- | |||
- | {{page>stats:proc:deleteGroup&noheader&nofooter}} | ||
- | |||
- | |||
- | === Group Procedures === | ||
- | |||
- | {{page>stats:proc:changeAttributes (Group)&noheader&nofooter}} | ||
- | |||
- | ==== Sheet Management ==== | ||
- | |||
- | The student results depend on sheets. | ||
- | |||
- | {{page>stats:proc:createSheet&noheader&nofooter}} | ||
- | |||
- | {{page>stats:proc:deleteSheet&noheader&nofooter}} | ||
- | |||
- | ==== Student Management ==== | ||
- | |||
- | Students themselves depend on an account, but nothing depends on them; Their results stand for themselves. | ||
- | |||
- | {{page>stats:proc:addStudent&noheader&nofooter}} | ||
- | |||
- | {{page>stats:proc:removeStudent&noheader&nofooter}} | ||