feat(exam-correct): explanation & length restriction
This commit is contained in:
parent
dd7fe84ffd
commit
1bf19a76bd
@ -91,3 +91,8 @@ table[uw-exam-correct]
|
||||
|
||||
.exam-correct--error
|
||||
color: var(--color-error)
|
||||
|
||||
.uw-exam-correct--explanation
|
||||
color: var(--color-fontsec)
|
||||
font-weight: 600
|
||||
font-size: 0.9rem
|
||||
|
||||
@ -1411,6 +1411,7 @@ ExamCorrectHeadStatus: Status
|
||||
|
||||
ExamCorrectButtonSend: Senden
|
||||
|
||||
ExamCorrectErrorNeedleTooShort: Dieser Identifikator ist zu kurz.
|
||||
ExamCorrectErrorMultipleMatchingParticipants: Dem Identifikator konnten mehrere Prüfungsteilnehmer zugeordnet werden.
|
||||
ExamCorrectErrorNoMatchingParticipants: Dem Identifikator konnte kein Prüfungsteilnehmer zugeordnet werden.
|
||||
ExamCorrectErrorPartResultOutOfBounds examPartNumber@ExamPartNumber: Prüfungsergebnis für Teil #{examPartNumber} ist nicht größer Null.
|
||||
|
||||
@ -1407,6 +1407,7 @@ ExamCorrectHeadStatus: Status
|
||||
|
||||
ExamCorrectButtonSend: Submit
|
||||
|
||||
ExamCorrectErrorNeedleTooShort: This identifier is too short.
|
||||
ExamCorrectErrorMultipleMatchingParticipants: This identifier matches on multiple exam participants.
|
||||
ExamCorrectErrorNoMatchingParticipants: This identifier does not match on any exam participant.
|
||||
ExamCorrectErrorPartResultOutOfBounds examPartNumber: Exam part result for #{examPartNumber} ist not greater zero.
|
||||
|
||||
@ -116,6 +116,10 @@ postECorrectR tid ssh csh examn = do
|
||||
Entity eId Exam{..} <- lift $ fetchExam tid ssh csh examn
|
||||
euid <- traverse decrypt ciqUser
|
||||
|
||||
guardMExceptT (maybe True ((>= 3) . length) $ euid ^? _Left) $
|
||||
CorrectInterfaceResponseFailure Nothing <$> (getMessageRender <*> pure MsgExamCorrectErrorNeedleTooShort)
|
||||
|
||||
|
||||
participantMatches <- lift . E.select . E.from $ \(examRegistration `E.InnerJoin` user) -> do
|
||||
E.on $ examRegistration E.^. ExamRegistrationUser E.==. user E.^. UserId
|
||||
E.where_ $ examRegistration E.^. ExamRegistrationExam E.==. E.val eId
|
||||
@ -124,8 +128,6 @@ postECorrectR tid ssh csh examn = do
|
||||
uidMatch = either (const $ E.val False) (\uid -> user E.^. UserId E.==. E.val uid) euid
|
||||
mUserIdent = euid ^? _Left
|
||||
E.where_ $ uidMatch
|
||||
E.||. user E.^. UserMatrikelnummer E.==. E.val mUserIdent
|
||||
E.||. user E.^. UserMatrikelnummer `E.hasInfix` E.val mUserIdent
|
||||
E.||. (case mUserIdent of
|
||||
Just userIdent -> user E.^. UserSurname E.==. E.val userIdent
|
||||
E.||. user E.^. UserSurname `E.hasInfix` E.val userIdent
|
||||
@ -133,6 +135,8 @@ postECorrectR tid ssh csh examn = do
|
||||
E.||. user E.^. UserFirstName `E.hasInfix` E.val userIdent
|
||||
E.||. user E.^. UserDisplayName E.==. E.val userIdent
|
||||
E.||. user E.^. UserDisplayName `E.hasInfix` E.val userIdent
|
||||
E.||. user E.^. UserMatrikelnummer E.==. E.val mUserIdent
|
||||
E.||. user E.^. UserMatrikelnummer `E.hasInfix` E.val mUserIdent
|
||||
Nothing -> E.val False)
|
||||
return user
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
$newline never
|
||||
<section>
|
||||
<section .uw-exam-correct--explanation>
|
||||
^{examCorrectExplanation}
|
||||
|
||||
<section>
|
||||
@ -23,7 +23,7 @@ $newline never
|
||||
<tr .table__row #exam-correct__new>
|
||||
<td .table__td .uw-exam-correct--date-cell>
|
||||
<td .table__td .exam-correct--input-status>
|
||||
<input #exam-correct__user .uw-exam-correct--user-cell type="text" autofocus minLength=1>
|
||||
<input #exam-correct__user .uw-exam-correct--user-cell type="text" autofocus minLength=3>
|
||||
<i #exam-correct__user-status .fas .fa-fw>
|
||||
<ul #exam-correct__user-candidates>
|
||||
$forall ExamPart{examPartNumber} <- examParts
|
||||
|
||||
@ -4,6 +4,27 @@ $newline never
|
||||
Teilnehmer-Spalte einen beliebigen eindeutigen Identifikator des #
|
||||
Teilnehmers angeben.<br />
|
||||
|
||||
Es können nur Ergebnisse für Studierende eingetragen werden, die #
|
||||
bereits Prüfungsteilnehmer sind. #
|
||||
Über diese Oberfläche können keine neuen Benutzer zur Klausur #
|
||||
angemeldet werden.<br />
|
||||
|
||||
Vermutlich eindeutig ist die Matrikelnummer des Teilnehmers, aber #
|
||||
auch der Name oder ein Teil der Matrikelnummer können unter #
|
||||
Umständen bereits eindeutig sein. #
|
||||
Umständen bereits eindeutig sein.<br />
|
||||
|
||||
Wenn Felder für Ergebnisse frei gelassen werden, wird an dieser #
|
||||
Stelle nichts in die Datenbank eingetragen.<br />
|
||||
|
||||
Beim Senden von Ergebnissen wird der bisherige Stand in der #
|
||||
Datenbank überschrieben. #
|
||||
Es werden auch Ergebnisse überschrieben, die andere Benutzer #
|
||||
eingetragen haben.<br />
|
||||
|
||||
Bereits eingetragene Ergebnisse können auch gelöscht werden; es ist #
|
||||
danach für den jeweiligen Teil der Prüfung kein Ergebnis mehr in der #
|
||||
Datenbank hinterlegt.<br />
|
||||
|
||||
Falls eine automatische Notenberechnung konfiguriert ist, müssen die #
|
||||
berechneten Ergebnisse noch auf der Seite der Klausurteilnehmerliste #
|
||||
akzeptiert werden.
|
||||
|
||||
@ -3,6 +3,25 @@ $newline never
|
||||
To enter a participant's exam achievement you can submit any string #
|
||||
that uniquely identifies the participant.<br />
|
||||
|
||||
Results can only be entered for users who are already exam #
|
||||
participants. #
|
||||
No new participants can be added to the exam using this interface. #
|
||||
|
||||
Matriculation numbers are likely unique. #
|
||||
The participant's name or a part of their matriculation number may #
|
||||
also be sufficiently unique.
|
||||
also be sufficiently unique.<br />
|
||||
|
||||
If any fields are left blank no result is saved for that part of the #
|
||||
exam.<br />
|
||||
|
||||
When entering results, the current state in the database is #
|
||||
overwritten. #
|
||||
Results entered by other users are also overwritten.<br />
|
||||
|
||||
It is possible to delete results. #
|
||||
After doing so no result is saved for that part of the exam within #
|
||||
the database.<br />
|
||||
|
||||
If grades are to be computed automatically for this exam, the #
|
||||
results need to be accepted. #
|
||||
This is done via the listing of exam participants.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user