|
|
@ -164,7 +164,7 @@ class HomeworkCommonsController < ApplicationController
|
|
|
|
all_student_works = @student_works.joins(:myshixun)
|
|
|
|
all_student_works = @student_works.joins(:myshixun)
|
|
|
|
@student_works = all_student_works.where(work_status: work_status)
|
|
|
|
@student_works = all_student_works.where(work_status: work_status)
|
|
|
|
|
|
|
|
|
|
|
|
@student_works = @student_works.or(all_student_works.where(work_status: 0)).or(all_student_works.where(myshixun: {status: 0})) if work_status.include?(3)
|
|
|
|
@student_works = @student_works.or(all_student_works.where(work_status: 0)).or(all_student_works.where(myshixuns: {status: 0})) if work_status.include?(3)
|
|
|
|
@student_works = @student_works.or(all_student_works.where(myshixun: {status: 0})) if work_status.include?(4)
|
|
|
|
@student_works = @student_works.or(all_student_works.where(myshixun: {status: 0})) if work_status.include?(4)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|