作业启动匿评
This commit is contained in:
parent
c224f97905
commit
5a22e9a147
|
@ -2631,7 +2631,7 @@ module ApplicationHelper
|
||||||
def homework_anonymous_comment (homework, is_in_course, user_activity_id = -1, course_activity = -1)
|
def homework_anonymous_comment (homework, is_in_course, user_activity_id = -1, course_activity = -1)
|
||||||
if homework.homework_detail_manual.comment_status == 0 ||Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
|
if homework.homework_detail_manual.comment_status == 0 ||Time.parse(homework.end_time.to_s).strftime("%Y-%m-%d") >= Time.now.strftime("%Y-%m-%d")
|
||||||
link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "作业截止日期之前不可以启动匿评"
|
link = link_to "启动匿评","javascript:void(0)", :class => "postOptionLink", :title => "作业截止日期之前不可以启动匿评"
|
||||||
elsif homework.student_works.count >= 2 && homework.homework_detail_manual#作业份数大于2
|
elsif homework.student_works.has_committed.count >= 2 && homework.homework_detail_manual#作业份数大于2
|
||||||
case homework.homework_detail_manual.comment_status
|
case homework.homework_detail_manual.comment_status
|
||||||
when 1
|
when 1
|
||||||
link = link_to '启动匿评', Setting.protocol + "://" + Setting.host_name + "/homework_common/" + homework.id.to_s + "/alert_anonymous_comment?is_in_course=" + is_in_course.to_s + "&user_activity_id=" + user_activity_id.to_s + "&course_activity=" + course_activity.to_s, id: "#{homework.id}_start_anonymous_comment", remote: true, disable_with: '加载中...',:class => 'postOptionLink'
|
link = link_to '启动匿评', Setting.protocol + "://" + Setting.host_name + "/homework_common/" + homework.id.to_s + "/alert_anonymous_comment?is_in_course=" + is_in_course.to_s + "&user_activity_id=" + user_activity_id.to_s + "&course_activity=" + course_activity.to_s, id: "#{homework.id}_start_anonymous_comment", remote: true, disable_with: '加载中...',:class => 'postOptionLink'
|
||||||
|
|
Loading…
Reference in New Issue