-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edwardsabalburo/hookup assignment to backend #75
base: main
Are you sure you want to change the base?
Edwardsabalburo/hookup assignment to backend #75
Conversation
…to backend response
const params = useParams(); | ||
|
||
fetch( | ||
"http://localhost:8080/class/1/1", //"http://localhost:8080/class/${params.classId}/${params.assignmentId}", will change |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since @1strangequark's PR is out I would probably just change it to the comment and then quickly merge and approve @1strangequark 's PR before yours
}) | ||
.then((resp) => { | ||
const total = calculateTotalScore(resp.submissions); | ||
// Mean and Median should be changed to work with assignment submissions for all class members |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah seems like there's not a way to do this yet so this should work!
Adding dynamic loading of statistics for assignment viewing. This essentially adds all the scaffolding necessary but currently runs on a single endpoint. Once the parameters are set up in the url, I can update the code again to reflect them. Also, the mean and median are only operating on a single user's submissions, but when a backend endpoint is created that returns all the submission JSON data, implementing the expected functionality should be straightforward.
All of the changes necessary to produce the final expected output is also marked with comments in the code.