- Adds Enhanced Staff Grader (ESG) backend-for-frontend (BFF) in `lms/djangoapps/ora_staff_grader`
- Adds routing to ESG BFF at `{lms_url}/api/ora_staff_grader/*`
- Adds mock implementation routing at `{lms_url}/api/ora_staff_grader/mock/*`
- Adds `ORA_GRADING_MICROFRONTEND_URL` setting for routing to ESG microfrontend (MFE)
- Updates to the teams app:
- Add`get_teams_in_teamset` to the teams API.
- Add `get_team_names` to teams service.
- Adds `openassessment.staffgrader` app for appropriate ORA migrations.
- Modifies management commands for creation of users.
- Updates test factory to return display org with course overview.
Co-authored-by: jansenk <jkantor@edx.org>
Co-authored-by: Leangseu Kim <lkim@edx.org>
Co-authored-by: Ben Warzeski <bwarzeski@edx.org>
Mock Enhanced Staff Grader (ESG)
A mock backend-for-frontend (BFF) for ESG. It provides mocked endpoints at the path http(s)://{lms-url}/api/ora_staff_grader/mock/{endpoint}.
This is differentiated from the "real" BFF endpoints, which omit the mock part of the path. This should make it easy to switch between real/mocked versions by configuring the base API path.
The mock is, effectively, a wrapper on top of a JSON data store. All the important data is stored in the lms/djangoapps/ora_staff_grader/mock/data/ directory. Data is generally grouped by a key that would be supplied in the request (usually the submissionUUID and/or ora_location). To add/edit data, simply edit the underlying JSON files.
For some endpoints (e.g. lock/unlock/grade), there is simple interactivity; hitting the endpoint will save a change to the underlying data. These can be verified by reading the updated JSON files or reverted by doing a git checkout of the file.
Quickstart
Connect to or exercise endpoints at {devstack-url}/api/ora_staff_grader/mock/{endpoint}.
Alternatively, use the attached postman collections to perform headless testing of endpoints. Following the setup below:
- Perform headless login: in
lms.postman_collection.jsonperform theGET Logincall to generate a new CSRF token followed by aPOST Loginwith valid credentials to authenticate with LMS. - Exercise mock endpoints: in
ora_staff_grader.postman_collection.json, after configuring the environment variables including{{mock}} = True, run the example requests.