Skip to content

Commit

Permalink
SAK-41487 Enforce a non empty points value in rubrics (sakaiproject#7836
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianfish authored Jan 31, 2020
1 parent cb3fc0e commit e72de80
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ export class SakaiRubricCriterionRatingEdit extends RubricsElement {

this.rating.title = document.getElementById(`rating-title-${this.rating.id}`).value;
this.rating.points = document.getElementById(`rating-points-${this.rating.id}`).value;

// Enforce a points value. Blank breaks things.
if (this.rating.points.length === 0) this.rating.points = "0";

this.rating.description = document.getElementById(`rating-description-${this.rating.id}`).value;
this.rating.criterionId = this.criterionId;

Expand Down

0 comments on commit e72de80

Please sign in to comment.