Skip to content

[Planner] Prerequisite check false-positive for alternate-semester mods if placed in the wrong semester of a future year  #4231

@yadobler

Description

@yadobler

Describe the bug

If a module (eg LAC4202) that is held on alternative semesters (ie only offered Semester 2) is placed in the wrong semester (ie Semester 1) of any future year, it is incorrectly marked green (meeting all prerequisites + available for semester).

  • Placing on the correct semester (ie Semester 2) of any year will correctly trigger prerequisite check (either turn green or yellow depending on whether the prerequisites are met)
  • Placing on the wrong semester of any year less than or equal to the current year will turn the module yellow with the warning that it is not offered for the semester.
year correct sem wrong sem
up to current year prereq check works correctly not-offered check triggers
> current year prereq check works correctly Green (no prereq check happens)

To Reproduce

Steps to reproduce the behavior:

  1. Go to planner
  2. Go to settings
  3. Set Graduating to any future year (eg In 2 years (AY27/28))
  4. Exit settings
  5. Add LAC4202 to any valid semester (ie Semester 2 of current year)
  6. Drag it to the wrong semester of a future year (eg 2026/2027 Semester 1)
  7. Module turns green

Expected behavior

Module turns yellow with either:

  • incorrect semester warning (ie Module may only be offered in Sem 2)
  • unfulfilled prerequisites warning (ie These courses may need to be taken first)

Screenshots

  • LAC4202 on the wrong sem = wrong sem warning
  • CS4221 on the correc sem = unfulfilled prerequisites warning
Image

Bug:

  • LAC4202 on the wrong sem = Green
  • CS4221 on the correc sem = unfulfilled prerequisites warning
  • LAC3201 / LAC2201 (offered on both semesters) = unfulfilled prerequisites warning
  • ignore the banana cursor
Image

Desktop (please complete the following information):

  • OS: NixOS 25.11.20250706.1fd8bad (Xantusia) x86_64
  • DE: niri (Wayland)
  • Browser: Brave 1.80.113 (Official Build) (64-bit) Chromium: 138.0.7204.49
  • NUSMods R version: 20250907-d81459f.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions