Skip to content

Commit 2742434

Browse files
committed
Fix ungraded_discussion_student_visibilities scope when provided ids
refs LF-1051 flag=differentiated_modules Test Plan 1. Turn on differentiated_modules flag for all tests 2. content_tag specs should pass Change-Id: I69ef3266c38af81e216acf7518cddcf3c87d75cd Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/349001 Tested-by: Service Cloud Jenkins <[email protected]> Reviewed-by: Robin Kuss <[email protected]> QA-Review: Robin Kuss <[email protected]> Product-Review: Jason Gillett <[email protected]>
1 parent 5f186a3 commit 2742434

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/discussion_topic.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ def initialize(message = nil, status_code = nil)
857857
if !course.nil? && course.is_a?(Course) && course.user_has_been_observer?(student)
858858
observed_student_ids = ObserverEnrollment.observed_student_ids(course, student)
859859
end
860-
user_ids = [student.id].concat(observed_student_ids)
860+
user_ids = Array(student).concat(observed_student_ids)
861861
visible_topic_ids = UngradedDiscussionVisibility::UngradedDiscussionVisibilityService.discussion_topics_visible_to_students_by_topics(user_ids:, discussion_topic_ids: ids).map(&:discussion_topic_id)
862862

863863
merge(

0 commit comments

Comments
 (0)