Skip to content
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

refactor(AnnotationService): Move isThereAnyScoreAnnotation() to NodeInfo #1484

Conversation

hirokiterashima
Copy link
Member

@hirokiterashima hirokiterashima commented Oct 23, 2023

Changes

  • Move AnnotationService.isThereAnyScoreAnnotation() to NodeInfoComponent.hasScoreAnnotation() (only place where it's used) and rewrite the body using declarative syntax
  • Extract common code to AnnotationService.getAnnotationsByNodeIdComponentId()
  • Add private modifier, function param types and return types

Test

  • In Grading Tool > Node Info dialog, Teacher Summary Display appears as before if a component has summary view and student work

Also extract common code to getAnnotationByNodeIdComponentId
@hirokiterashima hirokiterashima added this to the Tech Debt 19 -> 18 milestone Oct 23, 2023
@hirokiterashima hirokiterashima self-assigned this Oct 23, 2023
@hirokiterashima hirokiterashima marked this pull request as ready for review October 23, 2023 21:54
@hirokiterashima hirokiterashima changed the title refactor(AnnotationService): Move isThereAnyScoreAnnotation to NodeInfo refactor(AnnotationService): Move isThereAnyScoreAnnotation() to NodeInfo Oct 23, 2023
Copy link
Member

@geoffreykwan geoffreykwan left a comment

Choose a reason for hiding this comment

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

If a component has a score or auto score, the Step Info dialog should show a bar graph of the score distribution for the students in the period. Right now it does not show any graph.

I think in NodeInfoComponent.hasScoreAnnotation() you either need to return the value in the some() function or remove the braces.

Copy link
Member

@geoffreykwan geoffreykwan left a comment

Choose a reason for hiding this comment

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

Looks good.

@hirokiterashima hirokiterashima merged commit 2a75a5a into develop Oct 24, 2023
2 checks passed
@hirokiterashima hirokiterashima deleted the refactor-annotation-service-move-isThereAnyScoreAnnotation branch October 24, 2023 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants