description course model

This commit is contained in:
SJost 2019-03-14 19:30:12 +01:00
parent 7fe091b1ff
commit 0bd4b9b9c2
3 changed files with 39 additions and 34 deletions

View File

@ -39,4 +39,9 @@ User (logged-in)
User (not logged-in)
- can view course descriptions
- can download course materials from courses that allow this for all un-enrolled users
- can requests help from administrators
- can requests help from administrators
Terminology:
- participants: a logged-in users that is enrolled in a specific course

View File

@ -1,51 +1,51 @@
DegreeCourse json
DegreeCourse json -- for which degree programmes this course is appropriate for
course CourseId
degree StudyDegreeId
terms StudyTermsId
UniqueDegreeCourse course degree terms
Course
Course -- Information about a single course; contained info is always visible to all users
name (CI Text)
description Html Maybe
linkExternal Text Maybe
shorthand (CI Text)
term TermId
description Html Maybe -- user-defined large Html, ought to contain module description
linkExternal Text Maybe -- arbitrary user-defined url for external course page
shorthand (CI Text) -- practical shorthand of course name, used for identification
term TermId -- semester this course is taught
school SchoolId
capacity Int64 Maybe
capacity Int64 Maybe -- number of allowed enrolements, if restricted
-- canRegisterNow = maybe False (<= currentTime) registerFrom && maybe True (>= currentTime) registerTo
registerFrom UTCTime Maybe
registerTo UTCTime Maybe
deregisterUntil UTCTime Maybe
registerSecret Text Maybe -- Falls ein Passwort erforderlich ist
materialFree Bool
TermSchoolCourseShort term school shorthand
TermSchoolCourseName term school name
registerFrom UTCTime Maybe -- enrolement allowed from a given day onwwards or prohibited
registerTo UTCTime Maybe -- enrolement may be prohibited from a given date onwards
deregisterUntil UTCTime Maybe -- unenrolement may be prohibited from a given date onwards
registerSecret Text Maybe -- enrolement maybe protected by a simple common passphrase
materialFree Bool -- False: only enrolled users may see course materials not stored in this table
TermSchoolCourseShort term school shorthand -- shorthand must be unique within school and semester
TermSchoolCourseName term school name -- name must be unique within school and semester
deriving Generic
CourseEdit
CourseEdit -- who edited when a row in table "Course", kept indefinitely
user UserId
time UTCTime
course CourseId
CourseFavourite
user UserId
time UTCTime
CourseFavourite -- which user accessed which course when, only displayed to user for convenience;
user UserId -- max number of rows kept per user is user-defined by column 'maxFavourites' in table "User"
time UTCTime -- oldest is removed first
course CourseId
UniqueCourseFavourite user course
deriving Show
Lecturer
Lecturer -- course ownership
user UserId
course CourseId
UniqueLecturer user course
CourseParticipant
UniqueLecturer user course -- note: multiple lecturers per course are allowed, but no duplicated rows in this table
CourseParticipant -- course enrolement
course CourseId
user UserId
registration UTCTime
field StudyFeaturesId Maybe
registration UTCTime -- time of last enrolement for this course
field StudyFeaturesId Maybe -- associated degree course, user-defined; required for communicating grades
UniqueParticipant user course
CourseUserNote
CourseUserNote -- lecturers of a specific course may share a text note on each enrolled student
course CourseId
user UserId
note Text
note Text -- arbitrary user-defined text; visible only to lecturer of this course
UniqueCourseUserNotes user course
CourseUserNoteEdit
CourseUserNoteEdit -- who edited a participants course note whenl
user UserId
time UTCTime
note CourseUserNoteId

View File

@ -15,14 +15,14 @@ User Json -- Each Uni2work user has a corresponding row in this table; create
email (CI Text) -- Case-insensitive eMail address
displayName Text -- we only show LDAP-DisplayName, and highlight LDAP-Surname within (appended if not contained)
surname Text -- Display user names always through 'nameWidget displayName surname'
maxFavourites Int default=12 -- Number of last used course names to be remembered for quick links for convenience
theme Theme default='Default' -- Color-theme of the frontend, chosen by user
dateTimeFormat DateTimeFormat "default='%a %d %b %Y %R'" -- preferred Date+Time display format for user
dateFormat DateTimeFormat "default='%d.%m.%Y'" -- preferred Date-only display format for user
timeFormat DateTimeFormat "default='%R'" -- preferred Time-only display format for user
maxFavourites Int default=12 -- max number of rows with this userId in table "CourseFavourite"; for convenience links; user-defined
theme Theme default='Default' -- Color-theme of the frontend; user-defined
dateTimeFormat DateTimeFormat "default='%a %d %b %Y %R'" -- preferred Date+Time display format for user; user-defined
dateFormat DateTimeFormat "default='%d.%m.%Y'" -- preferred Date-only display format for user; user-defined
timeFormat DateTimeFormat "default='%R'" -- preferred Time-only display format for user; user-defined
downloadFiles Bool default=false -- Should files be opened in browser or downloaded? (users often oblivious that their browser has a setting for this)
mailLanguages MailLanguages default='[]' -- Preferred language for eMail; i18n not yet implemented
notificationSettings NotificationSettings -- Bit-array for which events email notifications are requested by user
mailLanguages MailLanguages default='[]' -- Preferred language for eMail; i18n not yet implemented; user-defined
notificationSettings NotificationSettings -- Bit-array for which events email notifications are requested by user; user-defined
UniqueAuthentication ident -- Column 'ident' can be used as a row-key in this table
UniqueEmail email -- Column 'email' can be used as a row-key in this table
deriving Show Eq Generic -- Haskell-specific settings for runtime-value representing a row in memory