Skip to content

[Feature:API] Get list of student's gradeables#11532

Merged
bmcutler merged 50 commits into
mainfrom
gradeables-list
Jun 2, 2026
Merged

[Feature:API] Get list of student's gradeables#11532
bmcutler merged 50 commits into
mainfrom
gradeables-list

Conversation

@IDzyre

@IDzyre IDzyre commented Mar 11, 2025

Copy link
Copy Markdown
Member

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>/gradeables that 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 .../values endpoint 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.

@github-project-automation github-project-automation Bot moved this to Seeking Reviewer in Submitty Development Mar 11, 2025
@automateprojectmangement automateprojectmangement Bot moved this from Seeking Reviewer to Work in Progress in Submitty Development Mar 11, 2025
@IDzyre IDzyre changed the title Gradeables list [Feature:API] Get list of student's gradeables Mar 11, 2025
@IDzyre IDzyre self-assigned this Mar 11, 2025
@codecov

codecov Bot commented Mar 11, 2025

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 57 lines in your changes missing coverage. Please review.
✅ Project coverage is 21.64%. Comparing base (d8a974a) to head (e60561c).

Additional details and impacted files

Impacted file tree graph

@@             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              
Flag Coverage Δ
autograder 21.32% <ø> (ø)
js 2.02% <ø> (ø)
migrator 100.00% <ø> (ø)
php 20.69% <0.00%> (-0.04%) ⬇️
python_submitty_utils 80.08% <ø> (ø)
submitty_daemon_jobs 91.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions github-actions Bot added the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Mar 26, 2025
@IDzyre IDzyre removed the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Mar 28, 2025
@github-actions github-actions Bot added the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Apr 12, 2025
@IDzyre

IDzyre commented May 28, 2025

Copy link
Copy Markdown
Member Author

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.

@IDzyre IDzyre closed this May 28, 2025
@IDzyre

IDzyre commented Jan 12, 2026

Copy link
Copy Markdown
Member Author

Re-opening this because I am picking it back up.

@IDzyre IDzyre reopened this Jan 12, 2026
*/
#[Route('/api/{_semester}/{_course}/gradeable/{gradeable_id}/values', methods: ['GET'])]
public function ajaxGetGradeableValues(string $gradeable_id): JsonResponse {
$user_id = $_GET['user_id'] ?? '';

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()

@IDzyre
IDzyre requested a review from williamjallen March 5, 2026 00:28
@github-actions github-actions Bot added the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Mar 28, 2026
@IDzyre IDzyre removed the Abandoned PR - Needs New Owner No activity on PR for more than 2 weeks -- seeking new owner to complete label Apr 21, 2026
Comment thread site/app/controllers/student/SubmissionController.php Outdated
Comment thread site/app/controllers/UserProfileController.php
Comment thread site/app/models/gradeable/Gradeable.php
@github-project-automation github-project-automation Bot moved this from Seeking Reviewer to Work in Progress in Submitty Development May 19, 2026
@github-project-automation github-project-automation Bot moved this to Seeking Reviewer in Submitty Development May 19, 2026
@IDzyre IDzyre moved this from Work in Progress to Awaiting Maintainer Review in Submitty Development May 19, 2026

@williamjallen williamjallen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@IDzyre

IDzyre commented May 19, 2026

Copy link
Copy Markdown
Member Author

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.

@bmcutler
bmcutler merged commit cf41dbd into main Jun 2, 2026
24 of 26 checks passed
@bmcutler
bmcutler deleted the gradeables-list branch June 2, 2026 02:33
@github-project-automation github-project-automation Bot moved this from Awaiting Maintainer Review to Done in Submitty Development Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants