-
Notifications
You must be signed in to change notification settings - Fork 42
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
Hotfixes #803
Hotfixes #803
Conversation
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.
LGTM. Not tested on stage.
Lots of reused code segments makes me think we can shove some parts of this into a react component on its own and pass the paper
object and graded_files[paper.id]
into the component.
Also I wonder what JS code convention is between the repeated gradedHrefData ? and a giant if {} block.
@@ -133,7 +133,7 @@ class AdvisorProfileView extends React.Component { | |||
if ( | |||
registration && | |||
registration.registration_fee_paid && | |||
registration.delegate_fees_paid == registration.delegate_fees_owed | |||
registration.delegate_fees_paid >= registration.delegate_fees_owed |
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.
Do we provide refunds or what not? This is the advisor checklist so probably not the right view but curious if somewhere we have a flag for a yes we are refunding you in the future.
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.
We do provide refunds but until they are processed, it's for the treasurer's records that the fees paid might be greater than fees owed.
var fileNames = paper.file.split("/"); | ||
var fileName = fileNames[fileNames.length - 1]; | ||
var gradedFileNames = gradedHrefData ? paper.graded_file.split("/") : null; | ||
var gradedFileName = gradedFileNames ? gradedFileNames[gradedFileNames.length - 1] : null; |
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.
Over here, what if gradedFileNames is empty list, so gradedFileName
is null then the next line we try to add "graded_" to null?
I don't think it will happen unless paper.graded_file
is empty string or something similarly odd but the code just looks a bit funky.
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.
gradeFileName shouldn't be null if gradedHrefData isn't null so in this case it should be ok
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.
LGTM! Should consider Eric's suggested for later bug fixes since Paper grading is a nightmare.
This is a good point. A lot of the reused code could be condense into a separate component since it probably reflects being written at different times. Will make an issue to work on this in the future. |
fixing graded file link issues to delegate and advisor views + fixing null pointers for resubmitted graded papers