|
|
@ -609,13 +609,15 @@ class StudentWorkController < ApplicationController
|
|
|
|
@student_work_pages = Paginator.new @student_work_count, @limit, @page
|
|
|
|
@student_work_pages = Paginator.new @student_work_count, @limit, @page
|
|
|
|
@offset ||= @student_work_pages.offset
|
|
|
|
@offset ||= @student_work_pages.offset
|
|
|
|
@stundet_works = paginateHelper @stundet_works, @limit
|
|
|
|
@stundet_works = paginateHelper @stundet_works, @limit
|
|
|
|
@stundet_works = if @homework.homework_type == 1
|
|
|
|
if @stundet_works.size != 0
|
|
|
|
@stundet_works.includes(:student_works_scores, [user: :user_extensions])
|
|
|
|
@stundet_works = if @homework.homework_type == 1
|
|
|
|
elsif @homework.homework_type == 3
|
|
|
|
@stundet_works.includes(:student_works_scores, [user: :user_extensions])
|
|
|
|
@stundet_works.includes(:student_works_scores, [project: :project_score], [user: :user_extensions])
|
|
|
|
elsif @homework.homework_type == 3
|
|
|
|
elsif @homework.homework_type == 4
|
|
|
|
@stundet_works.includes(:student_works_scores, [project: :project_score], [user: :user_extensions])
|
|
|
|
@stundet_works.includes(:student_works_scores, [myshixun: :games], [user: :user_extensions])
|
|
|
|
elsif @homework.homework_type == 4
|
|
|
|
end
|
|
|
|
@stundet_works.includes(:student_works_scores, [myshixun: :games], [user: :user_extensions])
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
@members = @course.members.where(user_id: @stundet_works.pluck(:user_id)).select([:user_id, :course_group_id])
|
|
|
|
@members = @course.members.where(user_id: @stundet_works.pluck(:user_id)).select([:user_id, :course_group_id])
|
|
|
|
respond_to do |format|
|
|
|
|
respond_to do |format|
|
|
|
|
format.js
|
|
|
|
format.js
|
|
|
|