chore: fix tests

This commit is contained in:
Gregor Kleen 2020-03-03 17:42:27 +01:00
parent 3e3c1334ca
commit 3c7d9b6112
5 changed files with 111 additions and 9 deletions

View File

@ -402,6 +402,7 @@ UnauthorizedSchoolAdmin: You are no administrator for this department.
UnauthorizedAdminEscalation: You aren't an administrator for all departments for which this user is an administrator.
UnauthorizedExamOffice: You are not part of an exam office.
UnauthorizedEvaluation: You are not charged with course evaluation.
UnauthorizedAllocationAdmin: You are not charged with the administration of central allocations.
UnauthorizedExamExamOffice: You are not part of the appropriate exam office for any of the participants of this exam.
UnauthorizedExternalExamExamOffice: You are not part of the appropriate exam office for any of the participants of this exam.
UnauthorizedSchoolLecturer: You are no lecturer for this department.
@ -1013,6 +1014,7 @@ NotificationTriggerKindEvaluation: For course evaluations
NotificationTriggerKindAllocationStaff: For central allocations (lecturers)
NotificationTriggerKindAllocationParticipant: For central allocations
NotificationTriggerKindSubmissionUser: For participants in an exercise sheet submission
NotificationTriggerKindAllocationAdmin: For administrators of central allocations
CorrCreate: Register submissions
UnknownPseudonymWord pseudonymWord: Invalid pseudonym-word “#{pseudonymWord}”
@ -1209,6 +1211,8 @@ MenuExternalExamNew: New external exam
MenuExternalExamList: External exams
MenuParticipantsList: Lists of course participants
MenuParticipantsIntersect: Common course participants
MenuAllocationUsers: Applicants
MenuAllocationPriorities: Central priorities
BreadcrumbSubmissionFile: File
BreadcrumbSubmissionUserInvite: Invitation to participate in a submission
@ -1274,6 +1278,8 @@ BreadcrumbParticipantsList: Lists of course participants
BreadcrumbParticipants: Course participants
BreadcrumbExamAutoOccurrence: Automatic occurrence/room distribution
BreadcrumbStorageKey: Generate storage key
BreadcrumbAllocationUsers: Applicants
BreadcrumbAllocationPriorities: Central priorities
ExternalExamEdit coursen examn: Edit: #{coursen}, #{examn}
ExternalExamGrades coursen examn: Exam achievements: #{coursen}, #{examn}
@ -1288,6 +1294,7 @@ AuthTagFree: Page is freely accessable
AuthTagAdmin: User is administrator
AuthTagExamOffice: User is part of an exam office
AuthTagEvaluation: User is charged with course evaluation
AuthTagAllocationAdmin: User is charged with administration of central allocations
AuthTagToken: User is presenting an authorisation-token
AuthTagNoEscalation: User permissions are not being expanded to other departments
AuthTagDeprecated: Page is not deprecated
@ -2003,6 +2010,7 @@ SchoolAdmin: Admin
SchoolLecturer: Lecturer
SchoolEvaluation: Course evaluation
SchoolExamOffice: Exam office
SchoolAllocation: Administration of central allocations
ApplicationEditTip: During the application period you may edit and retract your applications at will.
@ -2334,5 +2342,32 @@ InfoLecturerTutorials: Tutorials
InfoLecturerExams: Exams
InfoLecturerAllocations: Central allocations
ParticipantsIntersectCourseOption tid@TermId ssh@SchoolId coursen@CourseName: #{tid} - #{ssh} - #{coursen}
ParticipantsIntersectCourses: Courses
ParticipantsIntersectCourseOption tid ssh coursen: #{tid} - #{ssh} - #{coursen}
ParticipantsIntersectCourses: Courses
AllocationUsersTitle tid ssh ash: #{tid}-#{ssh}-#{ash}: Applicants
AllocationUsersApplied: Applications
AllocationUsersAssigned: Assignments
AllocationUsersVetoed: Vetos
AllocationUsersRequested: Requested assignments
AllocationUsersPriority: Central priority
CsvColumnAllocationUserSurname: Applicant's surname(s)
CsvColumnAllocationUserFirstName: Applicants's first name(s)
CsvColumnAllocationUserName: Applicant's full name
CsvColumnAllocationUserMatriculation: Applicant's matriculation
CsvColumnAllocationUserRequested: Maximum number of placements the applicant is prepared to accept
CsvColumnAllocationUserApplied: Number of applications the applicant has provided
CsvColumnAllocationUserVetos: Number of applications that have received a veto from a course administrator or have been rated with a grade that is equivalent to "failed" (5.0)
CsvColumnAllocationUserAssigned: Number of assignments the applicant has already received
CsvColumnAllocationUserPriority: Central priority of this applicant; either a number based on the applicants position in the list sorted by priority (higher numbers mean a higher priority) or a comma-separated list of numerical priorities in square brackets (e.g. [1, 2, 3])
AllocationUsersCsvName tid ssh ash: #{foldCase (termToText (unTermKey tid))}-#{foldedCase (unSchoolKey ssh)}-#{foldedCase ash}-applicants
AllocationPrioritiesMode: Mode
AllocationPrioritiesNumeric: Numeric priorities
AllocationPrioritiesOrdinal: Priorities based on sorted list
AllocationPrioritiesTitle tid ssh ash: #{tid}-#{ssh}-#{ash}: Central priorities
AllocationPrioritiesFile: CSV file
AllocationPrioritiesSunk num: Successfully registered central priorities for #{num} #{pluralEN num "applicant" "applicants"}
AllocationPrioritiesMissing num: Could not register central priorities for #{num} #{pluralEN num "applicant" "applicants"} because their matriculation was not found in the uploaded CSV file
AllocationMissingPrioritiesIgnored: Applicants for whom no central priority has been registered will be ignored during assignment!

View File

@ -188,16 +188,16 @@ postAUsersR tid ssh ash = do
| otherwise -> $(widgetFile "table/cell/allocation-courses")
dbtSorting = mconcat
[ sortUserName' $ queryUser . $(multifocusG 2) (to (E.^. UserDisplayName)) (to (E.^. UserSurname))
, sortUserMatriculation $ queryUser . (to (E.^. UserMatrikelnummer))
, sortUserMatriculation $ queryUser . to (E.^. UserMatrikelnummer)
, sortAllocationApplied queryAppliedCourses
, sortAllocationAssigned queryAssignedCourses
, sortAllocationRequested $ queryAllocationUser . (to (E.^. AllocationUserTotalCourses))
, sortAllocationRequested $ queryAllocationUser . to (E.^. AllocationUserTotalCourses)
, sortAllocationVetoed queryVetoedCourses
, sortAllocationPriority $ queryAllocationUser . (to (E.^. AllocationUserPriority))
, sortAllocationPriority $ queryAllocationUser . to (E.^. AllocationUserPriority)
]
dbtFilter = mconcat
[ fltrUserName' $ queryUser . (to (E.^. UserDisplayName))
, fltrUserMatriculation $ queryUser . (to (E.^. UserMatrikelnummer))
[ fltrUserName' $ queryUser . to (E.^. UserDisplayName)
, fltrUserMatriculation $ queryUser . to (E.^. UserMatrikelnummer)
]
dbtFilterUI = mconcat
[ fltrUserNameUI'
@ -222,8 +222,7 @@ postAUsersR tid ssh ash = do
& defaultSorting [SortAscBy "priority", SortAscBy "user-matriculation"]
& defaultPagesize PagesizeAll
usersTable <- dbTableDB' allocationUsersDBTableValidator allocationUsersDBTable
return usersTable
dbTableDB' allocationUsersDBTableValidator allocationUsersDBTable
siteLayoutMsg MsgMenuAllocationUsers $ do
setTitleI $ MsgAllocationUsersTitle tid ssh ash

View File

@ -0,0 +1,25 @@
$newline never
<section>
^{priosForm}
<section>
<dl .deflist>
<dt .deflist__dt>
Effect size of ratings for numeric priorities
<p .deflist__explanation>
Course administrators may rate their applications. #
The allocation process is impacted by such ratings to a degree #
corresponding to a difference in numeric priorities of plus or #
minus the given value.
<dd .deflist__dd>
#{rationalToFixed2 gradeScale}
<dt .deflist__dt>
Effect size of ratings for priorities based on a sorted list
<p .deflist__explanation>
Course administrators may rate their applications. #
The allocation process is impacted by such ratings to a degree #
corresponding to a difference in placement within the sorted #
list of plus or minus the given proportion.
<dd .deflist__dd>
#{textPercent gradeOrdinalProportion 1}

View File

@ -0,0 +1,21 @@
$newline never
It is expected that the first column of the uploaded CSV file contains #
the matriculations of applicants to the central allocation.
<br />
All further columns are interpreted as integers that encode the #
central priorities. #
Higher numbers correspond to higher central priorities. #
The highest of the given priorities is used for the first assignment, #
the second priority for the second assignment, etc. #
In the event that more assginments are considered than priorities have #
been provided, the lowest priority is used.
<br />
The CSV file may not contain column headers.

View File

@ -0,0 +1,22 @@
$newline never
It is expected that the uploaded CSV file consists of exactly one #
column containing the matriculations of applicants to the central #
allocation.
<br />
The central priority is determined by an applicants position within #
the sorted CSV file. #
Applicants whose matriculation appears later in the CSV file are #
assigned a higher central priority than applicants whose matriculation #
appears earlier. #
For their second assignment all applicants have a lower central #
priority than all other applicants have for their first assignment, #
etc.
<br />
The CSV file may not contain column headers.