Closed edward0414 closed 5 years ago
I think I figured out the problem. Let's say we are logged in as an instructor with Karen and Karen will be teaching csc209. By the changes made in the merge pull request #148, our application only asks to fetch relevant course data from the database (i.e., the courses that Karen will be teaching, csc209). However, let's say there's an applicant who has several course preferences, (csc148, csc209) for example. Upon selecting this applicant's last name, it will try to access csc148 data but then csc148 data was not fetched from the database, which is causing the problem.
I guess there are two ways of solving this.
I would like to ask you guys on which option sounds better. Both approaches seem OK to me.
Thanks for looking into that @jsyoon01
Probably try to avoid option 2. Fetching all that data seems unnecessary for just a couple sections in a modal. And that may get more complicated for different rounds, and sessions.
Upon selecting this applicant's last name, it will try to access csc148 data
If I understand option 1 correctly @jsyoon01, to fix the bug, it should be uncomplicated to set up a fetch for csc148 data when opening a modal, even if its not one of the instructor's courses. It is not unreasonable to do a new API fetch at opening each modal.
But that being said, I don't fully understand for example, why do we want to fetch csc148 data in a modal if a prof does not have that class in their instructor view?
Nige: "the modal doesn't come up and my browser window freezes when clicking the last name. I haven't been able to spot the reason in the code, yet."