CONTEXT Enrollment IN ENGLISH
PURPOSE CONTEXT Enrollment
{+ A complete course consists of several modules.
Students of a course can enroll for any module that is part of the course.
CONCEPT Student "Someone who wants to study at this institute"
{+We have to know what person studies at this institute, so the system needs to keep track of them.+}
CONCEPT Course "A complete course that prepares for a diploma"
{+We have to know what courses there are, so the system needs to keep track of them.+}
CONCEPT Module "An educational entity with a single exam"
{+We have to know what modules exist, so the system needs to keep track of them.+}
-- The relations and the initial population
RELATION takes [Student*Course][TOT]
MEANING "A student takes a complete course"
POPULATION takes CONTAINS
[ ("Peter", "Management")
; ("Susan", "Business IT")
; ("John", "Business IT")
RELATION isPartOf[Module*Course]
MEANING "A module part of a complete course"
POPULATION isPartOf[Module*Course] CONTAINS
[ ("Finance", "Management")
; ("Business Rules", "Business IT")
; ("Business Analytics", "Business IT")
; ("IT-Governance", "Business IT")
; ("IT-Governance", "Management")
RELATION isEnrolledFor [Student*Module]
MEANING "Students enroll for each module in the course separately"
-- The one rule in this model
RULE ModuleEnrollment: isEnrolledFor |- takes;isPartOf~
MEANING "A student can enroll for any module that is part of the course the student takes"
MESSAGE "Attempt to enroll student(s) for a module that is not part of the student's course."
VIOLATION (TXT "Student ", SRC I, TXT " enrolled for the module ", TGT I, TXT " which is not part of the course ", SRC I[Student];takes)
INTERFACE Overview : "_SESSION" cRud
[ Students : V[SESSION*Student] cRuD
[ "Student" : I[Student] cRud
, "Enrolled for" : isEnrolledFor cRUD
, Course : V[SESSION*Course] cRuD
, "Modules" : isPartOf~ CRUD
, Modules : V[SESSION*Module] cRud
, "Course" : isPartOf cRUd
, "Students" : isEnrolledFor~ CRUD