|
|
@ -25,115 +25,91 @@
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
<% if @is_teacher %>
|
|
|
|
<% if false %>
|
|
|
|
<% comment_status = activity.homework_detail_manual.try(:comment_status) %>
|
|
|
|
<% if @is_teacher %>
|
|
|
|
<div class="fr mr20 edu-menu-panel">
|
|
|
|
<% comment_status = activity.homework_detail_manual.try(:comment_status) %>
|
|
|
|
<i class="iconfont icon-caidan color-blue"></i>
|
|
|
|
<div class="fr mr20 edu-menu-panel">
|
|
|
|
<ul class="edu-menuSmall-list edu-txt-center">
|
|
|
|
<i class="iconfont icon-caidan color-blue"></i>
|
|
|
|
<% if activity.homework_type != 4 %>
|
|
|
|
<ul class="edu-menuSmall-list edu-txt-center">
|
|
|
|
<li><%= link_to "编辑", edit_homework_common_path(activity) %></li>
|
|
|
|
<% if activity.homework_type != 4 %>
|
|
|
|
<% end %>
|
|
|
|
<li><%= link_to "编辑", edit_homework_common_path(activity) %></li>
|
|
|
|
<li><%= link_to "设置", student_work_index_path(:homework => activity.id, :tab => 4) %></li>
|
|
|
|
<% end %>
|
|
|
|
<% if comment_status == 0 || activity.homework_group_settings.where("publish_time is null or publish_time > '#{Time.now}'").count > 0 %>
|
|
|
|
<li><%= link_to "设置", student_work_index_path(:homework => activity.id, :tab => 4) %></li>
|
|
|
|
<li><%= link_to '立即发布', publish_notice_homework_common_path(activity), :remote => true %></li>
|
|
|
|
<% if comment_status == 0 || activity.homework_group_settings.where("publish_time is null or publish_time > '#{Time.now}'").count > 0 %>
|
|
|
|
<% end %>
|
|
|
|
<li><%= link_to '立即发布', publish_notice_homework_common_path(activity), :remote => true %></li>
|
|
|
|
<% if (comment_status == 1 && activity.end_time > Time.now) || activity.homework_group_settings.where("publish_time < '#{Time.now}' and end_time > '#{Time.now}'").count > 0 %>
|
|
|
|
<% end %>
|
|
|
|
<li><%= link_to '立即截止', end_notice_homework_common_path(activity), :remote => true %></li>
|
|
|
|
<% if (comment_status == 1 && activity.end_time > Time.now) || activity.homework_group_settings.where("publish_time < '#{Time.now}' and end_time > '#{Time.now}'").count > 0 %>
|
|
|
|
<% end %>
|
|
|
|
<li><%= link_to '立即截止', end_notice_homework_common_path(activity), :remote => true %></li>
|
|
|
|
<li><%= link_to "导出成绩", student_work_index_path(:homework => activity, :format => 'xls'), :id => "export_student_work" %></li>
|
|
|
|
<% end %>
|
|
|
|
<% if activity.homework_type == 1 || activity.homework_type == 3 %>
|
|
|
|
<li><%= link_to "导出成绩", student_work_index_path(:homework => activity, :format => 'xls'), :id => "export_student_work" %></li>
|
|
|
|
|
|
|
|
<% if activity.homework_type == 1 || activity.homework_type == 3 %>
|
|
|
|
|
|
|
|
<li>
|
|
|
|
|
|
|
|
<% if activity.student_works.has_committed.empty? %>
|
|
|
|
|
|
|
|
<a href="javascript:void(0)" onclick="notice_box('没有学生提交作业,暂无附件可下载');">导出作品附件</a>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<%= link_to "导出作品附件", zipdown_assort_path(obj_class: activity.class, obj_id: activity.id, format: :json), remote: true, :class => "download_homework_attachments" %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if @course.is_public? && !activity.is_public %>
|
|
|
|
|
|
|
|
<li id="set_homework_public_<%= activity.id %>">
|
|
|
|
|
|
|
|
<a href="javascript:void(0);" onclick="delete_confirm_box('<%= set_public_homework_common_path(activity) %>', '您确定要公开吗?<br/>公开后不能重设为私有')">设为公开</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if (activity.homework_type == 1 || activity.homework_type == 3) && (@is_teacher || activity.user == User.current) %>
|
|
|
|
|
|
|
|
<li class="add_to_homework_bank_<%= activity.id %>">
|
|
|
|
|
|
|
|
<%= link_to "加入题库", add_to_homework_bank_homework_common_path(activity), :remote => true %>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<li>
|
|
|
|
<li>
|
|
|
|
<% if activity.student_works.has_committed.empty? %>
|
|
|
|
<a href="javascript:void(0)" onclick="delete_confirm_box_3('<%= homework_common_path(activity) %>', '您确定要删除吗?<br/>已提交作品将全部被删除,不可恢复')">删除</a>
|
|
|
|
<a href="javascript:void(0)" onclick="notice_box('没有学生提交作业,暂无附件可下载');">导出作品附件</a>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<%= link_to "导出作品附件", zipdown_assort_path(obj_class: activity.class, obj_id: activity.id, format: :json), remote: true, :class => "download_homework_attachments" %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if @course.is_public? && !activity.is_public %>
|
|
|
|
|
|
|
|
<li id="set_homework_public_<%= activity.id %>">
|
|
|
|
|
|
|
|
<a href="javascript:void(0);" onclick="delete_confirm_box('<%= set_public_homework_common_path(activity) %>', '您确定要公开吗?<br/>公开后不能重设为私有')">设为公开</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if (activity.homework_type == 1 || activity.homework_type == 3) && (@is_teacher || activity.user == User.current) %>
|
|
|
|
|
|
|
|
<li class="add_to_homework_bank_<%= activity.id %>">
|
|
|
|
|
|
|
|
<%= link_to "加入题库", add_to_homework_bank_homework_common_path(activity), :remote => true %>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
<li>
|
|
|
|
</div>
|
|
|
|
<a href="javascript:void(0)" onclick="delete_confirm_box_3('<%= homework_common_path(activity) %>', '您确定要删除吗?<br/>已提交作品将全部被删除,不可恢复')">删除</a>
|
|
|
|
|
|
|
|
</li>
|
|
|
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<% elsif User.current.member_of_course?(activity.course) %>
|
|
|
|
<% elsif User.current.member_of_course?(activity.course) %>
|
|
|
|
<% work = cur_user_works_for_homework activity %>
|
|
|
|
<% work = cur_user_works_for_homework activity %>
|
|
|
|
<% member = activity.course.members.where(:user_id => User.current.id).first
|
|
|
|
<% member = activity.course.members.where(:user_id => User.current.id).first
|
|
|
|
setting_time = homework_group_setting activity, member.try(:course_group_id) %>
|
|
|
|
setting_time = homework_group_setting activity, member.try(:course_group_id) %>
|
|
|
|
<% project = cur_user_projects_for_homework activity %>
|
|
|
|
<% project = cur_user_projects_for_homework activity %>
|
|
|
|
<% if activity.course.is_end %>
|
|
|
|
<% if activity.course.is_end %>
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "已结束" %> ml15 fl mt5">已结束</span>
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "已结束" %> ml15 fl mt5">已结束</span>
|
|
|
|
<% if work.present? %>
|
|
|
|
<% if work.present? %>
|
|
|
|
<%= link_to "查看作品", student_work_index_path(:homework => activity.id), :class => 'edu-filter-btn edu-activity-green ml15 fl mt5' %>
|
|
|
|
<%= link_to "查看作品", student_work_index_path(:homework => activity.id), :class => 'edu-filter-btn edu-activity-green ml15 fl mt5' %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<% else %>
|
|
|
|
<% if activity.homework_type == 4 %>
|
|
|
|
<% if activity.homework_type == 4 %>
|
|
|
|
<% if work.nil? && (setting_time.end_time >= Time.now || activity.allow_late) %>
|
|
|
|
<% if work.nil? && (setting_time.end_time >= Time.now || activity.allow_late) %>
|
|
|
|
<%= link_to "开始实战", shixun_path(activity.homework_commons_shixuns.shixun), :class => 'edu-filter-btn edu-activity-blue ml15 fl mt5', :target => "_blank" %>
|
|
|
|
<%= link_to "开始实战", shixun_path(activity.homework_commons_shixuns.shixun), :class => 'edu-filter-btn edu-activity-blue ml15 fl mt5', :target => "_blank" %>
|
|
|
|
<% elsif work.present? %>
|
|
|
|
<% elsif work.present? %>
|
|
|
|
<% myshixun = Myshixun.where(:id => work.myshixun_id).first %>
|
|
|
|
<% myshixun = Myshixun.where(:id => work.myshixun_id).first %>
|
|
|
|
<%# is_modify = ShixunModify.where(:myshixun_id => myshixun.try(:id), :shixun_id => myshixun.shixun.try(:id), :status => 1).first %>
|
|
|
|
<%# is_modify = ShixunModify.where(:myshixun_id => myshixun.try(:id), :shixun_id => myshixun.shixun.try(:id), :status => 1).first %>
|
|
|
|
<% if myshixun.present? %>
|
|
|
|
<% if myshixun.present? %>
|
|
|
|
<%= link_to "继续实战", shixun_path(myshixun.shixun), :class => "edu-filter-btn edu-activity-blue ml15 fl mt5", :target => "_blank" %>
|
|
|
|
<%= link_to "继续实战", shixun_path(myshixun.shixun), :class => "edu-filter-btn edu-activity-blue ml15 fl mt5", :target => "_blank" %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
<%# if myshixun && is_modify.blank? %>
|
|
|
|
<%# if myshixun && is_modify.blank? %>
|
|
|
|
<%#= link_to "继续实战", shixun_exec_shixun_path(myshixun.shixun), :class => "edu-filter-btn edu-activity-blue ml15 fl mt5", :target => "_blank" %>
|
|
|
|
<%#= link_to "继续实战", shixun_exec_shixun_path(myshixun.shixun), :class => "edu-filter-btn edu-activity-blue ml15 fl mt5", :target => "_blank" %>
|
|
|
|
<%# elsif myshixun %>
|
|
|
|
<%# elsif myshixun %>
|
|
|
|
<%#= link_to "继续实战", 'javascript:void(0);', :onclick => "sure_box_redirect('#{myshixun_reset_myshixun_path(myshixun)}', '实训已经更新啦,系统正在为您重置');", :class => "edu-filter-btn edu-activity-blue ml15 fl mt5" %>
|
|
|
|
<%#= link_to "继续实战", 'javascript:void(0);', :onclick => "sure_box_redirect('#{myshixun_reset_myshixun_path(myshixun)}', '实训已经更新啦,系统正在为您重置');", :class => "edu-filter-btn edu-activity-blue ml15 fl mt5" %>
|
|
|
|
<%# end %>
|
|
|
|
<%# end %>
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "未开启补交" %> ml15 fl mt5">未开启补交</span>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% elsif work.nil? && setting_time.end_time >= Time.now %>
|
|
|
|
|
|
|
|
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
|
|
|
|
|
|
|
|
<% if project.nil? %>
|
|
|
|
|
|
|
|
<%= link_to "关联项目", new_student_work_project_student_work_index_path(:homework => activity.id, :user_activity_id => user_activity_id, :hw_status => hw_status), remote: true, :class => 'edu-filter-btn edu-activity-blue ml15 fl mt5', :title => '请各组长关联作业项目' %>
|
|
|
|
|
|
|
|
<%= link_to "提交作品", "javascript:void(0)", :class => 'edu-filter-btn edu-activity-blue ml15 fl mt5', :style => "cursor:not-allowed", :title => '请先关联项目再提交作品' %>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
<% else %>
|
|
|
|
<a href="javascript:void(0);" class="edu-filter-btn edu-activity-light-grey ml15 fl mt5" title="取消关联项目" onclick="delete_confirm_box('<%= cancel_relate_project_student_work_index_path(:homework => activity.id,:user_activity_id=>user_activity_id, :hw_status => hw_status) %>', '您确定要取消关联吗?')">取消关联</a>
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "未开启补交" %> ml15 fl mt5">未开启补交</span>
|
|
|
|
<%= link_to "提交作品", new_student_work_url_without_domain(activity.id), :class => 'edu-filter-btn edu-activity-blue ml15 fl mt5' %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<% elsif work.nil? && setting_time.end_time >= Time.now %>
|
|
|
|
<%= link_to "提交作品", new_student_work_url_without_domain(activity.id), :class => 'edu-filter-btn edu-activity-blue ml15 fl mt5' %>
|
|
|
|
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% elsif work.nil? %>
|
|
|
|
|
|
|
|
<% if activity.anonymous_comment == 1 || activity.homework_detail_manual.try(:comment_status).to_i < 3 %>
|
|
|
|
|
|
|
|
<% if activity.allow_late && activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
|
|
|
|
|
|
|
|
<% if project.nil? %>
|
|
|
|
<% if project.nil? %>
|
|
|
|
<%= link_to "关联项目", new_student_work_project_student_work_index_path(:homework => activity.id, :user_activity_id => user_activity_id, :hw_status => hw_status), remote: true, :class => 'edu-filter-btn edu-activity-blue ml15 fl mt5', :title => '请各组长关联作业项目' %>
|
|
|
|
<%= link_to "关联项目", new_student_work_project_student_work_index_path(:homework => activity.id, :user_activity_id => user_activity_id, :hw_status => hw_status), remote: true, :class => 'edu-filter-btn edu-activity-blue ml15 fl mt5', :title => '请各组长关联作业项目' %>
|
|
|
|
|
|
|
|
<%= link_to "提交作品", "javascript:void(0)", :class => 'edu-filter-btn edu-activity-blue ml15 fl mt5', :style => "cursor:not-allowed", :title => '请先关联项目再提交作品' %>
|
|
|
|
<% else %>
|
|
|
|
<% else %>
|
|
|
|
<a href="javascript:void(0);" class="edu-filter-btn edu-activity-light-grey ml15 fl mt5" title="取消关联项目" onclick="delete_confirm_box('<%= cancel_relate_project_student_work_index_path(:homework => activity.id,:user_activity_id=>user_activity_id, :hw_status => hw_status) %>', '您确定要取消关联吗?')">取消关联</a>
|
|
|
|
<a href="javascript:void(0);" class="edu-filter-btn edu-activity-light-grey ml15 fl mt5" title="取消关联项目" onclick="delete_confirm_box('<%= cancel_relate_project_student_work_index_path(:homework => activity.id,:user_activity_id=>user_activity_id, :hw_status => hw_status) %>', '您确定要取消关联吗?')">取消关联</a>
|
|
|
|
|
|
|
|
<%= link_to "提交作品", new_student_work_url_without_domain(activity.id), :class => 'edu-filter-btn edu-activity-blue ml15 fl mt5' %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<%= link_to "提交作品", new_student_work_url_without_domain(activity.id), :class => 'edu-filter-btn edu-activity-blue ml15 fl mt5' %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<%= un_commit_work_status project, activity %>
|
|
|
|
<% elsif work.nil? %>
|
|
|
|
<% else %>
|
|
|
|
<% if activity.anonymous_comment == 1 || activity.homework_detail_manual.try(:comment_status).to_i < 3 %>
|
|
|
|
<% if activity.homework_detail_manual.try(:comment_status).to_i == 3 %>
|
|
|
|
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "匿评中" %> ml15 fl mt5">匿评中</span>
|
|
|
|
|
|
|
|
<% if activity.allow_late && activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
|
|
|
|
|
|
|
|
<% if project.nil? %>
|
|
|
|
|
|
|
|
<%= link_to "关联项目", new_student_work_project_student_work_index_path(:homework => activity.id, :user_activity_id => user_activity_id, :hw_status => hw_status), remote: true, :class => 'edu-filter-btn edu-activity-blue ml15 fl mt5', :title => '请各组长关联作业项目' %>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<a href="javascript:void(0);" class="edu-filter-btn edu-activity-light-grey ml15 fl mt5" title="取消关联项目" onclick="delete_confirm_box('<%= cancel_relate_project_student_work_index_path(:homework => activity.id,:user_activity_id=>user_activity_id, :hw_status => hw_status) %>', '您确定要取消关联吗?')">取消关联</a>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<%= un_commit_work_status project, activity %>
|
|
|
|
|
|
|
|
<% elsif activity.homework_detail_manual.try(:comment_status).to_i == 4 || activity.homework_detail_manual.try(:comment_status).to_i > 4 %>
|
|
|
|
|
|
|
|
<% if activity.homework_detail_manual.try(:comment_status).to_i == 4 %>
|
|
|
|
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "申诉中" %> ml15 fl mt5">申诉中</span>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "评阅中" %> ml15 fl mt5">评阅中</span>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if activity.allow_late && activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
|
|
|
|
<% if activity.allow_late && activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
|
|
|
|
<% if project.nil? %>
|
|
|
|
<% if project.nil? %>
|
|
|
|
<%= link_to "关联项目", new_student_work_project_student_work_index_path(:homework => activity.id, :user_activity_id => user_activity_id, :hw_status => hw_status), remote: true, :class => 'edu-filter-btn edu-activity-blue ml15 fl mt5', :title => '请各组长关联作业项目' %>
|
|
|
|
<%= link_to "关联项目", new_student_work_project_student_work_index_path(:homework => activity.id, :user_activity_id => user_activity_id, :hw_status => hw_status), remote: true, :class => 'edu-filter-btn edu-activity-blue ml15 fl mt5', :title => '请各组长关联作业项目' %>
|
|
|
@ -142,48 +118,74 @@
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<%= un_commit_work_status project, activity %>
|
|
|
|
<%= un_commit_work_status project, activity %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% elsif work.present? %>
|
|
|
|
|
|
|
|
<% if setting_time.end_time >= Time.now %>
|
|
|
|
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "提交中" %> ml15 fl mt5">提交中</span>
|
|
|
|
|
|
|
|
<%= link_to "修改作品", edit_student_work_url_without_domain(work.id), :class => 'edu-filter-btn edu-activity-orange ml15 fl mt5' %>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<% if activity.anonymous_comment == 1 || activity.homework_detail_manual.try(:comment_status).to_i < 3 %>
|
|
|
|
|
|
|
|
<%= late_commit_work_status work, activity %>
|
|
|
|
|
|
|
|
<%= link_to "查看作品", student_work_path(work), :class => 'edu-filter-btn edu-activity-green ml15 fl mt5' %>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
<% else %>
|
|
|
|
<% work_ids = "(" + activity.student_works.has_committed.map(&:id).join(",") + ")" %>
|
|
|
|
|
|
|
|
<% if activity.homework_detail_manual.try(:comment_status).to_i == 3 %>
|
|
|
|
<% if activity.homework_detail_manual.try(:comment_status).to_i == 3 %>
|
|
|
|
<% if activity.allow_late %>
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "匿评中" %> ml15 fl mt5">匿评中</span>
|
|
|
|
<% if User.current.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count > 0 %>
|
|
|
|
<% if activity.allow_late && activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
|
|
|
|
<%= link_to "补交附件", student_work_path(work, :is_focus => 1), :class => 'edu-filter-btn edu-activity-orange ml15 fl mt5', :title => "可追加作品修订附件" %>
|
|
|
|
<% if project.nil? %>
|
|
|
|
<% link_to "匿评作品", student_work_index_path(:homework => activity.id), :class => 'edu-filter-btn edu-activity-grey ml15 fl mt5', :title => "开启匿评后不可修改作品" %>
|
|
|
|
<%= link_to "关联项目", new_student_work_project_student_work_index_path(:homework => activity.id, :user_activity_id => user_activity_id, :hw_status => hw_status), remote: true, :class => 'edu-filter-btn edu-activity-blue ml15 fl mt5', :title => '请各组长关联作业项目' %>
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "匿评中" %> ml15 fl mt5">匿评中</span>
|
|
|
|
|
|
|
|
<%= link_to "补交附件", student_work_path(work, :is_focus => 1), :class => 'edu-filter-btn edu-activity-orange ml15 fl mt5', :title => "可追加作品修订附件" %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<% if User.current.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count > 0 %>
|
|
|
|
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "未开启补交" %> ml15 fl mt5">未开启补交</span>
|
|
|
|
|
|
|
|
<% link_to "匿评作品", student_work_index_path(:homework => activity.id), :class => 'edu-filter-btn edu-activity-grey ml15 fl mt5', :title => "开启匿评后不可修改作品" %>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
<% else %>
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "匿评中" %> ml15 fl mt5">匿评中</span>
|
|
|
|
<a href="javascript:void(0);" class="edu-filter-btn edu-activity-light-grey ml15 fl mt5" title="取消关联项目" onclick="delete_confirm_box('<%= cancel_relate_project_student_work_index_path(:homework => activity.id,:user_activity_id=>user_activity_id, :hw_status => hw_status) %>', '您确定要取消关联吗?')">取消关联</a>
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "未开启补交" %> ml15 fl mt5">未开启补交</span>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<%= un_commit_work_status project, activity %>
|
|
|
|
<% elsif activity.homework_detail_manual.try(:comment_status).to_i == 4 || activity.homework_detail_manual.try(:comment_status).to_i > 4 %>
|
|
|
|
<% elsif activity.homework_detail_manual.try(:comment_status).to_i == 4 || activity.homework_detail_manual.try(:comment_status).to_i > 4 %>
|
|
|
|
<% if activity.homework_detail_manual.try(:comment_status).to_i == 4 %>
|
|
|
|
<% if activity.homework_detail_manual.try(:comment_status).to_i == 4 %>
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "申诉中" %> ml15 fl mt5">申诉中</span>
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "申诉中" %> ml15 fl mt5">申诉中</span>
|
|
|
|
<% else %>
|
|
|
|
<% else %>
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "评阅中" %> ml15 fl mt5">评阅中</span>
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "评阅中" %> ml15 fl mt5">评阅中</span>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% if activity.allow_late %>
|
|
|
|
<% if activity.allow_late && activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
|
|
|
|
<%= link_to "补交附件", student_work_path(work, :is_focus => 1), :class => 'edu-filter-btn edu-activity-orange ml15 fl mt5', :title => "可追加作品修订附件" %>
|
|
|
|
<% if project.nil? %>
|
|
|
|
<%= link_to "查看作品", student_work_path(work), :class => 'edu-filter-btn edu-activity-green ml15 fl mt5' %>
|
|
|
|
<%= link_to "关联项目", new_student_work_project_student_work_index_path(:homework => activity.id, :user_activity_id => user_activity_id, :hw_status => hw_status), remote: true, :class => 'edu-filter-btn edu-activity-blue ml15 fl mt5', :title => '请各组长关联作业项目' %>
|
|
|
|
<% else %>
|
|
|
|
<% else %>
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "未开启补交" %> ml15 fl mt5">未开启补交</span>
|
|
|
|
<a href="javascript:void(0);" class="edu-filter-btn edu-activity-light-grey ml15 fl mt5" title="取消关联项目" onclick="delete_confirm_box('<%= cancel_relate_project_student_work_index_path(:homework => activity.id,:user_activity_id=>user_activity_id, :hw_status => hw_status) %>', '您确定要取消关联吗?')">取消关联</a>
|
|
|
|
<%= link_to "查看作品", student_work_path(work), :class => 'edu-filter-btn edu-activity-green ml15 fl mt5' %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<%= un_commit_work_status project, activity %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% elsif work.present? %>
|
|
|
|
|
|
|
|
<% if setting_time.end_time >= Time.now %>
|
|
|
|
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "提交中" %> ml15 fl mt5">提交中</span>
|
|
|
|
|
|
|
|
<%= link_to "修改作品", edit_student_work_url_without_domain(work.id), :class => 'edu-filter-btn edu-activity-orange ml15 fl mt5' %>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<% if activity.anonymous_comment == 1 || activity.homework_detail_manual.try(:comment_status).to_i < 3 %>
|
|
|
|
|
|
|
|
<%= late_commit_work_status work, activity %>
|
|
|
|
|
|
|
|
<%= link_to "查看作品", student_work_path(work), :class => 'edu-filter-btn edu-activity-green ml15 fl mt5' %>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<% work_ids = "(" + activity.student_works.has_committed.map(&:id).join(",") + ")" %>
|
|
|
|
|
|
|
|
<% if activity.homework_detail_manual.try(:comment_status).to_i == 3 %>
|
|
|
|
|
|
|
|
<% if activity.allow_late %>
|
|
|
|
|
|
|
|
<% if User.current.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count > 0 %>
|
|
|
|
|
|
|
|
<%= link_to "补交附件", student_work_path(work, :is_focus => 1), :class => 'edu-filter-btn edu-activity-orange ml15 fl mt5', :title => "可追加作品修订附件" %>
|
|
|
|
|
|
|
|
<% link_to "匿评作品", student_work_index_path(:homework => activity.id), :class => 'edu-filter-btn edu-activity-grey ml15 fl mt5', :title => "开启匿评后不可修改作品" %>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "匿评中" %> ml15 fl mt5">匿评中</span>
|
|
|
|
|
|
|
|
<%= link_to "补交附件", student_work_path(work, :is_focus => 1), :class => 'edu-filter-btn edu-activity-orange ml15 fl mt5', :title => "可追加作品修订附件" %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<% if User.current.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count > 0 %>
|
|
|
|
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "未开启补交" %> ml15 fl mt5">未开启补交</span>
|
|
|
|
|
|
|
|
<% link_to "匿评作品", student_work_index_path(:homework => activity.id), :class => 'edu-filter-btn edu-activity-grey ml15 fl mt5', :title => "开启匿评后不可修改作品" %>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "匿评中" %> ml15 fl mt5">匿评中</span>
|
|
|
|
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "未开启补交" %> ml15 fl mt5">未开启补交</span>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% elsif activity.homework_detail_manual.try(:comment_status).to_i == 4 || activity.homework_detail_manual.try(:comment_status).to_i > 4 %>
|
|
|
|
|
|
|
|
<% if activity.homework_detail_manual.try(:comment_status).to_i == 4 %>
|
|
|
|
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "申诉中" %> ml15 fl mt5">申诉中</span>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "评阅中" %> ml15 fl mt5">评阅中</span>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if activity.allow_late %>
|
|
|
|
|
|
|
|
<%= link_to "补交附件", student_work_path(work, :is_focus => 1), :class => 'edu-filter-btn edu-activity-orange ml15 fl mt5', :title => "可追加作品修订附件" %>
|
|
|
|
|
|
|
|
<%= link_to "查看作品", student_work_path(work), :class => 'edu-filter-btn edu-activity-green ml15 fl mt5' %>
|
|
|
|
|
|
|
|
<% else %>
|
|
|
|
|
|
|
|
<span class="edu-filter-btn <%= homework_status_color "未开启补交" %> ml15 fl mt5">未开启补交</span>
|
|
|
|
|
|
|
|
<%= link_to "查看作品", student_work_path(work), :class => 'edu-filter-btn edu-activity-green ml15 fl mt5' %>
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|