-
Notifications
You must be signed in to change notification settings - Fork 220
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
[Manage Submissions] Score popup modal styling + fixes #1952
base: feature/new-manage-submissions
Are you sure you want to change the base?
[Manage Submissions] Score popup modal styling + fixes #1952
Conversation
${problem.name} | ||
<br> | ||
<i> ${max_score} ${autograded} </i> | ||
const autograded = data.autograded ? " (Autograded)" : ""; |
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.
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.
Note that autograded
is set via autograded = @assessment.has_autograder?
, so it's not a good way to check if a problem is autograded
@@ -44,14 +44,20 @@ $(document).ready(function () { | |||
|
|||
// Fetch data and render it in the modal | |||
get_score_details(course_user_datum_id).then((data) => { | |||
const sorting_icons = |
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.
data.scores[submission.id] ? | ||
`<td class="submissions-td submissions-problem-bg">${data.scores[submission.id][problem.id]?.['score']}</td>` | ||
: | ||
`<td class="submissions-td submissions-problem-bg">undefined</td>` |
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.
Perhaps you could use a dash instead of undefined
?
@@ -109,7 +115,10 @@ $(document).ready(function () { | |||
</td> | |||
${submission.problems. | |||
map((problem) => | |||
`<td class="submissions-td">${data.scores[submission.id][problem.id]?.['score']}</td>` | |||
data.scores[submission.id] ? |
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.
You might want to strengthen the check to data.scores[submission.id]?.[problem.id]
. Otherwise, submissions with no score for a particular problem would still show undefined (assuming you make the dash change below).
This happens e.g. for manually graded problems for which no annotations have been created yet.
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.
Generally looks good, but left some comments
Summary
Summary generated by Reviewpad on 20 Sep 23 17:22 UTC
This pull request includes three patches:
Description
Adds further styling and bug fixes to the score popup modal, mainly those noted from this comment.
Motivation and Context
Part of the Manage Submissions UI overhaul.
How Has This Been Tested?
Style-related issues
Old:
New:
The score under each problem has been fixed (no longer bold, still italicized) to follow the Figma prototype
Disabled the table rows changing color (to blue) on mouseover, for both the manage submissions main table and the table in the score popup
Changed the background color for problem columns to follow the Figma prototype
Old:
New:
Old:
New:
Bug Fixes
Old:
(for incorrect file upload)
(for excused students)
New:
grader_id
per problem, butgrader_id
is indata.scores
while problems + scores came fromdata.submissions
, so I useddata.autograded
to keep it simple...Old:
New:
Types of changes
Checklist:
overcommit --install && overcommit --sign
to use pre-commit hook for linting