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
  • Loading branch information
cg2v authored Aug 20, 2023
1 parent 6bd7bc6 commit 286fb0a
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 286fb0a

Please sign in to comment.