毕设任务增加组长

dev_ec
cxt 5 years ago
parent 913432aa22
commit f09dabcd0b

@ -107,6 +107,15 @@ class GraduationTasksController < ApplicationController
@work_list = @task.graduation_works.where(id: graduation_work_id)
end
# 组员、组长作品的筛选
if @task.task_type == 2 && !params[:member_work].blank?
if params[:member_work].to_i == 1
@work_list = @work_list.where("user_id = commit_user_id")
elsif params[:member_work].to_i == 0
@work_list = @work_list.where("user_id != commit_user_id")
end
end
# 输入姓名和学号搜索
# TODO user_extension 如果修改 请调整
unless params[:search].blank?

@ -49,6 +49,7 @@ if @task.published? || @user_course_identity < Course::STUDENT
json.class_grouping_name @students.select{|student| student.user_id == work.user_id}.first.try(:course_group_name)
json.ultimate_score work.ultimate_score
if @task.have_grouping?
json.is_leader work.user_id == work.commit_user_id
json.grouping_name work.grouping_name
if @task.base_on_project
json.project_info project_info work, @current_user, @user_course_identity

Loading…
Cancel
Save