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

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