Feature: course filter settings in databse #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔀 Purpose of this PR:
📝 Description:
Until now only the settings of the letter and time filter were saved in the database. After a little bit of thinking, the course filter settings can be stored too. Until now the problem was that the course filter has a dynamic amount of courses. Courses may change (new courses appear, old courses are removed).
Instead of saving a value for each course or opening new tables that matches a course to a userid (which is the clean relational-way), a trick is used. A new attribute in the table saves a stringified version of a JSON object that stores the setting of each course that shows content in townsquare with
courseid => true/false.📋 Checklist
Please confirm the following (check all that apply):
phpunitand/orbehattests that cover my changes or additions.var_dump()orvar_exportor any other debugging statements (or commented out code) thatshould not appear on the productive branch.
db/upgrade.phpandupdated the
version.php..minfiles with thegrunt amdcommand.