59 lines
2.3 KiB
Plaintext
59 lines
2.3 KiB
Plaintext
$newline never
|
|
|
|
$# SPDX-FileCopyrightText: 2022 Sarah Vaupel <vaupel.sarah@campus.lmu.de>,Winnie Ros <winnie.ros@campus.lmu.de>
|
|
$#
|
|
$# SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
$# Display a table showing the result of the corrector assignment for possibly several sheets
|
|
$# Expected variables"
|
|
$# sids :: list of SheetId
|
|
$# openSubs :: Map from SheetId to SubAssignInfo, a datatype collecting info about open submissions
|
|
$# assignmentStatus :: Map from SheetId to (Set SubmissionId, Set SubmisionId), i.e. assigned submissions and unassigned submissions for that sheet
|
|
$if null sids
|
|
<p>
|
|
_{MsgSheetNoOldUnassigned}
|
|
$else
|
|
<div .scrolltable>
|
|
<table .table .table--striped>
|
|
<tr .table__row .table__row--head>
|
|
<th .table__th>
|
|
_{MsgTableSheet}
|
|
<th .table__th>
|
|
_{MsgNrSubmissionsTotal}
|
|
<th .table__th>
|
|
_{MsgNrSubmissionsUnassigned}
|
|
<th .table__th>
|
|
_{MsgNrCorrectors}
|
|
$# Header-Styling indicates, whether assignment was attempted or not.
|
|
$with hasAssignment <- not (Map.null assignmentStatus)
|
|
<th :hasAssignment:.table__th>
|
|
_{MsgNrSubmissionsNewlyAssigned}
|
|
<th :hasAssignment:.table__th>
|
|
_{MsgNrSubmissionsNotAssigned}
|
|
|
|
$forall sid <- sids
|
|
$case Map.lookup sid openSubs
|
|
$of Nothing
|
|
<!-- Empty table row; should not occur. -->
|
|
$of Just SubAssignInfo{saiName, saiSubmissionNr, saiUnassignedNr, saiCorrectorNr}
|
|
<tr .table__row>
|
|
<td .table__td>
|
|
#{saiName}
|
|
<td .table__td>
|
|
#{show saiSubmissionNr}
|
|
<td .table__td>
|
|
#{show saiUnassignedNr}
|
|
<td .table__td>
|
|
#{show saiCorrectorNr}
|
|
$case Map.lookup sid assignmentStatus
|
|
$of Nothing
|
|
<td .table__td>
|
|
<!-- no newly assigned submission for this sheet -->
|
|
<td .table__td>
|
|
<!-- no newly unassigned submission for this sheet -->
|
|
$of Just (assigned,unassigned)
|
|
<td .table__td>
|
|
#{show (Set.size assigned)}
|
|
<td .table__td>
|
|
#{show (Set.size unassigned)}
|