Skip to content

Commit

Permalink
SAK-41529 If no tool association can be found, hide the rubric button
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianfish authored and Miguel Pellicer committed Mar 22, 2019
1 parent fb65b24 commit 210b53d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,12 @@ class SakaiRubricStudentButton extends SakaiElement {
.then(data => {

const association = data._embedded["rubric-associations"][0];
this.hidden = association.parameters.hideStudentPreview;

if (!association) {
this.hidden = true;
} else {
this.hidden = association.parameters.hideStudentPreview;
}
});
}
}
Expand Down

0 comments on commit 210b53d

Please sign in to comment.