softwareconstruction240 / autograder

Autograder for BYU's CS 240 Chess project
https://cs240.click
2 stars 2 forks source link

backend: Store configurable values inside a course_settings table #156

Open frozenfrank opened 5 months ago

frozenfrank commented 5 months ago

Description

Some kinds of parameters we want to be configure dynamically. This can we well accomplished with a course_settings table that has a column for each of the settings we want to configure. Then, the app will read out the appropriate settings and behave differently just by updating the values but without rebuilding the app.

In the code, we'll want to access these through a CourseSettingsService (or similarly named) by the name of the property. This would allow us to potentially configure different sets of values that we could switch between. For example, one row of settings could contain the PRODUCTION settings, and another row could contain DEV settings which have have slightly different end points or behaviors for some properties. We could also build in a file of defaults so that we aren't required to define all of them in the database if we want.

Properties

Please comment any other properties that would be good to include in the course_settings table.

19mdavenport commented 5 months ago

The Canvas Test Student ID resets every time someone hits "reset student." I think the way Paul added that gets it new every time we need it is probably sufficient.

Canvas API Key is currently passed in as a environmental variable, do we need one per course?

pawlh commented 5 months ago

Canvas API Key is currently passed in as a environmental variable, do we need one per course?

I don't know about per course, but iff #164 happens then I think it would be super useful to have this in the database instead

pawlh commented 5 months ago

Another class of properties that should be included:

pawlh commented 2 months ago

I added this with #323, but I'm not going to close this ticket because it can probably improved on