feat(course): show direct registration dates
This commit is contained in:
parent
d4ab6f64e2
commit
8f284acde8
@ -36,7 +36,8 @@ RegisterTo: Anmeldungen bis
|
|||||||
DeRegUntil: Abmeldungen bis
|
DeRegUntil: Abmeldungen bis
|
||||||
RegisterRetry: Sie wurden noch nicht angemeldet. Drücken Sie dazu den Knopf "Anmelden"
|
RegisterRetry: Sie wurden noch nicht angemeldet. Drücken Sie dazu den Knopf "Anmelden"
|
||||||
|
|
||||||
CourseRegistrationInterval: Anmeldezeitraum
|
CourseRegistrationInterval: Anmeldung
|
||||||
|
CourseDirectRegistrationInterval: Direkte Anmeldung
|
||||||
CourseDeregisterUntil time@Text: Abmeldung nur bis #{time}
|
CourseDeregisterUntil time@Text: Abmeldung nur bis #{time}
|
||||||
|
|
||||||
GenericKey: Schlüssel
|
GenericKey: Schlüssel
|
||||||
|
|||||||
@ -90,11 +90,12 @@ getCShowR tid ssh csh = do
|
|||||||
return (cID, n, visible, files, lastEditText, mayEdit, mayDelete)
|
return (cID, n, visible, files, lastEditText, mayEdit, mayDelete)
|
||||||
return (cid,course,schoolName,participants,registration,lecturers,assistants,correctors,tutors,mAllocation,hasApplicationTemplate,mApplication,news)
|
return (cid,course,schoolName,participants,registration,lecturers,assistants,correctors,tutors,mAllocation,hasApplicationTemplate,mApplication,news)
|
||||||
|
|
||||||
mDereg <- traverse (formatTime SelFormatDateTime) $ courseDeregisterUntil course
|
let mDereg' = maybe id min (allocationOverrideDeregister =<< mAllocation) <$> courseDeregisterUntil course
|
||||||
|
mDereg <- traverse (formatTime SelFormatDateTime) mDereg'
|
||||||
|
|
||||||
cID <- encrypt cid :: Handler CryptoUUIDCourse
|
cID <- encrypt cid :: Handler CryptoUUIDCourse
|
||||||
mAllocation' <- for mAllocation $ \Allocation{..} -> (,)
|
mAllocation' <- for mAllocation $ \alloc@Allocation{..} -> (,)
|
||||||
<$> pure allocationName
|
<$> pure alloc
|
||||||
<*> toTextUrl (AllocationR allocationTerm allocationSchool allocationShorthand AShowR :#: cID)
|
<*> toTextUrl (AllocationR allocationTerm allocationSchool allocationShorthand AShowR :#: cID)
|
||||||
regForm <- if
|
regForm <- if
|
||||||
| is _Just mbAid -> do
|
| is _Just mbAid -> do
|
||||||
|
|||||||
@ -123,11 +123,22 @@ $# $if NTop (Just 0) < NTop (courseCapacity course)
|
|||||||
_{MsgCourseParticipantsCountOf participants capacity}
|
_{MsgCourseParticipantsCountOf participants capacity}
|
||||||
$nothing
|
$nothing
|
||||||
_{MsgCourseParticipantsCount participants}
|
_{MsgCourseParticipantsCount participants}
|
||||||
$maybe (name, url) <- mAllocation'
|
$maybe (Allocation{allocationName, allocationRegisterByCourse}, url) <- mAllocation'
|
||||||
<dt .deflist__dt>_{MsgCourseAllocation}
|
<dt .deflist__dt>_{MsgCourseAllocation}
|
||||||
<dd .deflist__dd>
|
<dd .deflist__dd>
|
||||||
<a href=#{url}>
|
<a href=#{url}>
|
||||||
#{name}
|
#{allocationName}
|
||||||
|
$maybe regFrom <- allocationRegisterByCourse
|
||||||
|
$maybe regFrom' <- courseRegisterFrom course
|
||||||
|
$with regFrom'' <- max regFrom regFrom'
|
||||||
|
$if NTop (Just regFrom'') <= NTop (courseRegisterTo course)
|
||||||
|
<dt .deflist__dt>_{MsgCourseDirectRegistrationInterval}
|
||||||
|
<dd .deflist__dd>
|
||||||
|
<p>
|
||||||
|
^{formatTimeRangeW SelFormatDateTime regFrom'' (courseRegisterTo course)}
|
||||||
|
$maybe dereg <- mDereg
|
||||||
|
<p .emph>
|
||||||
|
_{MsgCourseDeregisterUntil dereg}
|
||||||
$nothing
|
$nothing
|
||||||
$maybe regFrom <- courseRegisterFrom course
|
$maybe regFrom <- courseRegisterFrom course
|
||||||
<dt .deflist__dt>_{MsgCourseRegistrationInterval}
|
<dt .deflist__dt>_{MsgCourseRegistrationInterval}
|
||||||
|
|||||||
Reference in New Issue
Block a user