From 5ffee38979e239c40390c4c5e4ac8db1532bbede Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Wed, 19 Feb 2020 11:14:51 +0100 Subject: [PATCH] feat: targets on InfoLecturerR --- frontend/src/utils/pageactions/pageactions.js | 13 +- messages/uniworx/de-de-formal.msg | 8 +- messages/uniworx/en-eu.msg | 8 +- src/Foundation.hs | 17 +- src/Handler/Info.hs | 2 + .../i18n/allocation-info/de-de-formal.hamlet | 159 +++++++++--------- templates/i18n/allocation-info/en-eu.hamlet | 155 +++++++++-------- .../i18n/info-lecturer/de-de-formal.hamlet | 19 ++- templates/i18n/info-lecturer/en-eu.hamlet | 19 ++- 9 files changed, 221 insertions(+), 179 deletions(-) diff --git a/frontend/src/utils/pageactions/pageactions.js b/frontend/src/utils/pageactions/pageactions.js index 97a719ea4..7c2334b6e 100644 --- a/frontend/src/utils/pageactions/pageactions.js +++ b/frontend/src/utils/pageactions/pageactions.js @@ -12,6 +12,7 @@ const PAGEACTION_SECONDARY_CLASS = 'pagenav-secondary'; export class PageActionSecondaryUtil { _element; navIdent; + idPrefix; radioButton; closeButton; container; @@ -47,12 +48,20 @@ export class PageActionSecondaryUtil { this.navIdent = links[0].id; } - this.radioButton = document.getElementById(`pageaction-item__expand-${this.navIdent}`); + const idMatch = this.navIdent.match(/^(r[0-9]+__)(.+)$/); + if (idMatch) { + this.idPrefix = idMatch[1]; + this.navIdent = idMatch[2]; + } else { + this.idPrefix = ''; + } + + this.radioButton = document.getElementById(`${this.idPrefix}pageaction-item__expand-${this.navIdent}`); if (!this.radioButton) { throw new Error('Pageaction Secondary utility could not find associated radio button!'); } - this.closeButton = document.getElementById('pageaction-item__expand-none'); + this.closeButton = document.getElementById(`${this.idPrefix}pageaction-item__expand-none`); if (!this.closeButton) { throw new Error('Pageaction Secondary utility could not find radio button for closing!'); } diff --git a/messages/uniworx/de-de-formal.msg b/messages/uniworx/de-de-formal.msg index 7c771f140..8bc16a232 100644 --- a/messages/uniworx/de-de-formal.msg +++ b/messages/uniworx/de-de-formal.msg @@ -2327,4 +2327,10 @@ NoFilter: Keine Einschränkung ExamGradingPass: Bestanden/Nicht Bestanden ExamGradingGrades: Numerische Noten -ExamGradingMixed: Gemischt \ No newline at end of file +ExamGradingMixed: Gemischt + +InfoLecturerCourses: Veranstaltungen +InfoLecturerExercises: Übungsbetrieb +InfoLecturerTutorials: Tutorien +InfoLecturerExams: Prüfungen +InfoLecturerAllocations: Zentralanmeldungen \ No newline at end of file diff --git a/messages/uniworx/en-eu.msg b/messages/uniworx/en-eu.msg index e8f00c10e..0f9f3a61f 100644 --- a/messages/uniworx/en-eu.msg +++ b/messages/uniworx/en-eu.msg @@ -2327,4 +2327,10 @@ NoFilter: No restriction ExamGradingPass: Passed/Failed ExamGradingGrades: Numeric grades -ExamGradingMixed: Mixed \ No newline at end of file +ExamGradingMixed: Mixed + +InfoLecturerCourses: Courses +InfoLecturerExercises: Course Exercises +InfoLecturerTutorials: Tutorials +InfoLecturerExams: Exams +InfoLecturerAllocations: Central allocations \ No newline at end of file diff --git a/src/Foundation.hs b/src/Foundation.hs index 6c9f11c3f..56c0f7328 100644 --- a/src/Foundation.hs +++ b/src/Foundation.hs @@ -2904,7 +2904,22 @@ pageActions HelpR = return , navQuick' = mempty , navForceActive = False } - , navChildren = [] + , navChildren = do + (section, navLabel) <- + [ ("courses", MsgInfoLecturerCourses) + , ("exercises", MsgInfoLecturerExercises) + , ("tutorials", MsgInfoLecturerTutorials) + , ("exams", MsgInfoLecturerExams) + , ("allocations", MsgInfoLecturerAllocations) + ] :: [(Text, UniWorXMessage)] + return NavLink + { navLabel + , navRoute = InfoLecturerR :#: section + , navAccess' = return True + , navType = NavTypeLink { navModal = False } + , navQuick' = mempty + , navForceActive = False + } } , NavPageActionPrimary { navLink = NavLink diff --git a/src/Handler/Info.hs b/src/Handler/Info.hs index dc44d3b35..dfc39e730 100644 --- a/src/Handler/Info.hs +++ b/src/Handler/Info.hs @@ -49,6 +49,8 @@ getInfoLecturerR = setTitleI MsgInfoLecturerTitle $(i18nWidgetFile "info-lecturer") where + allocationInfo = $(i18nWidgetFile "allocation-info") + tooltipNew, tooltipProblem, tooltipPlanned, tooltipNewU2W :: WidgetFor UniWorX () tooltipNew = [whamlet| _{MsgLecturerInfoTooltipNew} |] tooltipProblem = [whamlet| _{MsgLecturerInfoTooltipProblem} |] diff --git a/templates/i18n/allocation-info/de-de-formal.hamlet b/templates/i18n/allocation-info/de-de-formal.hamlet index 751af12b5..3e0fb013c 100644 --- a/templates/i18n/allocation-info/de-de-formal.hamlet +++ b/templates/i18n/allocation-info/de-de-formal.hamlet @@ -1,86 +1,85 @@ $newline text -
-

- Jede Zentralanmeldung durchläuft - der Reihe nach folgende Phasen: -

-
- _{MsgAllocationStaffRegister} -
-

- Veranstalter können nur in diesem Zeitraum ihre Veranstaltungen - zur Zentralanmeldung hinzufügen oder entfernen. -

- Pro Veranstaltung wird einzeln festgelegt, - ob Studierende einen Bewerbungstext und/oder Bewerbungsdateien - einreichen sollen. - Veranstalter stellen auch Anweisungen zur Bewerbung ein, - z.B. welchen Inhalt abzugebende Bewerbungsdateien enthalten sollen. -

- Zur Zentralanmeldung eingetragene Kurse - erlauben während dem gesamten Ablauf - der Zentralanmeldung keine anderweitigen Kursanmeldung mehr, - auch nicht durch den Veranstalter selbst. +

+ Jede Zentralanmeldung durchläuft + der Reihe nach folgende Phasen: +

+
+ _{MsgAllocationStaffRegister} +
+

+ Veranstalter können nur in diesem Zeitraum ihre Veranstaltungen + zur Zentralanmeldung hinzufügen oder entfernen. +

+ Pro Veranstaltung wird einzeln festgelegt, + ob Studierende einen Bewerbungstext und/oder Bewerbungsdateien + einreichen sollen. + Veranstalter stellen auch Anweisungen zur Bewerbung ein, + z.B. welchen Inhalt abzugebende Bewerbungsdateien enthalten sollen. +

+ Zur Zentralanmeldung eingetragene Kurse + erlauben während dem gesamten Ablauf + der Zentralanmeldung keine anderweitigen Kursanmeldung mehr, + auch nicht durch den Veranstalter selbst. -

- _{MsgAllocationRegister} -
-

- Studierende können sich nur in diesem Zeitraum - auf Plätze in Kursen einer Zentralanmeldung bewerben. -

- Bewerber können jedem Kurs der Zentralanmeldung eine Priorität zuweisen, - zwischen "dieser Kurs wäre meine erste Wahl" und "diesen Kurs besuche - ich nur, wenn ich keinen anderen Platz kriege". - Es kann auch mehreren Kursen die gleiche Priorität eingeräumt werden. -

- Bewerbungen für und Prioritisierung der Kurse können innerhalb des - Bewerbungszeitraums beliebig angepasst und zurückgezogen werden. -

- Studierende können auch mehr als einen Platz - in verschiedenen Kursen einer Zentralanmeldung anfordern, - falls die Kurskapazitäten und/oder Dringlichkeit ausreichend sind. -

- Bewerbungstexte und/oder Bewerbungsdateien - sind pro Kurs anzugeben, falls vom Veranstalter gefordert. +

+ _{MsgAllocationRegister} +
+

+ Studierende können sich nur in diesem Zeitraum + auf Plätze in Kursen einer Zentralanmeldung bewerben. +

+ Bewerber können jedem Kurs der Zentralanmeldung eine Priorität zuweisen, + zwischen "dieser Kurs wäre meine erste Wahl" und "diesen Kurs besuche + ich nur, wenn ich keinen anderen Platz kriege". + Es kann auch mehreren Kursen die gleiche Priorität eingeräumt werden. +

+ Bewerbungen für und Prioritisierung der Kurse können innerhalb des + Bewerbungszeitraums beliebig angepasst und zurückgezogen werden. +

+ Studierende können auch mehr als einen Platz + in verschiedenen Kursen einer Zentralanmeldung anfordern, + falls die Kurskapazitäten und/oder Dringlichkeit ausreichend sind. +

+ Bewerbungstexte und/oder Bewerbungsdateien + sind pro Kurs anzugeben, falls vom Veranstalter gefordert. -

- _{MsgAllocationStaffAllocation} -
-

- Veranstalter können nur in diesem Zeitraum die - Bewerbungen einsehen und bewerten. - $#

- $# Nur in manchen Zentralanmeldungen dürfen Veranstalter - $# Bewerber jetzt direkt ablehnen und/oder übernehmen. - $#

- $# Veranstalter haben noch eine letzte Möglichkeit, - $# die Kurskapazität anzupassen. +

+ _{MsgAllocationStaffAllocation} +
+

+ Veranstalter können nur in diesem Zeitraum die + Bewerbungen einsehen und bewerten. + $#

+ $# Nur in manchen Zentralanmeldungen dürfen Veranstalter + $# Bewerber jetzt direkt ablehnen und/oder übernehmen. + $#

+ $# Veranstalter haben noch eine letzte Möglichkeit, + $# die Kurskapazität anzupassen. -

- _{MsgAllocationProcess} -
-

- Die Plätze werden gemäß Studienfortschritt, Dringlichkeit - und der Bewertung durch den Veranstalter auf die Bewerber verteilt. -

- Die Bewerber werden diekt in den jeweiligen Kursen angemeldet. - Übernommene Bewerber, welche einen zugeteilten Platz - ohne Angabe eines triftigen Grundes nicht antreten, - werden in zukünftigen Zentralanmeldungen - unter Umständen benachteiligt. -

- Veranstalter können frühestens nach der erfolgten Zuteilung - Teilnehmer selbst an-/abmelden - und ggf. Nachrücker für freigewordene Plätze anfordern. +

+ _{MsgAllocationProcess} +
+

+ Die Plätze werden gemäß Studienfortschritt, Dringlichkeit + und der Bewertung durch den Veranstalter auf die Bewerber verteilt. +

+ Die Bewerber werden diekt in den jeweiligen Kursen angemeldet. + Übernommene Bewerber, welche einen zugeteilten Platz + ohne Angabe eines triftigen Grundes nicht antreten, + werden in zukünftigen Zentralanmeldungen + unter Umständen benachteiligt. +

+ Veranstalter können frühestens nach der erfolgten Zuteilung + Teilnehmer selbst an-/abmelden + und ggf. Nachrücker für freigewordene Plätze anfordern. -

- Der Ablauf einer Zentralanmeldung kann unter Umständen noch variieren. - - Insbesondere: # - Fehlt in der Übersichtsseite einer Zentralanmeldung die Angabe einer dieser - Phasen, dann wurden die entsprechenden Zeiten noch nicht festgelegt! -

- Mehrere Zentralanmeldungen werden völlig unabhängig voneinander - abgewickelt. +

+ Der Ablauf einer Zentralanmeldung kann unter Umständen noch variieren. + + Insbesondere: # + Fehlt in der Übersichtsseite einer Zentralanmeldung die Angabe einer dieser + Phasen, dann wurden die entsprechenden Zeiten noch nicht festgelegt! +

+ Mehrere Zentralanmeldungen werden völlig unabhängig voneinander + abgewickelt. diff --git a/templates/i18n/allocation-info/en-eu.hamlet b/templates/i18n/allocation-info/en-eu.hamlet index ecf082e92..c08cfdf21 100644 --- a/templates/i18n/allocation-info/en-eu.hamlet +++ b/templates/i18n/allocation-info/en-eu.hamlet @@ -1,88 +1,87 @@ $newline text -

-

- Every central allocations progresses through the following stages in order: -

-
- _{MsgAllocationStaffRegister} -
-

- Course administrators may register their courses for participation in - the central allocation and deregister them again at will. -

- Whether students are expected to provide text or files with their - applications is configured on a course-by-course basis. - Course administrators may specify instructions for application e.g. what - content the application files should have. -

- Courses registered for participation in the central allocation can not - gain participants through the entire course of the allocation. - Not even through manual enrollment by course administrators. +

+ Every central allocations progresses through the following stages in order: +

+
+ _{MsgAllocationStaffRegister} +
+

+ Course administrators may register their courses for participation in + the central allocation and deregister them again at will. +

+ Whether students are expected to provide text or files with their + applications is configured on a course-by-course basis. + Course administrators may specify instructions for application e.g. what + content the application files should have. +

+ Courses registered for participation in the central allocation can not + gain participants through the entire course of the allocation. + Not even through manual enrollment by course administrators. -

- _{MsgAllocationRegister} -
-

- Only during this phase may students apply to the various courses which - participate in the central allocation. -

- Applicants may assign priorities ("this course would be my first choice" - down to "I will only participate in this course if nothing else is - available to me") to courses they apply to. - Multiple courses may have the same priority. -

- Applications and priorities may be freely edited and retracted during - the application period. -

- Students may request more than one placement from a central allocation. +

+ _{MsgAllocationRegister} +
+

+ Only during this phase may students apply to the various courses which + participate in the central allocation. +

+ Applicants may assign priorities ("this course would be my first choice" + down to "I will only participate in this course if nothing else is + available to me") to courses they apply to. + Multiple courses may have the same priority. +

+ Applications and priorities may be freely edited and retracted during + the application period. +

+ Students may request more than one placement from a central allocation. - Additional placements are made if sufficient capacity is available - and/or placements are sufficiently urgent. -

- Application texts and/or files need to be specified for each course - individually, as requested by the course administrators. + Additional placements are made if sufficient capacity is available + and/or placements are sufficiently urgent. +

+ Application texts and/or files need to be specified for each course + individually, as requested by the course administrators. -

- _{MsgAllocationStaffAllocation} -
-

- Only during this phase may course administrators inspect and grade - applications. - $#

- $# Nur in manchen Zentralanmeldungen dürfen Veranstalter - $# Bewerber jetzt direkt ablehnen und/oder übernehmen. - $#

- $# Veranstalter haben noch eine letzte Möglichkeit, - $# die Kurskapazität anzupassen. +

+ _{MsgAllocationStaffAllocation} +
+

+ Only during this phase may course administrators inspect and grade + applications. + $#

+ $# Nur in manchen Zentralanmeldungen dürfen Veranstalter + $# Bewerber jetzt direkt ablehnen und/oder übernehmen. + $#

+ $# Veranstalter haben noch eine letzte Möglichkeit, + $# die Kurskapazität anzupassen. -

- _{MsgAllocationProcess} -
-

- Placements in courses are made with regard to the current study - progress, urgency, and the grading of the application as determined by a - course administrator. -

- Applicants are directly enrolled in the selected courses. +

+ _{MsgAllocationProcess} +
+

+ Placements in courses are made with regard to the current study + progress, urgency, and the grading of the application as determined by a + course administrator. +

+ Applicants are directly enrolled in the selected courses. - Applicants which leave courses they were assigned in the course of a - central allocation may be affected negatively by this in future central - allocations. -

- Only after placements have been made, may course administrators enroll - and deregister participants of their courses. - Course administrators can request to be assigned successors to fill - their courses' remaining capacity. + Applicants which leave courses they were assigned in the course of a + central allocation may be affected negatively by this in future central + allocations. +

+ Only after placements have been made, may course administrators enroll + and deregister participants of their courses. + Course administrators can request to be assigned successors to fill + their courses' remaining capacity. -

- Central allocation procedure may vary. +

+ Central allocation procedure may vary. - - In particular: # + + In particular: # - If, on the central allocation's page, no times are specified for one of the - phases mentioned above, the time in question has not been determined yet! -

- Multiple central allocations are handled entirely independently of one - another. + If, on the central allocation's page, no times are specified for one of the + phases mentioned above, the time in question has not been determined yet! +

+ Multiple central allocations are handled entirely independently of one + another. diff --git a/templates/i18n/info-lecturer/de-de-formal.hamlet b/templates/i18n/info-lecturer/de-de-formal.hamlet index 740a859dc..80eccd710 100644 --- a/templates/i18n/info-lecturer/de-de-formal.hamlet +++ b/templates/i18n/info-lecturer/de-de-formal.hamlet @@ -1,7 +1,6 @@ $newline text

-
-

Veranstaltungen +

_{MsgInfoLecturerCourses}
Veranstaltungs-Bezeichner @@ -138,7 +137,7 @@ $newline text In Zukunft sind E-Mail-Benachrichtigungen bei Änderungen an den Terminen geplant.
-

Übungsbetrieb +

_{MsgInfoLecturerExercises}
Korrektoren @@ -230,7 +229,7 @@ $newline text dem jeweiligen Korrektor zum Arbeitspensum angerechnet.
-

Tutorien +

_{MsgInfoLecturerTutorials}
Termine @@ -286,8 +285,8 @@ $newline text Kursverwalter können über die Teilnehmerliste der Veranstaltung Kursteilnehmer in Tutorien einteilen. -
-

Prüfungen +
+

_{MsgInfoLecturerExams}

Das Verwalten von Prüfungen im Allgemeinen sind bereits großteils implementiert und einsetzbar. ^{newU2WFeat} In Erweiterung zu UniWorX werden nun neben Klausuren auch allgemeinere Prüfungsformen unterstüzt, z.B. mündliche Prüfungen oder auch Projektabnahmen, bei denen die Teilnehmer in kleineren Gruppen zu verschiedenen Zeitpunkten und in verschiedenen Räumen geprüft werden.

@@ -366,8 +365,8 @@ $newline text hierüber automatisiert eine Benachrichtigung. -
-

Zentralanmeldungen +
+

_{MsgInfoLecturerAllocations}
Namensschema @@ -399,6 +398,10 @@ $newline text Veranstalter können, wenn sie das möchten, den Bewerbern ein Feedback zu ihren Bewerbungen geben. +
Ablauf +
+ ^{allocationInfo} +

Sonstiges diff --git a/templates/i18n/info-lecturer/en-eu.hamlet b/templates/i18n/info-lecturer/en-eu.hamlet index bad719af5..20825bf44 100644 --- a/templates/i18n/info-lecturer/en-eu.hamlet +++ b/templates/i18n/info-lecturer/en-eu.hamlet @@ -1,7 +1,6 @@ $newline text
-
-

Courses +

_{MsgInfoLecturerCourses}
Course Names @@ -121,7 +120,7 @@ $newline text Email notifications on changes of the dates are planned in the future.
-

Course Exercises +

_{MsgInfoLecturerExercises}
Correctors @@ -200,7 +199,7 @@ $newline text submissions according to the corrector's correction proportions.
-

Tutorials +

_{MsgInfoLecturerTutorials}
Occurrences @@ -253,8 +252,8 @@ $newline text Course administrators can assign course participants to tutorials using the list of course participants. -
-

Exams +
+

_{MsgInfoLecturerExams}

Large parts of the management of exams have been implemented and are already usable.
^{newU2WFeat} In addition to UniWorX, Uni2work supports more general forms of exams (e.g. oral exams, practical exams), for which participants can be grouped and examined in different rooms and on different occurrences per group. @@ -339,8 +338,8 @@ $newline text to the exam offices. The offices that are affected by these changes will be automatically notified. -

-

Central Allocations +
+

_{MsgInfoLecturerAllocations}
Naming Schema @@ -368,6 +367,10 @@ $newline text
If so desired, course administrators can send back feedback on student's applications. +
Process +
+ ^{allocationInfo} +

Miscellaneous