Skip to content

Commit

Permalink
SAK-44597 Rubrics: Error in console sorting rubrics (sakaiproject#8764)
Browse files Browse the repository at this point in the history
  • Loading branch information
MRutea authored Nov 4, 2020
1 parent 49b93bc commit 4114fd7
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,15 @@ class SakaiRubricsManager extends RubricsElement {
}

sortRubrics(event) {
const sortInput = event.target.className;
const sortInputValue = sortInput.toString().toLowerCase();
const rubric = sortInputValue.split('-');
const rubricClass = rubric[0];
const rubricType = rubric[1];
const query = `.${sortInputValue}.sort-element-${rubricClass}`;

const sortInput = event.target.className.toLowerCase();

if (!sortInput) {
return;
}

const [rubricClass, rubricType] = sortInput.split("-");
const query = `.${sortInput}.sort-element-${rubricClass}`;
const arrowUpIcon = 'fa-chevron-up';
const arrowDownIcon = 'fa-chevron-down';
let ascending = this.querySelector(query).classList.contains(arrowUpIcon);
Expand Down

0 comments on commit 4114fd7

Please sign in to comment.