[Feature:API] Get list of student's gradeables#11532
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #11532 +/- ##
============================================
- Coverage 21.67% 21.64% -0.04%
- Complexity 9802 9818 +16
============================================
Files 268 268
Lines 36724 36777 +53
Branches 490 490
============================================
Hits 7960 7960
- Misses 28278 28331 +53
Partials 486 486
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
Closing this as it will not be updated for a few months, and to not clog the existing list of PRs. Will re-open when ready to continue. |
|
Re-opening this because I am picking it back up. |
| */ | ||
| #[Route('/api/{_semester}/{_course}/gradeable/{gradeable_id}/values', methods: ['GET'])] | ||
| public function ajaxGetGradeableValues(string $gradeable_id): JsonResponse { | ||
| $user_id = $_GET['user_id'] ?? ''; |
There was a problem hiding this comment.
Removing this, as other endpoints do not require a user_id to be passed. Still allowing it as an optional parameter for an instructor, but students do not need to send it, since we can access it from core->getUser()->getId()
This can be added back later if requested, but to get this merged it is being removed.
williamjallen
left a comment
There was a problem hiding this comment.
Looks good to me. Let's wait to merge this until the CI is back to passing unless it's really blocking something else you're working on.
|
It is what the VS Code plugin repo is based on, so the sooner the better. I will see if I can fix (at least a bulk) of CI tonight, unless someone else fixes it first. |
Why is this Change Important & Necessary?
The Submitty API is lacking in features that would allow for creating a VS code extension. Specifically, getting a list of gradeables that a user has access to for a given course, and a route to verify the user logged in.
Also, the current "get gradeable values" route has the full grade passed, but not the reason for each testcase passing/failing.
What is the New Behavior?
A route has been added
base_url/api/<term>/<course>/gradeablesthat returns a GradeableList converted to Json of the currently available gradeables to the given user.An instructor can also use this, and specify a given user ID if they would like to get gradeables for a student.
A lot more information has been added to the
.../valuesendpoint to give the extension more to work with.What steps should a reviewer take to reproduce or test the bug or new feature?
Review the code, or use an API testing tool (such as Postman) to test the API route successfully returns values for a given user.
Other information
This won't impact current installations or require any sysadmin actions.