This commit adds validation for course advanced settings. Currently when course
administrators make invalid changes in the Settings/Advanced Settings tab,
they're not notified through a new modal window of the list of invalid settings
changes.
* Extending CourseMetadata
- Previously, we only had update_from_json method in CourseMetadata.py,
and it was only validating one field every POST request.
- Now we have validate_and_update_from_json method that encapsulates the
functionality of update_from_json into a validation call
- To avoid discrepancy of validation standards between modules, validation
uses the from_json method implemented to each field in xblock.
* Different Response in advanced settings ajax requests
- After receiving a POST ajax request, course.py calls
validate_and_update_from_json, and sends a json object of either:
1) valid course metadata model
2) error objects
* Error Messages shown in validation-error-modal
- error objects passed through ajax are shown in a separate modal.
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| __init__.py | Loading commit data... | |
| test_clone_course.py | Loading commit data... | |
| test_contentstore.py | Loading commit data... | |
| test_core_caching.py | Loading commit data... | |
| test_course_create_rerun.py | Loading commit data... | |
| test_course_listing.py | Loading commit data... | |
| test_course_settings.py | Loading commit data... | |
| test_crud.py | Loading commit data... | |
| test_export_git.py | Loading commit data... | |
| test_i18n.py | Loading commit data... | |
| test_import.py | Loading commit data... | |
| test_import_draft_order.py | Loading commit data... | |
| test_import_pure_xblock.py | Loading commit data... | |
| test_orphan.py | Loading commit data... | |
| test_permissions.py | Loading commit data... | |
| test_request_event.py | Loading commit data... | |
| test_transcripts_utils.py | Loading commit data... | |
| test_users_default_role.py | Loading commit data... | |
| test_utils.py | Loading commit data... | |
| tests.py | Loading commit data... | |
| utils.py | Loading commit data... |