Skip to content

Comments

Lous list open seats#968

Closed
brandonistfan wants to merge 15 commits intoenhanced-searchfrom
lous_list_open_seats
Closed

Lous list open seats#968
brandonistfan wants to merge 15 commits intoenhanced-searchfrom
lous_list_open_seats

Conversation

@brandonistfan
Copy link
Contributor

@brandonistfan brandonistfan commented Nov 23, 2024

GitHub Issues addressed

  • This PR closes

Testing

  • A brief explanation of tests done/written or how reviewers can test your work

Note: Ensure that you have the most recent database backup. Additionally, make sure to run docker build --no-cache after checking out this branch.

Reviewers can test my work by modifying the CELERY_BEAT_SCHEDULE in tcf_core/settings/base.py to a time a few minutes ahead of their current time. After making the change, follow these steps:

  1. Run the following command:
docker-compose restart celery_worker celery_beat
  1. View the logs by running:
docker-compose logs -f celery_worker
  1. This process will populate the database with the correct enrollment records. Once populated (or at least some of the sections are populated), you can test the filters to query based on open sections. Be sure to test applying the filters in both the dropdown search menu and the advanced search menu to confirm that the functionality works as intended.

What I did

  • Created SectionEnrollment model to track course section enrollment
  • Implemented celery task to update enrollment and waitlist data daily at 4 AM EST
  • Added open sections filter to course search functionality
  • Integrated open sections filter into dropdown and advanced search UI
  • Updated Course model and search view to handle open sections filtering

Screenshots

  • Before
image image image

Open Section Filter Not Applied
image

  • After
image image image

Open Section Filter Applied
image

Questions/Discussions/Notes

  • I'm encountering a bug on the advanced search page. When I select the checkbox directly, it behaves as expected by applying the filter and does not appear as a selected filter in the display on the top of the screen. However, when I click on the label associated with the checkbox, instead of selecting the checkbox, it applies the filter to the display at the top of the screen. Despite this behavior, the filters are being correctly applied in both cases and the search functions as expected.

Nothing Selected:
image

Selected Checkbox:
image

Selected Label:
image

Intended Functionality:

Advanced Search Page:

  • Clicking either the checkbox or its label should select the checkbox.
  • The filter should only appear in the top search bar after submitting a query.

Dropdown Search Menu:

  • This functions correctly, showing the filter in the top search bar when selected. It does not need to be modified.

@brandonistfan brandonistfan changed the base branch from dev to enhanced-search November 23, 2024 02:08
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