Implementing UI and frontend for Parent-Child relationships
Closes #553 (closed), #551 (closed), #548 (closed), #406 (closed)
Changes:
Feedback.css:
- Changed the UI to include a bottom border for Feedback options
FeedbackBlock.jsx:
- Supports Parent-child formation in a tree
- Shows the children of a feedback option at it's appropriate place
FeedbackBlockEdit.jsx
- Children are displayed even in the edit mode (if there are children)
- When adding, there is an appropriate message, which let's the user know where the FO will be added
- Isn't a PanelBlock anymore
FeedbackPanel.jsx
- Includes support for Tree-view
- Sorts the indices appropriately
- Includes a new button, which lets the user add to a specific Feedback option
Grade.jsx
- Binds correct shortcuts to correct FO
test_exams.py
- Change tests so root gets created
test_feedback.py
- Change tests to work with the root FO
test_mc_option.py
- Change test to work with the root FO
test_problems.py
- Add test that check if a root was created
exams.py
- add blank FO as a child of the root FO
feedback.py
- add feedback to data function that return the FO in a nested tree structure
- return this nested tree structure when getting FO's of a problem (api.get('feedback/problemID')
mult_choice.py
- make sure all MCQ also have a root, and all options are children of the root
problems.py
- creating a problem will automatically create a root FO (using the post method)
- problem.feedback still contains the list of FO (with children and parent)
- problem.root now returns nested tree structure FO (same as feedback.py)
solutions.py
- selecting a child now auto selects all ancestors (if not already selected)
- deselecting a parent now auto deselects all descendants (if selected)
statistics.py
- Sorts feedback so children appear underneath a parent
- Makes sure the root FO does not appear in emails
- Make sure the root FO does not appear in overview page
database.py
- add property to get ancestors of a fb (excluding the root)
- add property to get descendants of a fb
- add property to get root of a problem
example_data.py
- Include example data which includes parent-child relations