yacs.n icon indicating copy to clipboard operation
yacs.n copied to clipboard

Professor names + emails on individual course pages

Open i-am-david-liu opened this issue 3 years ago • 9 comments

Issue

Closes #381

Note: doesn't fully close #381, as it will only add professor emails and their names, the latter which is unrelated to the issue entirely. Should I make a new issue that's more specific?

Database Changes/Migrations

Adds "course_instructor" and "email" column to .csv

Photos to

TO DO

  • Display emails for courses with more than one instructor
  • Revise test cases

i-am-david-liu avatar Jul 23 '21 17:07 i-am-david-liu

I see in the description you say it adds professor names. Was that not already being parsed through into the csv? If not the logic to do so should already exist as I know I wrote it.

marchdan avatar Jul 23 '21 17:07 marchdan

I see in the description you say it adds professor names. Was that not already being parsed through into the csv? If not the logic to do so should already exist as I know I wrote it.

Sorry for inactivity; tail end of Arch is a doozy. It is true that the professor names are already in the csv, so that should be reasonably "easy" to do. I already managed to get emails working for most courses with one instructor, the next part is figuring out how RCOS passes data from the table to frontend. Any advice?

i-am-david-liu avatar Aug 11 '21 19:08 i-am-david-liu

Sorry for inactivity; tail end of Arch is a doozy. It is true that the professor names are already in the csv, so that should be reasonably "easy" to do. I already managed to get emails working for most courses with one instructor, the next part is figuring out how RCOS passes data from the table to frontend. Any advice?

That happens in the API layer. I am linking some helpful files below: Backend db - Look at classinfo & courses Main API Data tables - Look at course YACS service

These are various locations to either help see how data is routed, or that would need additions to grab the data. In rough terms, the route goes: CSV -> Tables/db -> API -> service -> Frontend

marchdan avatar Aug 11 '21 20:08 marchdan

I'm getting an error where column "course_instructor" of relation "course" does not exist, even when I declared the column in course.py. Any idea why this happens?

i-am-david-liu avatar Aug 12 '21 00:08 i-am-david-liu

I'm getting an error where column "course_instructor" of relation "course" does not exist, even when I declared the column in course.py. Any idea why this happens?

When making changes to the tables you need to make sure you run the dev_build.sh script before your start script

marchdan avatar Aug 12 '21 03:08 marchdan

When making changes to the tables you need to make sure you run the dev_build.sh script before your start script

I followed the procedure: dev-stop.sh dev-build.sh dev-start.sh

Uploaded a CSV from admin panel, same error. I'll do a little more testing

Update: throws an error if I don't include crn, which is the primary key, but I could comment out all the other columns and it would still complain about course_instructor. Maybe I'm misunderstanding how the "course" table is populated (courses.py:107) ?

i-am-david-liu avatar Aug 12 '21 03:08 i-am-david-liu

@i-am-david-liu And this error is being thrown from the code currently on this branch? I can pull it locally and see what I can do.

marchdan avatar Aug 12 '21 12:08 marchdan

Just uploaded the db migration to add the professor info columns. Please note that if more columns are added I'll want to redo this migration, not make another one, but I don't think more will be needed.

marchdan avatar Aug 12 '21 16:08 marchdan

Need to fix issue with backend tests (It might just be adding tests to have coverage of newly added table data) before it can populate a temp deploy to allow proper testing.

marchdan avatar Aug 17 '21 14:08 marchdan