毕设作品列表

dev_forum
cxt 5 years ago
parent c87f58bc73
commit 35bbc0fe7b

@ -55,6 +55,8 @@ class GraduationTasksController < ApplicationController
page = params[:page] || 1 page = params[:page] || 1
limit = params[:limit] || 20 limit = params[:limit] || 20
@work = @task.graduation_works.where(user_id: current_user.id) @work = @task.graduation_works.where(user_id: current_user.id)
@students = @course.students
@assign_power = @user_course_identity < Course::STUDENT && @task.cross_comment && @task.comment_status == 2
#end_time @task.allow_late ? @task.late_time : @task.end_time #end_time @task.allow_late ? @task.late_time : @task.end_time
# 任务发布的情况下: 是老师身份或者任务已截止的情况下公开任务了作品设置的学生也能查看其他人的作品 # 任务发布的情况下: 是老师身份或者任务已截止的情况下公开任务了作品设置的学生也能查看其他人的作品
if @task.published? && (@user_course_identity < Course::STUDENT || if @task.published? && (@user_course_identity < Course::STUDENT ||
@ -123,8 +125,6 @@ class GraduationTasksController < ApplicationController
@work_count = @work_list.count @work_count = @work_list.count
@work_excel = @work_list @work_excel = @work_list
@work_list = @work_list.page(page).per(limit) @work_list = @work_list.page(page).per(limit)
@students = @course.students
@assign_power = @user_course_identity < Course::STUDENT && @task.cross_comment && @task.comment_status == 2
if params[:format] == "xlsx" if params[:format] == "xlsx"
complete_works = @work_excel.where("work_status > 0").size complete_works = @work_excel.where("work_status > 0").size

Loading…
Cancel
Save