cleanup
This commit is contained in:
parent
d743fd6536
commit
9183ff9aa4
@ -327,6 +327,11 @@ SheetTypeNormal: Normal
|
|||||||
SheetTypePass: Bestehen
|
SheetTypePass: Bestehen
|
||||||
SheetTypeNotGraded: Keine Wertung
|
SheetTypeNotGraded: Keine Wertung
|
||||||
|
|
||||||
|
SheetTypeBonus' maxPoints@Points: #{tshow maxPoints} Bonuspunkte
|
||||||
|
SheetTypeNormal' maxPoints@Points: #{tshow maxPoints} Punkte
|
||||||
|
SheetTypePass' maxPoints@Points passingPoints@Points: Bestanden ab #{tshow passingPoints} von #{tshow maxPoints} Punkten
|
||||||
|
SheetTypeNotGraded': Nicht gewertet
|
||||||
|
|
||||||
SheetTypeMaxPoints: Maximalpunktzahl
|
SheetTypeMaxPoints: Maximalpunktzahl
|
||||||
SheetTypePassingPoints: Notwendig zum Bestehen
|
SheetTypePassingPoints: Notwendig zum Bestehen
|
||||||
|
|
||||||
@ -334,3 +339,5 @@ SheetGroupArbitrary: Arbiträre Gruppen
|
|||||||
SheetGroupRegisteredGroups: Registrierte Gruppen
|
SheetGroupRegisteredGroups: Registrierte Gruppen
|
||||||
SheetGroupNoGroups: Keine Gruppenabgabe
|
SheetGroupNoGroups: Keine Gruppenabgabe
|
||||||
SheetGroupMaxGroupsize: Maximale Gruppengröße
|
SheetGroupMaxGroupsize: Maximale Gruppengröße
|
||||||
|
|
||||||
|
SheetFiles: Übungsblatt-Dateien
|
||||||
@ -229,6 +229,14 @@ instance RenderMessage UniWorX Load where
|
|||||||
(Load {byTutorial=Just False, byProportion=p}) -> renderMessage' $ MsgCorByProportionExcludingTutorial p
|
(Load {byTutorial=Just False, byProportion=p}) -> renderMessage' $ MsgCorByProportionExcludingTutorial p
|
||||||
where renderMessage' = renderMessage foundation ls
|
where renderMessage' = renderMessage foundation ls
|
||||||
|
|
||||||
|
instance RenderMessage UniWorX SheetType where
|
||||||
|
renderMessage foundation ls = \case
|
||||||
|
Bonus{..} -> renderMessage' $ MsgSheetTypeBonus' maxPoints
|
||||||
|
Normal{..} -> renderMessage' $ MsgSheetTypeNormal' maxPoints
|
||||||
|
Pass{..} -> renderMessage' $ MsgSheetTypePass' maxPoints passingPoints
|
||||||
|
NotGraded{} -> renderMessage' MsgSheetTypeNotGraded'
|
||||||
|
where renderMessage' = renderMessage foundation ls
|
||||||
|
|
||||||
newtype MsgLanguage = MsgLanguage Lang
|
newtype MsgLanguage = MsgLanguage Lang
|
||||||
deriving (Eq, Ord, Show, Read)
|
deriving (Eq, Ord, Show, Read)
|
||||||
instance RenderMessage UniWorX MsgLanguage where
|
instance RenderMessage UniWorX MsgLanguage where
|
||||||
|
|||||||
@ -57,7 +57,7 @@ import qualified Data.Map as Map
|
|||||||
import Data.Map (Map, (!), (!?))
|
import Data.Map (Map, (!), (!?))
|
||||||
import qualified Data.Map as Map
|
import qualified Data.Map as Map
|
||||||
|
|
||||||
import Data.Monoid (Sum(..))
|
import Data.Monoid (Sum(..), Any(..))
|
||||||
|
|
||||||
import Control.Lens
|
import Control.Lens
|
||||||
-- import Utils.Lens
|
-- import Utils.Lens
|
||||||
@ -273,14 +273,14 @@ getSShowR tid ssh csh shn = do
|
|||||||
-- return desired columns
|
-- return desired columns
|
||||||
return $ (file E.^. FileTitle, file E.^. FileModified, sheetFile E.^. SheetFileType)
|
return $ (file E.^. FileTitle, file E.^. FileModified, sheetFile E.^. SheetFileType)
|
||||||
let colonnadeFiles = widgetColonnade $ mconcat
|
let colonnadeFiles = widgetColonnade $ mconcat
|
||||||
[ sortable (Just "type") "Typ" $ \(_,_, E.Value ftype) -> i18nCell ftype
|
[ sortable (Just "type") "Typ" $ \(_,_, E.Value ftype) -> i18nCell ftype & cellContents %~ (\act -> act <* tell (Any True))
|
||||||
, sortable (Just "path") "Dateiname" $ anchorCell' (\(E.Value fName,_,E.Value fType) -> CSheetR tid ssh csh shn (SFileR fType fName))
|
, sortable (Just "path") "Dateiname" $ anchorCell' (\(E.Value fName,_,E.Value fType) -> CSheetR tid ssh csh shn (SFileR fType fName))
|
||||||
(\(E.Value fName,_,_) -> str2widget fName)
|
(\(E.Value fName,_,_) -> str2widget fName)
|
||||||
, sortable (Just "time") "Modifikation" $ \(_,E.Value modified,_) -> cell $ formatTime SelFormatDateTime (modified :: UTCTime) >>= toWidget
|
, sortable (Just "time") "Modifikation" $ \(_,E.Value modified,_) -> cell $ formatTime SelFormatDateTime (modified :: UTCTime) >>= toWidget
|
||||||
]
|
]
|
||||||
let psValidator = def
|
let psValidator = def
|
||||||
& defaultSorting [("type", SortAsc), ("path", SortAsc)]
|
& defaultSorting [("type", SortAsc), ("path", SortAsc)]
|
||||||
((), fileTable) <- dbTable psValidator $ DBTable
|
(Any hasFiles, fileTable) <- dbTable psValidator $ DBTable
|
||||||
{ dbtSQLQuery = fileData
|
{ dbtSQLQuery = fileData
|
||||||
, dbtColonnade = colonnadeFiles
|
, dbtColonnade = colonnadeFiles
|
||||||
, dbtProj = \DBRow{ dbrOutput = dbrOutput@(E.Value fName, _, E.Value fType) }
|
, dbtProj = \DBRow{ dbrOutput = dbrOutput@(E.Value fName, _, E.Value fType) }
|
||||||
|
|||||||
@ -1,11 +1,10 @@
|
|||||||
^{userCorrection}
|
<section>
|
||||||
|
^{userCorrection}
|
||||||
|
|
||||||
<hr>
|
<section>
|
||||||
|
<form method=post enctype=#{corrEncoding}>
|
||||||
|
^{corrForm}
|
||||||
|
|
||||||
<form method=post enctype=#{corrEncoding}>
|
<section>
|
||||||
^{corrForm}
|
<form method=post enctype=#{uploadEncoding}>
|
||||||
|
^{uploadForm}
|
||||||
<hr>
|
|
||||||
|
|
||||||
<form method=post enctype=#{uploadEncoding}>
|
|
||||||
^{uploadForm}
|
|
||||||
|
|||||||
@ -185,6 +185,10 @@ h4 {
|
|||||||
p {
|
p {
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p:last-child {
|
||||||
|
margin: 10px 0 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.logged-in {
|
.logged-in {
|
||||||
@ -309,6 +313,10 @@ input[type="button"].btn-info:hover,
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table:only-child {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.table--striped {
|
.table--striped {
|
||||||
|
|
||||||
.table__row:not(.no-stripe):nth-child(even) {
|
.table__row:not(.no-stripe):nth-child(even) {
|
||||||
@ -502,3 +510,17 @@ input[type="button"].btn-info:hover,
|
|||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
padding: 0 0 12px;
|
||||||
|
margin: 0 0 12px;
|
||||||
|
border-bottom: 1px solid #d3d3d3;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
section:last-of-type {
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,33 +1,32 @@
|
|||||||
<div .container>
|
$newline never
|
||||||
$maybe descr <- sheetDescription sheet
|
$maybe descr <- sheetDescription sheet
|
||||||
<h2 #description>Hinweise
|
<section>
|
||||||
<p> #{descr}
|
<h2 #description>_{MsgSheetDescription}
|
||||||
|
<p>
|
||||||
|
#{descr}
|
||||||
|
|
||||||
<h3>Bewertung
|
$maybe marking <- sheetMarkingText sheet
|
||||||
<p>
|
<section>
|
||||||
#{display $ sheetType sheet}
|
<h2>_{MsgSheetMarking}
|
||||||
|
|
||||||
$maybe marking <- sheetMarkingText sheet
|
|
||||||
<p>
|
<p>
|
||||||
#{marking}
|
#{marking}
|
||||||
|
|
||||||
<p>
|
<section>
|
||||||
Download und Abgabe freigeschaltet ab
|
<dl .deflist>
|
||||||
#{sheetFrom}
|
<dt .deflist__dt>_{MsgSheetActiveFrom}
|
||||||
|
<dd .deflist__dd>#{sheetFrom}
|
||||||
|
<dt .deflist__dt>_{MsgSheetActiveTo}
|
||||||
|
<dd .deflist__dd>#{sheetTo}
|
||||||
|
$maybe hints <- hintsFrom <* guard hasHints
|
||||||
|
<dt .deflist__dt>_{MsgSheetHintFrom}
|
||||||
|
<dd .deflist__dd>#{hints}
|
||||||
|
$maybe solution <- solutionFrom <* guard hasSolution
|
||||||
|
<dt .deflist__dt>_{MsgSheetSolutionFrom}
|
||||||
|
<dd .deflist__dd>#{solution}
|
||||||
|
<dt .deflist__dt>_{MsgSheetType}
|
||||||
|
<dd .deflist__dd>_{sheetType sheet}
|
||||||
|
|
||||||
<p>
|
$if hasFiles
|
||||||
Abgabe bis
|
<section>
|
||||||
#{sheetTo}
|
<h2>_{MsgSheetFiles}
|
||||||
|
^{fileTable}
|
||||||
$maybe hints <- hintsFrom <* guard hasHints
|
|
||||||
<p>
|
|
||||||
Hinweise ab
|
|
||||||
#{hints}
|
|
||||||
|
|
||||||
$maybe solution <- solutionFrom <* guard hasSolution
|
|
||||||
<p>
|
|
||||||
Lösung ab
|
|
||||||
#{solution}
|
|
||||||
|
|
||||||
<h2>Dateien
|
|
||||||
^{fileTable}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user