Skip to content

fix(subject): stop showing BMAT102L for subjects without a course code - #568

Open
Dx-Alz-xD wants to merge 1 commit into
CodeChefVIT:stagingfrom
Dx-Alz-xD:krish/no-default-course-code
Open

Dx-Alz-xD wants to merge 1 commit into
CodeChefVIT:stagingfrom
Dx-Alz-xD:krish/no-default-course-code

Conversation

@Dx-Alz-xD

Copy link
Copy Markdown

📌 Purpose

extractBracketContent fell back to "BMAT102L" when a subject had no [CODE], so cards showed it and downloads were named BMAT102L-CAT-1-A1-2023.pdf.


Corresponding issue: closes #548


🖼️ Showcase

A paper for "English" now downloads as English-CAT-1-A1-2024.pdf, and its card no longer shows BMAT102L.


🔧 Changes

  • extractBracketContent returns null when there's no code
  • New courseCodeOrName(subject): the code if there is one, otherwise the subject name
  • File names (single download, zip, viewer) use courseCodeOrName

➕ Additional Notes

  • Subjects with a code behave exactly as before

extractBracketContent fell back to BMAT102L when a subject had no code in
brackets, so cards showed it and downloads were named after it. it now
returns null, the card leaves the code out, and file names use the
subject name instead

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hardcoded "BMAT102L" Default Course Code

1 participant