feat: show authorship statement requirement for sheet
also default authorship statements for exam to on iff a default definition exists for the school
This commit is contained in:
parent
34b3e6ae21
commit
5e969825ad
@ -164,4 +164,6 @@ SheetAuthorshipStatementExam: Zugeordnete Prüfung
|
||||
SheetAuthorshipStatementMode: Eigenständigkeitserklärung
|
||||
SheetAuthorshipStatementModeDisabled: Keine Eigenständigkeitserklärungen
|
||||
SheetAuthorshipStatementModeExam: Einstellung folgt Prüfung
|
||||
SheetAuthorshipStatementModeEnabled: Eigenständigkeitserklärungen fordern
|
||||
SheetAuthorshipStatementModeEnabled: Eigenständigkeitserklärungen fordern
|
||||
SheetShowAuthorshipStatementsRequired: Eigenständigkeitserklärungen
|
||||
SheetShowAuthorshipStatementsRequiredYes: Um eine Abgabe anzulegen muss eine Eigenständigkeitserklärung abgegeben werden
|
||||
@ -164,3 +164,5 @@ SheetAuthorshipStatementMode: Statements of Authorship
|
||||
SheetAuthorshipStatementModeDisabled: No Statements of Authorship
|
||||
SheetAuthorshipStatementModeExam: Setting follows exam
|
||||
SheetAuthorshipStatementModeEnabled: Demand Statements of Authorship
|
||||
SheetShowAuthorshipStatementsRequired: Statements of Authorship
|
||||
SheetShowAuthorshipStatementsRequiredYes: To submit for this exercise sheet a Statement of Authorship is required
|
||||
|
||||
@ -169,7 +169,7 @@ examForm (Entity _ Course{..}) template csrf = hoist liftHandler $ do
|
||||
*> case otherMode of
|
||||
SchoolAuthorshipStatementModeOptional -> optionalActionA (fmapAForm (formResultUnOpt mr' MsgSheetAuthorshipStatementContent) $ contentField id)
|
||||
(fslI MsgExamAuthorshipStatementRequired & setTooltip MsgExamAuthorshipStatementRequiredTip)
|
||||
(is _Just . efAuthorshipStatement <$> template)
|
||||
((is _Just . efAuthorshipStatement <$> template) <|> Just (is _Just mSchoolAuthorshipStatement))
|
||||
SchoolAuthorshipStatementModeRequired -> contentField $ setTooltip MsgExamAuthorshipStatementRequiredForcedTip
|
||||
_none -> pure Nothing
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ getSShowR :: TermId -> SchoolId -> CourseShorthand -> SheetName -> Handler Html
|
||||
getSShowR tid ssh csh shn = do
|
||||
now <- liftIO getCurrentTime
|
||||
muid <- maybeAuthId
|
||||
Entity sid sheet <- runDB $ fetchSheet tid ssh csh shn
|
||||
sheetEnt@(Entity sid sheet) <- runDB $ fetchSheet tid ssh csh shn
|
||||
|
||||
seeAllModificationTimestamps <- hasReadAccessTo $ CSheetR tid ssh csh shn SIsCorrR -- ordinary users should not see modification dates older than visibility
|
||||
-- mayEdit <- hasWriteAccessTo $ CSheetR tid ssh csh shn SEditR
|
||||
@ -154,6 +154,7 @@ getSShowR tid ssh csh shn = do
|
||||
return $ notification NotificationBroad =<< messageI Warning MsgSheetSubmissionModeNoneWithoutNotGraded
|
||||
|
||||
sTypeDesc <- runDB $ sheetTypeDescription (sheetCourse sheet) (sheetType sheet)
|
||||
authorshipStatementRequired <- fmap (is _Just) . runDB $ getSheetAuthorshipStatement sheetEnt
|
||||
|
||||
defaultLayout $ do
|
||||
setTitleI $ prependCourseTitle tid ssh csh $ SomeMessage shn
|
||||
|
||||
@ -2453,7 +2453,7 @@ i18nForm strForm onlyAppLanguages miButtonAction miIdent fSettings fRequired mPr
|
||||
= all ((&&) <$> not . null <*> T.all Char.isAlpha) lParts
|
||||
&& not (null lParts)
|
||||
|
||||
(langRes, langView) <- mpopt (hoistField liftHandler langField' & isoField _Unwrapped) (def & addName (nudge "lang")) $ missingLangs liveliness ^? _head
|
||||
(langRes, langView) <- mpreq (hoistField liftHandler langField' & isoField _Unwrapped) (def & addName (nudge "lang")) $ missingLangs liveliness ^? _head
|
||||
|
||||
MsgRenderer mr <- getMsgRenderer
|
||||
let res = langRes <&> \newLang oldLangs -> if
|
||||
|
||||
@ -75,6 +75,11 @@ $# <dt .deflist__dt>
|
||||
$# _{MsgSheetAuthorshipStatementSection}
|
||||
$# <dd .deflist__dd>
|
||||
$# _{maybe MsgSheetAuthorshipStatementIsRequiredFalse (const MsgSheetAuthorshipStatementIsRequiredTrue) (sheetAuthorshipStatement sheet)}
|
||||
$if authorshipStatementRequired
|
||||
<dt .deflist__dt>
|
||||
_{MsgSheetShowAuthorshipStatementsRequired}
|
||||
<dd .deflist__dd>
|
||||
_{MsgSheetShowAuthorshipStatementsRequiredYes}
|
||||
|
||||
$maybe marktxt <- markingText
|
||||
<section>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user