Special topics rows on the Courses page have misaligned columns

Open Beginner friendly
#481 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 7 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
flask, html, python
Domain
frontend

Research direction

Open app/templates/snips/courseElements/adminCourseTable.html and compare the regular course row's Course Materials <td> near line 142 with the special topics rows around lines 304-312, which jump from faculty_credit straight to LAST EDITED BY. Add the missing Resources cell there, mirroring the regular row's fallback text when nothing is set, and check the header cell order matches. Then run CAS locally, go to Courses -> Spring 2022 -> African and African American Studies, and confirm a not-yet-approved special topics row lines up with the header.

Written by the indexing model from the issue text.

Description

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
Dominant language
JavaScript
Stars
0
Forks
3
Avg merge
8d 5h
Merged PRs (30d)
6

Getting set up

Open in Codespaces

Starts the project's dev container in your browser, under your own GitHub account.

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from BCStudentSoftwareDevTeam/cas

All issues in BCStudentSoftwareDevTeam/cas

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.