feat(course-visibility): more precise description on CShowR
This commit is contained in:
parent
1ac3c08d01
commit
6fbb2eabf1
@ -116,7 +116,8 @@ TutorialNoCapacity: In dieser Übung sind keine Plätze mehr frei.
|
|||||||
ExamOccurrenceNoCapacity: Zu diesem Termin/Raum sind keine Plätze mehr frei.
|
ExamOccurrenceNoCapacity: Zu diesem Termin/Raum sind keine Plätze mehr frei.
|
||||||
CourseNotEmpty: In diesem Kurs sind momentan Teilnehmer angemeldet.
|
CourseNotEmpty: In diesem Kurs sind momentan Teilnehmer angemeldet.
|
||||||
CourseVisibility: Sichtbarkeit
|
CourseVisibility: Sichtbarkeit
|
||||||
CourseInvisible: Dieser Kurs ist momentan nur für Dozenten, Assistenten, Tutoren, Korrektoren und angemeldete Teilnehmer sichtbar.
|
CourseInvisible: Dieser Kurs ist momentan nur für Dozenten, Assistenten, Tutoren, Korrektoren, angemeldete Teilnehmer und Bewerber sichtbar.
|
||||||
|
CourseInvisibleOverridenByAllocation: Da die Zentralanmeldung, an welcher der Kurs teilnimmt aktuell offen für Bewerbungen ist, wird die Kurssichtbarkeit während der Bewerbungsphase forciert. Außerhalb der Bewerbungsphase ist der Kurs nur für Dozenten, Assistenten, Tutoren, Korrektoren, angemeldete Teilnehmer und Bewerber sichtbar.
|
||||||
CourseRegistration: Kursanmeldung
|
CourseRegistration: Kursanmeldung
|
||||||
CourseRegisterOpen: Anmeldung möglich
|
CourseRegisterOpen: Anmeldung möglich
|
||||||
CourseRegisterOk: Erfolgreich zum Kurs angemeldet
|
CourseRegisterOk: Erfolgreich zum Kurs angemeldet
|
||||||
|
|||||||
@ -116,7 +116,8 @@ TutorialNoCapacity: Tutorial has reached maximum capacity
|
|||||||
ExamOccurrenceNoCapacity: Occurrence/Room has reached maximum capacity
|
ExamOccurrenceNoCapacity: Occurrence/Room has reached maximum capacity
|
||||||
CourseNotEmpty: There are currently no participants enrolled for this course.
|
CourseNotEmpty: There are currently no participants enrolled for this course.
|
||||||
CourseVisibility: Visibility
|
CourseVisibility: Visibility
|
||||||
CourseInvisible: This course is currently only visible to lecturers, assistants, tutors, correctors and enrolled participants.
|
CourseInvisible: This course is currently only visible to lecturers, assistants, tutors, correctors, enrolled participants and applicants.
|
||||||
|
CourseInvisibleOverridenByAllocation: Because the allocation this course participates in is currently open for application, the course visibility is currently forced. After the application phase, the course is only visible to lecturers, assistants, tutors, correctors, enrolled participants and applicants.
|
||||||
CourseRegistration: Enrolment
|
CourseRegistration: Enrolment
|
||||||
CourseRegisterOpen: Enrolment is allowed
|
CourseRegisterOpen: Enrolment is allowed
|
||||||
CourseRegisterOk: Successfully enrolled for course
|
CourseRegisterOk: Successfully enrolled for course
|
||||||
|
|||||||
@ -28,8 +28,8 @@ getCShowR :: TermId -> SchoolId -> CourseShorthand -> Handler Html
|
|||||||
getCShowR tid ssh csh = do
|
getCShowR tid ssh csh = do
|
||||||
mbAid <- maybeAuthId
|
mbAid <- maybeAuthId
|
||||||
now <- liftIO getCurrentTime
|
now <- liftIO getCurrentTime
|
||||||
(cid,course,courseVisible,schoolName,participants,registration,lecturers,assistants,correctors,tutors,mAllocation,hasApplicationTemplate,mApplication,news,events,submissionGroup) <- runDB . maybeT notFound $ do
|
(cid,course,courseVisible,schoolName,participants,registration,lecturers,assistants,correctors,tutors,mAllocation,hasApplicationTemplate,mApplication,news,events,submissionGroup,hasAllocationRegistrationOpen) <- runDB . maybeT notFound $ do
|
||||||
[(E.Entity cid course, E.Value courseVisible, E.Value schoolName, E.Value participants, fmap entityVal -> registration)]
|
[(E.Entity cid course, E.Value courseVisible, E.Value schoolName, E.Value participants, fmap entityVal -> registration, E.Value hasAllocationRegistrationOpen)]
|
||||||
<- lift . E.select . E.from $
|
<- lift . E.select . E.from $
|
||||||
\((school `E.InnerJoin` course) `E.LeftOuterJoin` participant) -> do
|
\((school `E.InnerJoin` course) `E.LeftOuterJoin` participant) -> do
|
||||||
E.on $ E.just (course E.^. CourseId) E.==. participant E.?. CourseParticipantCourse
|
E.on $ E.just (course E.^. CourseId) E.==. participant E.?. CourseParticipantCourse
|
||||||
@ -44,7 +44,7 @@ getCShowR tid ssh csh = do
|
|||||||
numParticipants = E.subSelectCount . E.from $ \part ->
|
numParticipants = E.subSelectCount . E.from $ \part ->
|
||||||
E.where_ $ part E.^. CourseParticipantCourse E.==. course E.^. CourseId
|
E.where_ $ part E.^. CourseParticipantCourse E.==. course E.^. CourseId
|
||||||
E.&&. part E.^. CourseParticipantState E.==. E.val CourseParticipantActive
|
E.&&. part E.^. CourseParticipantState E.==. E.val CourseParticipantActive
|
||||||
return (course, courseIsVisible now course Nothing, school E.^. SchoolName, numParticipants, participant)
|
return (course, courseIsVisible now course Nothing, school E.^. SchoolName, numParticipants, participant, courseAllocationRegistrationOpen now (course E.^. CourseId) Nothing)
|
||||||
staff <- lift . E.select $ E.from $ \(lecturer `E.InnerJoin` user) -> do
|
staff <- lift . E.select $ E.from $ \(lecturer `E.InnerJoin` user) -> do
|
||||||
E.on $ lecturer E.^. LecturerUser E.==. user E.^. UserId
|
E.on $ lecturer E.^. LecturerUser E.==. user E.^. UserId
|
||||||
E.where_ $ lecturer E.^. LecturerCourse E.==. E.val cid
|
E.where_ $ lecturer E.^. LecturerCourse E.==. E.val cid
|
||||||
@ -106,7 +106,7 @@ getCShowR tid ssh csh = do
|
|||||||
return $ submissionGroup E.^. SubmissionGroupName
|
return $ submissionGroup E.^. SubmissionGroupName
|
||||||
let submissionGroup = guardOnM (hasSubmissionGroups && is _Just registration) submissionGroup'
|
let submissionGroup = guardOnM (hasSubmissionGroups && is _Just registration) submissionGroup'
|
||||||
|
|
||||||
return (cid,course,courseVisible,schoolName,participants,registration,lecturers,assistants,correctors,tutors,mAllocation,hasApplicationTemplate,mApplication,news,events,submissionGroup)
|
return (cid,course,courseVisible,schoolName,participants,registration,lecturers,assistants,correctors,tutors,mAllocation,hasApplicationTemplate,mApplication,news,events,submissionGroup,hasAllocationRegistrationOpen)
|
||||||
|
|
||||||
let mDereg' = maybe id min (allocationOverrideDeregister =<< mAllocation) <$> courseDeregisterUntil course
|
let mDereg' = maybe id min (allocationOverrideDeregister =<< mAllocation) <$> courseDeregisterUntil course
|
||||||
mDereg <- traverse (formatTime SelFormatDateTime) mDereg'
|
mDereg <- traverse (formatTime SelFormatDateTime) mDereg'
|
||||||
|
|||||||
@ -136,8 +136,11 @@ $# $if NTop (Just 0) < NTop (courseCapacity course)
|
|||||||
<p>
|
<p>
|
||||||
$maybe visFrom <- courseVisibleFrom
|
$maybe visFrom <- courseVisibleFrom
|
||||||
^{formatTimeRangeW SelFormatDateTime visFrom courseVisibleTo}
|
^{formatTimeRangeW SelFormatDateTime visFrom courseVisibleTo}
|
||||||
$nothing
|
$if NTop (Just now) < NTop courseVisibleFrom
|
||||||
_{MsgCourseInvisible}
|
$if hasAllocationRegistrationOpen
|
||||||
|
_{MsgCourseInvisibleOverridenByAllocation}
|
||||||
|
$else
|
||||||
|
_{MsgCourseInvisible}
|
||||||
|
|
||||||
$maybe (Allocation{allocationName, allocationRegisterByCourse}, url) <- mAllocation'
|
$maybe (Allocation{allocationName, allocationRegisterByCourse}, url) <- mAllocation'
|
||||||
<dt .deflist__dt>_{MsgCourseAllocation}
|
<dt .deflist__dt>_{MsgCourseAllocation}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user