diff --git a/ChangeLog.md b/ChangeLog.md index c50e244b7..e45c75736 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,3 +1,9 @@ + * Version 10.05.2019 + + Besseres Interface zum Einstellen von Abgebenden + + Download von allen Dateien pro Kursmaterial/Übungsblatt + * Version 04.05.2019 Kursmaterial diff --git a/messages/uniworx/de.msg b/messages/uniworx/de.msg index f6de18a46..39bd3310d 100644 --- a/messages/uniworx/de.msg +++ b/messages/uniworx/de.msg @@ -790,6 +790,7 @@ MenuCorrectionsGrade: Abgaben bewerten MenuAuthPreds: Authorisierungseinstellungen MenuTutorialDelete: Tutorium löschen MenuTutorialEdit: Tutorium editieren +MenuTutorialComm: Mitteilung an Teilnehmer AuthPredsInfo: Um eigene Veranstaltungen aus Sicht der Teilnehmer anzusehen, können Veranstalter und Korrektoren hier die Prüfung ihrer erweiterten Berechtigungen temporär deaktivieren. Abgewählte Prädikate schlagen immer fehl. Abgewählte Prädikate werden also nicht geprüft um Zugriffe zu gewähren, welche andernfalls nicht erlaubt wären. Diese Einstellungen gelten nur temporär bis Ihre Sitzung abgelaufen ist, d.h. bis ihr Browser-Cookie abgelaufen ist. Durch Abwahl von Prädikaten kann man sich höchstens temporär aussperren. AuthPredsActive: Aktive Authorisierungsprädikate diff --git a/src/Foundation.hs b/src/Foundation.hs index e6202d49a..f9f837606 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -2029,6 +2029,14 @@ pageActions (CTutorialR tid ssh csh tutn TEditR) = ] pageActions (CTutorialR tid ssh csh tutn TUsersR) = [ MenuItem + { menuItemType = PageActionPrime + , menuItemLabel = MsgMenuTutorialComm + , menuItemIcon = Nothing + , menuItemRoute = SomeRoute $ CTutorialR tid ssh csh tutn TCommR + , menuItemModal = False + , menuItemAccessCallback' = return True + } + , MenuItem { menuItemType = PageActionPrime , menuItemLabel = MsgMenuTutorialEdit , menuItemIcon = Nothing diff --git a/src/Handler/Course.hs b/src/Handler/Course.hs index ef52f3c9a..6fcc56968 100644 --- a/src/Handler/Course.hs +++ b/src/Handler/Course.hs @@ -342,7 +342,7 @@ getCShowR tid ssh csh = do dbtProj = return dbtColonnade = dbColonnade $ mconcat [ sortable (Just "type") (i18nCell MsgTutorialType) $ \DBRow{ dbrOutput = Entity _ Tutorial{..} } -> textCell $ CI.original tutorialType - , sortable (Just "name") (i18nCell MsgTutorialName) $ \DBRow{ dbrOutput = Entity _ Tutorial{..} } -> indicatorCell <> textCell (CI.original tutorialName) + , sortable (Just "name") (i18nCell MsgTutorialName) $ \DBRow{ dbrOutput = Entity _ Tutorial{..} } -> indicatorCell <> anchorCell (CTutorialR tid ssh csh tutorialName TUsersR) [whamlet|#{tutorialName}|] , sortable Nothing (i18nCell MsgTutorialTutors) $ \DBRow{ dbrOutput = Entity tutid _ } -> sqlCell $ do tutTutors <- fmap (map $(unValueN 3)) . E.select . E.from $ \(tutor `E.InnerJoin` user) -> do E.on $ tutor E.^. TutorUser E.==. user E.^. UserId diff --git a/src/Handler/Submission.hs b/src/Handler/Submission.hs index 080ac9667..74e1e92e1 100644 --- a/src/Handler/Submission.hs +++ b/src/Handler/Submission.hs @@ -364,7 +364,6 @@ submissionHelper tid ssh csh shn mcid = do (FormFailure failmsgs) -> return $ FormFailure failmsgs -- #227 Part II: no longer ignore submitter, if the user is lecturer or admin (allow lecturers to submit for their students) (FormSuccess res'@(_, groupMembers)) - | Set.null groupMembers -> return $ FormSuccess res' | Arbitrary{..} <- sheetGrouping -> do -- Validate AdHoc Group Members -- , length gEMails < maxParticipants -> do -- < since submitting user is already accounted for let (gEMails, gIds) = partitionEithers $ Set.toList groupMembers @@ -402,7 +401,7 @@ submissionHelper tid ssh csh shn mcid = do return $ if null failmsgs then FormSuccess res' else FormFailure failmsgs - | otherwise -> return $ FormFailure ["Mismatching number of group participants"] + | otherwise -> return $ FormSuccess res' case res' of diff --git a/src/Handler/Tutorial.hs b/src/Handler/Tutorial.hs index b3b12fad3..47d71ec86 100644 --- a/src/Handler/Tutorial.hs +++ b/src/Handler/Tutorial.hs @@ -49,7 +49,7 @@ getCTutorialListR tid ssh csh = do dbtProj = return . over (_dbrOutput . _2) E.unValue dbtColonnade = dbColonnade $ mconcat [ sortable (Just "type") (i18nCell MsgTutorialType) $ \DBRow{ dbrOutput = (Entity _ Tutorial{..}, _) } -> textCell $ CI.original tutorialType - , sortable (Just "name") (i18nCell MsgTutorialName) $ \DBRow{ dbrOutput = (Entity _ Tutorial{..}, _) } -> textCell $ CI.original tutorialName + , sortable (Just "name") (i18nCell MsgTutorialName) $ \DBRow{ dbrOutput = (Entity _ Tutorial{..}, _) } -> anchorCell (CTutorialR tid ssh csh tutorialName TUsersR) [whamlet|#{tutorialName}|] , sortable Nothing (i18nCell MsgTutorialTutors) $ \DBRow{ dbrOutput = (Entity tutid _, _) } -> sqlCell $ do tutors <- fmap (map $(unValueN 3)) . E.select . E.from $ \(tutor `E.InnerJoin` user) -> do E.on $ tutor E.^. TutorUser E.==. user E.^. UserId @@ -184,6 +184,7 @@ postTCommR tid ssh csh tutn = do E.where_ $ E.exists $ E.from $ \(sheet `E.InnerJoin` corrector) -> do E.on $ sheet E.^. SheetId E.==. corrector E.^. SheetCorrectorSheet E.where_ $ sheet E.^. SheetCourse E.==. E.val cid + E.&&. corrector E.^. SheetCorrectorUser E.==. user E.^. UserId return user ) , ( RGCourseTutors @@ -191,6 +192,7 @@ postTCommR tid ssh csh tutn = do E.where_ $ E.exists $ E.from $ \(tutorial `E.InnerJoin` tutor) -> do E.on $ tutorial E.^. TutorialId E.==. tutor E.^. TutorTutorial E.where_ $ tutorial E.^. TutorialCourse E.==. E.val cid + E.&&. tutor E.^. TutorUser E.==. user E.^. UserId return user ) ]