Special topics rows on the Courses page have misaligned columns

Offen Anfängerfreundlich
#481 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 7 Tagen

@zapataa0 arbeitet bereits daran.

Seit 25.11.2026.

  • #482 von @zapataa0 — offen

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
82/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
flask, html, python
Bereich
frontend

Rechercherichtung

Öffne app/templates/snips/courseElements/adminCourseTable.html und vergleiche die <td> der Spalte Course Materials in der regulären Kurszeile bei etwa Zeile 142 mit den Zeilen für Special Topics um Zeile 304-312, die direkt von faculty_credit zu LAST EDITED BY springen. Füge dort die fehlende Resources-Zelle hinzu, die den Ersatztext der regulären Zeile übernimmt, wenn nichts gesetzt ist, und prüfe, ob die Reihenfolge der Kopfzellen übereinstimmt. Starte danach CAS lokal, gehe zu Courses -> Spring 2022 -> African and African American Studies und bestätige, dass eine noch nicht genehmigte Special-Topics-Zeile mit dem Header übereinstimmt.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Problem

On the Courses page (/courses/<term>/<program>), special topics rows have their columns shifted one to the left starting at the Resources column. Regular course rows look fine.

For example, on Spring 2022 / AFR, the row for "AFR 286 African Presence in Latin America" (status: Submitted) shows:

  • steeles (the last editor) under Resources instead of Last Edited
  • the edit/delete icons under Last Edited instead of the last column

This only happens for special topics that are not approved yet (e.g. Submitted). Approved special topics display correctly, because once approved they're stored in the Course table and use the regular row template (see the comment in app/controllers/main_routes/course.py: "We exclude the approved courses, because they'll be stored in the 'Course' table already"). So the bug is only in the special topics row template.

cas-special-topics-bug

Cause

In app/templates/snips/courseElements/adminCourseTable.html, regular course rows have a Course Materials <td> between Faculty Load and Last Edited (around line 142), but the special topics rows skip it and go straight from faculty_credit to LAST EDITED BY (around lines 304-312). So each special topics row has one fewer cell than the header.

Possible fix

Add a Resources <td> to the special topics rows between Faculty Load and Last Edited. If special topics don't have course materials stored, it could just show "Unspecified" like the regular rows do when nothing is set.

To reproduce

  1. Run CAS locally (dev container)
  2. Go to Courses -> Spring 2022 -> African and African American Studies
  3. Scroll to a special topics row that is not Approved yet (e.g. one with a "Submitted" badge) and compare its columns to the header
Vorherrschende Sprache
JavaScript
Sterne
0
Forks
3
Ø Merge
8 T. 5 Std.
Gemergte PRs (30 T.)
6

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

  • Kein Dockerfile und keine Docker-Compose-Datei
  • Hat eine Pull-Request-Vorlage
  • Kein Beitragsleitfaden

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus BCStudentSoftwareDevTeam/cas

Alle Issues in BCStudentSoftwareDevTeam/cas

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.