Skip to content

Commit

Permalink
Use unordered Course.assessments to get categories (autolab#1962)
Browse files Browse the repository at this point in the history
Course.assessment_categories needs to make sure that the associated
.assessments do not have an .order scope attached

(cherry picked from commit 286fb0a)
  • Loading branch information
cg2v authored and NicholasMy committed Jan 4, 2024
1 parent ade353e commit 447f10b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/course.rb
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def instructors
end

def assessment_categories
assessments.distinct.pluck(:category_name).sort
assessments.unscope(:order).distinct.pluck(:category_name).sort
end

def assessments_with_category(cat_name, is_student = false)
Expand Down

0 comments on commit 447f10b

Please sign in to comment.