Skip to content

Commit

Permalink
fix: Student report logic for when to show rubric [PT-188024567]
Browse files Browse the repository at this point in the history
The old logic was preventing the text feedback or score from being shown if the rubric was hidden.
  • Loading branch information
dougmartin committed Sep 5, 2024
1 parent 587c12b commit cb244cc
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions js/components/report/feedback-panel-for-student.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,9 @@ export default class FeedbackPanelForStudent extends PureComponent {

render() {
const { textFeedback, score, rubric, rubricFeedback, hasBeenReviewed } = this.props;
const showRubric = rubric && rubricFeedback && !rubric.hideRubricFromStudentsInStudentReport;

if (rubric && rubric.hideRubricFromStudentsInStudentReport) {
return null;
}

const hasFeedback = textFeedback || score || rubricFeedback;
const hasFeedback = textFeedback || score || showRubric;
const showFeedback = (hasFeedback && hasBeenReviewed);

let feedbackDiv =
Expand All @@ -53,7 +50,7 @@ export default class FeedbackPanelForStudent extends PureComponent {
<div className="act-feedback-panel">
<div className="heading">Teacher Feedback:</div>
{
rubric && rubricFeedback &&
showRubric &&
<RubricBoxForStudent
rubric={rubric}
rubricFeedback={rubricFeedback}
Expand Down

0 comments on commit cb244cc

Please sign in to comment.