parent
baf8b18dc3
commit
aebc05d021
@ -2,4 +2,5 @@ FAQNoCampusAccount: Ich habe keine LMU-Benutzerkennung (ehem. Campus-Kennung); k
|
|||||||
FAQForgottenPassword: Ich habe mein Passwort vergessen
|
FAQForgottenPassword: Ich habe mein Passwort vergessen
|
||||||
FAQCampusCantLogin: Ich kann mich mit meiner LMU-Benutzerkennung (ehem. Campus-Kennung) nicht anmelden
|
FAQCampusCantLogin: Ich kann mich mit meiner LMU-Benutzerkennung (ehem. Campus-Kennung) nicht anmelden
|
||||||
FAQCourseCorrectorsTutors: Wie kann ich Tutoren oder Korrektoren für meinen Kurs einstellen?
|
FAQCourseCorrectorsTutors: Wie kann ich Tutoren oder Korrektoren für meinen Kurs einstellen?
|
||||||
FAQNotLecturerHowToCreateCourses: Wie kann ich einen neuen Kurs anlegen?
|
FAQNotLecturerHowToCreateCourses: Wie kann ich einen neuen Kurs anlegen?
|
||||||
|
FAQExamPoints: Warum kann ich bei meiner Klausur keine Punkte eintragen?
|
||||||
@ -3,3 +3,4 @@ FAQForgottenPassword: I have forgotten my password
|
|||||||
FAQCampusCantLogin: I can't log in using my LMU user ID (formerly Campus-ID)
|
FAQCampusCantLogin: I can't log in using my LMU user ID (formerly Campus-ID)
|
||||||
FAQCourseCorrectorsTutors: How can I add tutors or correctors to my course?
|
FAQCourseCorrectorsTutors: How can I add tutors or correctors to my course?
|
||||||
FAQNotLecturerHowToCreateCourses: How can I create new courses?
|
FAQNotLecturerHowToCreateCourses: How can I create new courses?
|
||||||
|
FAQExamPoints: Why can't I enter achievements for my exam as points?
|
||||||
|
|||||||
@ -14,7 +14,7 @@ module Database.Esqueleto.Utils
|
|||||||
, orderByList
|
, orderByList
|
||||||
, orderByOrd, orderByEnum
|
, orderByOrd, orderByEnum
|
||||||
, strip, lower, ciEq
|
, strip, lower, ciEq
|
||||||
, selectExists
|
, selectExists, selectNotExists
|
||||||
, SqlHashable
|
, SqlHashable
|
||||||
, sha256
|
, sha256
|
||||||
, maybe, unsafeCoalesce
|
, maybe, unsafeCoalesce
|
||||||
@ -206,13 +206,14 @@ ciEq :: E.SqlString s => E.SqlExpr (E.Value s) -> E.SqlExpr (E.Value s) -> E.Sql
|
|||||||
ciEq a b = lower a E.==. lower b
|
ciEq a b = lower a E.==. lower b
|
||||||
|
|
||||||
|
|
||||||
selectExists :: forall m a. MonadIO m => E.SqlQuery a -> E.SqlReadT m Bool
|
selectExists, selectNotExists :: forall m a. MonadIO m => E.SqlQuery a -> E.SqlReadT m Bool
|
||||||
selectExists query = do
|
selectExists query = do
|
||||||
res <- E.select . return . E.exists $ void query
|
res <- E.select . return . E.exists $ void query
|
||||||
|
|
||||||
case res of
|
case res of
|
||||||
[E.Value b] -> return b
|
[E.Value b] -> return b
|
||||||
_other -> error "SELECT EXISTS ... returned zero or more than one rows"
|
_other -> error "SELECT EXISTS ... returned zero or more than one rows"
|
||||||
|
selectNotExists = fmap not . selectExists
|
||||||
|
|
||||||
|
|
||||||
class SqlHashable a
|
class SqlHashable a
|
||||||
|
|||||||
@ -7,6 +7,9 @@ import Handler.Info.TH
|
|||||||
import qualified Data.Map as Map
|
import qualified Data.Map as Map
|
||||||
import qualified Data.CaseInsensitive as CI
|
import qualified Data.CaseInsensitive as CI
|
||||||
|
|
||||||
|
import qualified Database.Esqueleto as E
|
||||||
|
import qualified Database.Esqueleto.Utils as E
|
||||||
|
|
||||||
import Development.GitRev
|
import Development.GitRev
|
||||||
|
|
||||||
-- | Versionsgeschichte
|
-- | Versionsgeschichte
|
||||||
@ -156,6 +159,17 @@ showFAQ (CourseR tid ssh csh _) FAQCourseCorrectorsTutors
|
|||||||
(or2M (hasWriteAccessTo $ CourseR tid ssh csh SheetNewR)
|
(or2M (hasWriteAccessTo $ CourseR tid ssh csh SheetNewR)
|
||||||
(hasWriteAccessTo $ CourseR tid ssh csh CTutorialNewR)
|
(hasWriteAccessTo $ CourseR tid ssh csh CTutorialNewR)
|
||||||
)
|
)
|
||||||
|
showFAQ (CExamR tid ssh csh examn _) FAQExamPoints
|
||||||
|
= and2M (hasWriteAccessTo $ CExamR tid ssh csh examn EEditR)
|
||||||
|
noExamParts
|
||||||
|
where
|
||||||
|
noExamParts = liftHandler . runDB . E.selectNotExists . E.from $ \(examPart `E.InnerJoin` exam `E.InnerJoin` course) -> do
|
||||||
|
E.on $ course E.^. CourseId E.==. exam E.^. ExamCourse
|
||||||
|
E.on $ exam E.^. ExamId E.==. examPart E.^. ExamPartExam
|
||||||
|
E.where_ $ course E.^. CourseTerm E.==. E.val tid
|
||||||
|
E.&&. course E.^. CourseSchool E.==. E.val ssh
|
||||||
|
E.&&. course E.^. CourseShorthand E.==. E.val csh
|
||||||
|
E.&&. exam E.^. ExamName E.==. E.val examn
|
||||||
showFAQ _ _ = return False
|
showFAQ _ _ = return False
|
||||||
|
|
||||||
prioFAQ :: Monad m
|
prioFAQ :: Monad m
|
||||||
@ -165,3 +179,4 @@ prioFAQ _ FAQCampusCantLogin = return 1
|
|||||||
prioFAQ _ FAQForgottenPassword = return 1
|
prioFAQ _ FAQForgottenPassword = return 1
|
||||||
prioFAQ _ FAQNotLecturerHowToCreateCourses = return 1
|
prioFAQ _ FAQNotLecturerHowToCreateCourses = return 1
|
||||||
prioFAQ _ FAQCourseCorrectorsTutors = return 1
|
prioFAQ _ FAQCourseCorrectorsTutors = return 1
|
||||||
|
prioFAQ _ FAQExamPoints = return 2
|
||||||
|
|||||||
9
templates/i18n/faq/exam-points.de-de-formal.hamlet
Normal file
9
templates/i18n/faq/exam-points.de-de-formal.hamlet
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
$newline never
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Klausurpunkte werden in Uni2work pro Teilaufgabe verwaltet.
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Um Klausurleistungen als Punkte anzugeben (und optional automatisch #
|
||||||
|
eine Note daraus zu berechnen), müssen Sie mindestens eine #
|
||||||
|
Teilprüfung/Aufgabe anlegen.
|
||||||
9
templates/i18n/faq/exam-points.en-eu.hamlet
Normal file
9
templates/i18n/faq/exam-points.en-eu.hamlet
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
$newline never
|
||||||
|
|
||||||
|
<p>
|
||||||
|
Exam points are managed in Uni2work on a per-exam-part basis.
|
||||||
|
|
||||||
|
<p>
|
||||||
|
To store exam achievements in the form of points (and optionally #
|
||||||
|
automatically compute grades), you need to create at least one #
|
||||||
|
exam part/question.
|
||||||
Reference in New Issue
Block a user