cleanup
This commit is contained in:
parent
d743fd6536
commit
9183ff9aa4
@ -327,10 +327,17 @@ SheetTypeNormal: Normal
|
||||
SheetTypePass: Bestehen
|
||||
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
|
||||
SheetTypePassingPoints: Notwendig zum Bestehen
|
||||
|
||||
SheetGroupArbitrary: Arbiträre Gruppen
|
||||
SheetGroupRegisteredGroups: Registrierte Gruppen
|
||||
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
|
||||
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
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
instance RenderMessage UniWorX MsgLanguage where
|
||||
|
||||
@ -57,7 +57,7 @@ import qualified Data.Map as Map
|
||||
import Data.Map (Map, (!), (!?))
|
||||
import qualified Data.Map as Map
|
||||
|
||||
import Data.Monoid (Sum(..))
|
||||
import Data.Monoid (Sum(..), Any(..))
|
||||
|
||||
import Control.Lens
|
||||
-- import Utils.Lens
|
||||
@ -273,14 +273,14 @@ getSShowR tid ssh csh shn = do
|
||||
-- return desired columns
|
||||
return $ (file E.^. FileTitle, file E.^. FileModified, sheetFile E.^. SheetFileType)
|
||||
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))
|
||||
(\(E.Value fName,_,_) -> str2widget fName)
|
||||
, sortable (Just "time") "Modifikation" $ \(_,E.Value modified,_) -> cell $ formatTime SelFormatDateTime (modified :: UTCTime) >>= toWidget
|
||||
]
|
||||
let psValidator = def
|
||||
& defaultSorting [("type", SortAsc), ("path", SortAsc)]
|
||||
((), fileTable) <- dbTable psValidator $ DBTable
|
||||
(Any hasFiles, fileTable) <- dbTable psValidator $ DBTable
|
||||
{ dbtSQLQuery = fileData
|
||||
, dbtColonnade = colonnadeFiles
|
||||
, dbtProj = \DBRow{ dbrOutput = dbrOutput@(E.Value fName, _, E.Value fType) }
|
||||
|
||||
@ -1,11 +1,10 @@
|
||||
^{userCorrection}
|
||||
<section>
|
||||
^{userCorrection}
|
||||
|
||||
<hr>
|
||||
|
||||
<form method=post enctype=#{corrEncoding}>
|
||||
^{corrForm}
|
||||
<section>
|
||||
<form method=post enctype=#{corrEncoding}>
|
||||
^{corrForm}
|
||||
|
||||
<hr>
|
||||
|
||||
<form method=post enctype=#{uploadEncoding}>
|
||||
^{uploadForm}
|
||||
<section>
|
||||
<form method=post enctype=#{uploadEncoding}>
|
||||
^{uploadForm}
|
||||
|
||||
@ -185,6 +185,10 @@ h4 {
|
||||
p {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
p:last-child {
|
||||
margin: 10px 0 0;
|
||||
}
|
||||
}
|
||||
|
||||
.logged-in {
|
||||
@ -309,6 +313,10 @@ input[type="button"].btn-info:hover,
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.table:only-child {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.table--striped {
|
||||
|
||||
.table__row:not(.no-stripe):nth-child(even) {
|
||||
@ -502,3 +510,17 @@ input[type="button"].btn-info:hover,
|
||||
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>
|
||||
$maybe descr <- sheetDescription sheet
|
||||
<h2 #description>Hinweise
|
||||
<p> #{descr}
|
||||
$newline never
|
||||
$maybe descr <- sheetDescription sheet
|
||||
<section>
|
||||
<h2 #description>_{MsgSheetDescription}
|
||||
<p>
|
||||
#{descr}
|
||||
|
||||
<h3>Bewertung
|
||||
<p>
|
||||
#{display $ sheetType sheet}
|
||||
|
||||
$maybe marking <- sheetMarkingText sheet
|
||||
$maybe marking <- sheetMarkingText sheet
|
||||
<section>
|
||||
<h2>_{MsgSheetMarking}
|
||||
<p>
|
||||
#{marking}
|
||||
|
||||
<p>
|
||||
Download und Abgabe freigeschaltet ab
|
||||
#{sheetFrom}
|
||||
<section>
|
||||
<dl .deflist>
|
||||
<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>
|
||||
Abgabe bis
|
||||
#{sheetTo}
|
||||
|
||||
$maybe hints <- hintsFrom <* guard hasHints
|
||||
<p>
|
||||
Hinweise ab
|
||||
#{hints}
|
||||
|
||||
$maybe solution <- solutionFrom <* guard hasSolution
|
||||
<p>
|
||||
Lösung ab
|
||||
#{solution}
|
||||
|
||||
<h2>Dateien
|
||||
^{fileTable}
|
||||
$if hasFiles
|
||||
<section>
|
||||
<h2>_{MsgSheetFiles}
|
||||
^{fileTable}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user