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

Mini Rubric: Expand the selected performance level for student by default #28008

Merged
merged 2 commits into from Apr 12, 2019

Conversation

dmcavoy
Copy link
Contributor

@dmcavoy dmcavoy commented Apr 12, 2019

Expand the performance level the teacher gave to a student (if they gave them rubric feedback) by default when the student is looking at feedback.

Before

Screen Shot 2019-04-12 at 11 48 48 AM

After

Screen Shot 2019-04-12 at 11 35 07 AM

@@ -263,7 +269,11 @@ export class TeacherFeedback extends Component {
<RubricField
key={level}
showFeedbackInputAreas={showFeedbackInputAreas}
expandByDefault={this.props.displayKeyConcept}
expandByDefault={
Copy link
Contributor

Choose a reason for hiding this comment

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

this is calculation is getting pretty complex, so let's assign its value to a variable at the top of the render() method. something like:

const expandByDefault = this.props.displayKeyConcept || (expandPerformanceLevelForStudent && this.state.performance === level)

Copy link
Contributor

Choose a reason for hiding this comment

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

similar to what you're doing for expandPerformanceLevelForStudent

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The level here comes from the map which is on the line right above <RubricField. In order to move this out I think I would need to make it a function. Should I do that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The level here comes from the map which is on the line right above <RubricField. In order to move this out I think I would need to make it a function. Should I do that?

Copy link
Contributor

Choose a reason for hiding this comment

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

ah, sorry, i should've taken a closer look at the context here. in that case, it's fine to leave as-is

Copy link
Contributor

@maddiedierker maddiedierker left a comment

Choose a reason for hiding this comment

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

i left a minor inline comment, but this looks great!

@dmcavoy dmcavoy merged commit ca49a85 into staging Apr 12, 2019
@dmcavoy dmcavoy deleted the student-performance-expand branch April 12, 2019 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants