Skip to content

Add semester field to courses#331

Open
alxstx wants to merge 7 commits intomainfrom
add-semester-to-courses
Open

Add semester field to courses#331
alxstx wants to merge 7 commits intomainfrom
add-semester-to-courses

Conversation

@alxstx
Copy link

@alxstx alxstx commented Mar 7, 2026

Changes

  • Added database migration to add semester string column to the courses table
  • Course model populates semester from Canvas term data (e.g. "Spring 2026") when importing courses
  • Added by_semester scope to Course model for filtering courses by semester
  • Added backfill rake task (rake courses:backfill_semester) to populate semester for existing courses by fetching term data from Canvas API

Testing

  • Run bundle exec rspec to verify all tests pass
  • After deploying, run the migration and backfill task:
    heroku run rails db:migrate -a sp26-02-flextensions
    heroku run rake courses:backfill_semester -a sp26-02-flextensions
    

Documentation

No documentation needed

Checklist

  • Name of branch corresponds to story
  • 80%+ test coverage with all tests passing

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.

1 participant