班级作业:分组作业,开启了匿评后,某组再加了某组员,如图该组员看到的作业列表中不应该是“作品匿评”
This commit is contained in:
parent
f8316ee1ee
commit
70a6a26819
|
@ -2906,7 +2906,16 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if homework.homework_detail_manual && homework.homework_detail_manual.comment_status == 2 && StudentWorksEvaluationDistribution.where("student_work_id = #{work.id}").count > 0 #匿评作业,且作业状态不是在开启匿评之前
|
if homework.homework_detail_manual && homework.homework_detail_manual.comment_status == 2 && StudentWorksEvaluationDistribution.where("student_work_id = #{work.id}").count > 0 #匿评作业,且作业状态不是在开启匿评之前
|
||||||
|
if homework.homework_type != 3
|
||||||
link_to "作品匿评", student_work_index_url_in_org(homework.id, 2), :class => 'c_blue', :title => "开启匿评后不可修改作品"
|
link_to "作品匿评", student_work_index_url_in_org(homework.id, 2), :class => 'c_blue', :title => "开启匿评后不可修改作品"
|
||||||
|
else
|
||||||
|
work_ids = "(" + homework.student_works.has_committed.map(&:id).join(",") + ")"
|
||||||
|
if User.current.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count > 0
|
||||||
|
link_to "作品匿评", student_work_index_url_in_org(homework.id, 2), :class => 'c_blue', :title => "开启匿评后不可修改作品"
|
||||||
|
else
|
||||||
|
link_to "查看作品(#{count})",student_work_index_url_in_org(homework.id, 2), :class => 'c_blue', :title => "匿评开启后提交的作品不参与匿评"
|
||||||
|
end
|
||||||
|
end
|
||||||
elsif homework.homework_detail_manual && homework.homework_detail_manual.comment_status == 3
|
elsif homework.homework_detail_manual && homework.homework_detail_manual.comment_status == 3
|
||||||
link_to "查看作品(#{count})",student_work_index_url_in_org(homework.id, 2), :class => 'c_blue', :title => "匿评已结束"
|
link_to "查看作品(#{count})",student_work_index_url_in_org(homework.id, 2), :class => 'c_blue', :title => "匿评已结束"
|
||||||
elsif homework.homework_type == 2 && Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")#编程作业不能修改作品
|
elsif homework.homework_type == 2 && Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")#编程作业不能修改作品
|
||||||
|
|
Loading…
Reference in New Issue