Merge branch 'master' into 184-replace-displayable-by-rendermessage
This commit is contained in:
commit
f818fa7de1
5
.vscode/tasks.json
vendored
5
.vscode/tasks.json
vendored
@ -63,6 +63,11 @@
|
|||||||
"type": "npm",
|
"type": "npm",
|
||||||
"script": "frontend:lint",
|
"script": "frontend:lint",
|
||||||
"problemMatcher": []
|
"problemMatcher": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "npm",
|
||||||
|
"script": "lint",
|
||||||
|
"problemMatcher": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@ -296,7 +296,7 @@ export class AsyncTable {
|
|||||||
return el.getAttribute('href') || el.querySelector('a').getAttribute('href');
|
return el.getAttribute('href') || el.querySelector('a').getAttribute('href');
|
||||||
}
|
}
|
||||||
|
|
||||||
_changePagesizeHandler = (event) => {
|
_changePagesizeHandler = () => {
|
||||||
const url = new URL(getLocalStorageParameter('currentTableUrl') || window.location.href);
|
const url = new URL(getLocalStorageParameter('currentTableUrl') || window.location.href);
|
||||||
const formData = new FormData(this._pagesizeForm);
|
const formData = new FormData(this._pagesizeForm);
|
||||||
|
|
||||||
|
|||||||
@ -409,12 +409,13 @@ NrSubmissionsNewlyAssigned: Neu zugeteilt
|
|||||||
NrSubmissionsNotAssigned: Nicht zugeteilt
|
NrSubmissionsNotAssigned: Nicht zugeteilt
|
||||||
NrSubmissionsNotCorrected: Unkorrigiert
|
NrSubmissionsNotCorrected: Unkorrigiert
|
||||||
CorrectionTime: Korrekturdauer (Min/Avg/Max)
|
CorrectionTime: Korrekturdauer (Min/Avg/Max)
|
||||||
AssignSubmissionsRandomWarning: Die Zuteilungsvorschau kann geringfügig von der tatsächlichen Zuteilung abweichen, da die Zuteilung ein randomisierter Prozess ist. Mehrfaches neues Laden dieser Seite vor Betätigung des Zuteilungsknopfes kann dies sichtbar machen.
|
AssignSubmissionsRandomWarning: Die Zuteilungsvorschau kann von der tatsächlichen Zuteilung abweichen, wenn mehrere Blätter auf einmal zugeteilt werden, da beim Ausgleich der Kontigente nur bereits zugeteilte Abgaben berücksichtigt werden. Da es ein randomisierte Prozess ist, kann es auch bei einzelnen Blättern gerinfgügige Abweichungen geben.
|
||||||
|
|
||||||
CorrectionsUploaded num@Int64: #{display num} Korrekturen wurden gespeichert:
|
CorrectionsUploaded num@Int64: #{display num} Korrekturen wurden gespeichert:
|
||||||
NoCorrectionsUploaded: In der hochgeladenen Datei wurden keine Korrekturen gefunden.
|
NoCorrectionsUploaded: In der hochgeladenen Datei wurden keine Korrekturen gefunden.
|
||||||
|
|
||||||
RatingBy: Korrigiert von
|
RatingBy: Korrigiert von
|
||||||
|
HasCorrector: Korrektor zugeteilt
|
||||||
AssignedTime: Zuteilung
|
AssignedTime: Zuteilung
|
||||||
AchievedBonusPoints: Erreichte Bonuspunkte
|
AchievedBonusPoints: Erreichte Bonuspunkte
|
||||||
AchievedNormalPoints: Erreichte Punkte
|
AchievedNormalPoints: Erreichte Punkte
|
||||||
|
|||||||
@ -1427,7 +1427,7 @@ instance YesodBreadcrumbs UniWorX where
|
|||||||
breadcrumb (CourseR tid ssh csh CInviteR) = return ("Einladung", Just $ CourseR tid ssh csh CShowR)
|
breadcrumb (CourseR tid ssh csh CInviteR) = return ("Einladung", Just $ CourseR tid ssh csh CShowR)
|
||||||
breadcrumb (CourseR tid ssh csh (CUserR _)) = return ("Teilnehmer" , Just $ CourseR tid ssh csh CUsersR)
|
breadcrumb (CourseR tid ssh csh (CUserR _)) = return ("Teilnehmer" , Just $ CourseR tid ssh csh CUsersR)
|
||||||
breadcrumb (CourseR tid ssh csh CCorrectionsR) = return ("Abgaben" , Just $ CourseR tid ssh csh CShowR)
|
breadcrumb (CourseR tid ssh csh CCorrectionsR) = return ("Abgaben" , Just $ CourseR tid ssh csh CShowR)
|
||||||
breadcrumb (CourseR tid ssh csh CAssignR) = return ("Korrektur" , Just $ CourseR tid ssh csh CCorrectionsR)
|
breadcrumb (CourseR tid ssh csh CAssignR) = return ("Zuteilung" , Just $ CourseR tid ssh csh CCorrectionsR)
|
||||||
breadcrumb (CourseR tid ssh csh SheetListR) = return ("Übungen" , Just $ CourseR tid ssh csh CShowR)
|
breadcrumb (CourseR tid ssh csh SheetListR) = return ("Übungen" , Just $ CourseR tid ssh csh CShowR)
|
||||||
breadcrumb (CourseR tid ssh csh SheetNewR ) = return ("Neu", Just $ CourseR tid ssh csh SheetListR)
|
breadcrumb (CourseR tid ssh csh SheetNewR ) = return ("Neu", Just $ CourseR tid ssh csh SheetListR)
|
||||||
breadcrumb (CourseR tid ssh csh SheetCurrentR) = return ("Aktuelles Blatt", Just $ CourseR tid ssh csh SheetListR)
|
breadcrumb (CourseR tid ssh csh SheetCurrentR) = return ("Aktuelles Blatt", Just $ CourseR tid ssh csh SheetListR)
|
||||||
|
|||||||
@ -334,6 +334,12 @@ makeCorrectionsTable whereClause dbtColonnade dbtFilterUI psValidator dbtProj' d
|
|||||||
| otherwise -> corrector E.?. UserEmail `E.in_` E.justList (E.valList . catMaybes $ Set.toList emails)
|
| otherwise -> corrector E.?. UserEmail `E.in_` E.justList (E.valList . catMaybes $ Set.toList emails)
|
||||||
E.||. (if Nothing `Set.member` emails then E.isNothing (corrector E.?. UserEmail) else E.val False)
|
E.||. (if Nothing `Set.member` emails then E.isNothing (corrector E.?. UserEmail) else E.val False)
|
||||||
)
|
)
|
||||||
|
, ( "isassigned"
|
||||||
|
, FilterColumn $ \((_ `E.InnerJoin` _ `E.InnerJoin` submission) `E.LeftOuterJoin` _ :: CorrectionTableExpr) criterion -> case getLast (criterion :: Last Bool) of
|
||||||
|
Nothing -> E.val True :: E.SqlExpr (E.Value Bool)
|
||||||
|
Just True -> E.not_ . E.isNothing $ submission E.^. SubmissionRatingBy
|
||||||
|
Just False-> E.isNothing $ submission E.^. SubmissionRatingBy
|
||||||
|
)
|
||||||
, ( "israted"
|
, ( "israted"
|
||||||
, FilterColumn $ \((_ `E.InnerJoin` _ `E.InnerJoin` submission) `E.LeftOuterJoin` _ :: CorrectionTableExpr) criterion -> case getLast (criterion :: Last Bool) of
|
, FilterColumn $ \((_ `E.InnerJoin` _ `E.InnerJoin` submission) `E.LeftOuterJoin` _ :: CorrectionTableExpr) criterion -> case getLast (criterion :: Last Bool) of
|
||||||
Nothing -> E.val True :: E.SqlExpr (E.Value Bool)
|
Nothing -> E.val True :: E.SqlExpr (E.Value Bool)
|
||||||
@ -636,10 +642,11 @@ postCCorrectionsR tid ssh csh = do
|
|||||||
filterUI = Just $ \mPrev -> mconcat
|
filterUI = Just $ \mPrev -> mconcat
|
||||||
[ prismAForm (singletonFilter "user-name-email") mPrev $ aopt textField (fslI MsgCourseMembers)
|
[ prismAForm (singletonFilter "user-name-email") mPrev $ aopt textField (fslI MsgCourseMembers)
|
||||||
, prismAForm (singletonFilter "user-matriclenumber") mPrev $ aopt textField (fslI MsgMatrikelNr)
|
, prismAForm (singletonFilter "user-matriclenumber") mPrev $ aopt textField (fslI MsgMatrikelNr)
|
||||||
, prismAForm (singletonFilter "corrector-name-email") mPrev $ aopt textField (fslI MsgCorrector)
|
-- "pseudonym" TODO DB only stores Word24
|
||||||
-- "pseudonym" TODO DB only stores Word24
|
|
||||||
, Map.singleton "sheet-search" . maybeToList <$> aopt textField (fslI MsgSheet) (Just <$> listToMaybe =<< ((Map.lookup "sheet-search" =<< mPrev) <|> (Map.lookup "sheet" =<< mPrev)))
|
, Map.singleton "sheet-search" . maybeToList <$> aopt textField (fslI MsgSheet) (Just <$> listToMaybe =<< ((Map.lookup "sheet-search" =<< mPrev) <|> (Map.lookup "sheet" =<< mPrev)))
|
||||||
, prismAForm (singletonFilter "israted" . maybePrism _PathPiece) mPrev $ aopt boolField (fslI MsgRatingTime)
|
, prismAForm (singletonFilter "corrector-name-email") mPrev $ aopt textField (fslI MsgCorrector)
|
||||||
|
, prismAForm (singletonFilter "isassigned" . maybePrism _PathPiece) mPrev $ aopt boolField (fslI MsgHasCorrector)
|
||||||
|
, prismAForm (singletonFilter "israted" . maybePrism _PathPiece) mPrev $ aopt boolField (fslI MsgRatingTime)
|
||||||
]
|
]
|
||||||
psValidator = def & defaultPagesize PagesizeAll -- Assisstant always want to see them all at once anyway
|
psValidator = def & defaultPagesize PagesizeAll -- Assisstant always want to see them all at once anyway
|
||||||
correctionsR whereClause colonnade filterUI psValidator $ Map.fromList
|
correctionsR whereClause colonnade filterUI psValidator $ Map.fromList
|
||||||
@ -669,8 +676,9 @@ postSSubsR tid ssh csh shn = do
|
|||||||
[ prismAForm (singletonFilter "user-name-email") mPrev $ aopt textField (fslI MsgCourseMembers)
|
[ prismAForm (singletonFilter "user-name-email") mPrev $ aopt textField (fslI MsgCourseMembers)
|
||||||
, prismAForm (singletonFilter "user-matriclenumber") mPrev $ aopt textField (fslI MsgMatrikelNr)
|
, prismAForm (singletonFilter "user-matriclenumber") mPrev $ aopt textField (fslI MsgMatrikelNr)
|
||||||
, prismAForm (singletonFilter "corrector-name-email") mPrev $ aopt textField (fslI MsgCorrector)
|
, prismAForm (singletonFilter "corrector-name-email") mPrev $ aopt textField (fslI MsgCorrector)
|
||||||
-- "pseudonym" TODO DB only stores Word24
|
, prismAForm (singletonFilter "isassigned" . maybePrism _PathPiece) mPrev $ aopt boolField (fslI MsgHasCorrector)
|
||||||
, prismAForm (singletonFilter "israted" . maybePrism _PathPiece) mPrev $ aopt boolField (fslI MsgRatingTime)
|
, prismAForm (singletonFilter "israted" . maybePrism _PathPiece) mPrev $ aopt boolField (fslI MsgRatingTime)
|
||||||
|
-- "pseudonym" TODO DB only stores Word24
|
||||||
]
|
]
|
||||||
psValidator = def & defaultPagesize PagesizeAll -- Assisstant always want to see them all at once anyway
|
psValidator = def & defaultPagesize PagesizeAll -- Assisstant always want to see them all at once anyway
|
||||||
correctionsR whereClause colonnade filterUI psValidator $ Map.fromList
|
correctionsR whereClause colonnade filterUI psValidator $ Map.fromList
|
||||||
@ -1134,10 +1142,11 @@ assignHandler tid ssh csh cid assignSids = do
|
|||||||
let shn = sheetName $ sheets ! sid
|
let shn = sheetName $ sheets ! sid
|
||||||
-- is sheet closed?
|
-- is sheet closed?
|
||||||
guardM $ lift $ hasWriteAccessTo $ CSheetR tid ssh csh shn SAssignR -- we must check, whether the submission is already closed and thus assignable
|
guardM $ lift $ hasWriteAccessTo $ CSheetR tid ssh csh shn SAssignR -- we must check, whether the submission is already closed and thus assignable
|
||||||
-- has at least one submisison?
|
-- has at least one uncorrected / unassigned submisison?
|
||||||
[E.Value hasSubmission] <- lift $ E.select $ return $ E.exists $ E.from $ \submission -> do
|
[E.Value hasSubmission] <- lift $ E.select $ return $ E.exists $ E.from $ \submission -> do
|
||||||
E.where_ $ submission E.^. SubmissionSheet E.==. E.val sid
|
E.where_ $ submission E.^. SubmissionSheet E.==. E.val sid
|
||||||
E.where_ $ E.isNothing $ submission E.^. SubmissionRatingBy
|
E.where_ $ E.isNothing $ submission E.^. SubmissionRatingBy -- no corrector
|
||||||
|
E.where_ $ E.isNothing $ submission E.^. SubmissionRatingTime -- not done
|
||||||
guard hasSubmission
|
guard hasSubmission
|
||||||
-- has at least one active corrector?
|
-- has at least one active corrector?
|
||||||
[E.Value hasCorrector] <- lift $ E.select $ return $ E.exists $ E.from $ \corrector -> do
|
[E.Value hasCorrector] <- lift $ E.select $ return $ E.exists $ E.from $ \corrector -> do
|
||||||
|
|||||||
@ -386,7 +386,7 @@ cutOffPercent :: Double -> Double -> Double -> Double
|
|||||||
cutOffPercent offset full achieved
|
cutOffPercent offset full achieved
|
||||||
| full <= achieved = 0
|
| full <= achieved = 0
|
||||||
| full <= 0 = 0
|
| full <= 0 = 0
|
||||||
| otherwise = offset + (1-offset * (1 - percent))
|
| otherwise = offset + (1-offset) * (1 - percent)
|
||||||
where
|
where
|
||||||
percent = achieved / full
|
percent = achieved / full
|
||||||
|
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
<td .table__td .alert-danger>(-#{show (Set.size splus)}, failed: #{show (Set.size sfailed)})
|
<td .table__td .alert-danger>(-#{show (Set.size splus)}, failed: #{show (Set.size sfailed)})
|
||||||
$elseif 0 < Set.size splus
|
$elseif 0 < Set.size splus
|
||||||
<td .table__td>#{ciSubmissions - ciAssigned}
|
<td .table__td>#{ciSubmissions - ciAssigned}
|
||||||
<td .table__td .alert-success>(-#{show (Set.size splus)})
|
<td .table__td .alert-info>(-#{show (Set.size splus)})
|
||||||
$else
|
$else
|
||||||
<td .table__td colspan=2>#{ciSubmissions - ciAssigned}
|
<td .table__td colspan=2>#{ciSubmissions - ciAssigned}
|
||||||
$nothing
|
$nothing
|
||||||
@ -60,7 +60,7 @@
|
|||||||
$maybe nrNew <- getCorrNewAssignment ciCorrector shn
|
$maybe nrNew <- getCorrNewAssignment ciCorrector shn
|
||||||
<td .table__td>#{ciSubmissions}
|
<td .table__td>#{ciSubmissions}
|
||||||
$# <td .table__td>#{ciAssigned} `ciSubmissions` is here always identical to `ciAssigned` and also works for `ciCorrector == Nothing`. ciAssigned only useful in aggregate maps like `sheetMap`
|
$# <td .table__td>#{ciAssigned} `ciSubmissions` is here always identical to `ciAssigned` and also works for `ciCorrector == Nothing`. ciAssigned only useful in aggregate maps like `sheetMap`
|
||||||
<td .table__td .alert-success>(+#{nrNew})
|
<td .table__td .alert-info>(+#{nrNew})
|
||||||
$nothing
|
$nothing
|
||||||
<td .table__td colspan=2>#{ciSubmissions}
|
<td .table__td colspan=2>#{ciSubmissions}
|
||||||
<td .table__td .heated style="--hotness: #{heat ciSubmissions ciCorrected}">#{ciSubmissions - ciCorrected}
|
<td .table__td .heated style="--hotness: #{heat ciSubmissions ciCorrected}">#{ciSubmissions - ciCorrected}
|
||||||
|
|||||||
@ -2,6 +2,10 @@ $newline never
|
|||||||
$if null rows && (dbsEmptyStyle == DBESNoHeading)
|
$if null rows && (dbsEmptyStyle == DBESNoHeading)
|
||||||
_{dbsEmptyMessage}
|
_{dbsEmptyMessage}
|
||||||
$else
|
$else
|
||||||
|
<div .table-header>
|
||||||
|
<div .table__row-count>
|
||||||
|
_{MsgRowCount rowCount}
|
||||||
|
|
||||||
^{table}
|
^{table}
|
||||||
|
|
||||||
<div .table-footer>
|
<div .table-footer>
|
||||||
|
|||||||
@ -1,3 +1,10 @@
|
|||||||
|
/* TABLE HEADER */
|
||||||
|
.table-header {
|
||||||
|
display: flex;
|
||||||
|
flex-flow: row-reverse;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
/* TABLE FOOTER */
|
/* TABLE FOOTER */
|
||||||
.table-footer {
|
.table-footer {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
Reference in New Issue
Block a user