From 3e57aa1392c7ec77e95fee3e97b5bb254fb0f70a Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 19 Sep 2015 10:33:38 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E6=95=99=E5=B8=88=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=9C=A8=E5=8A=A8=E6=80=81=E7=95=8C=E9=9D=A2=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E7=AD=94=E9=A2=98=202=E3=80=81=E5=AD=A6=E7=94=9F=E5=9C=A8?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E7=95=8C=E9=9D=A2=E7=9C=8B=E5=88=B0=E4=BD=9C?= =?UTF-8?q?=E4=B8=9A=E5=8A=A8=E6=80=81=E6=98=BE=E7=A4=BA=E4=B8=BA=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=BD=9C=E5=93=81=E3=80=81=E4=BF=AE=E6=94=B9=E4=BD=9C?= =?UTF-8?q?=E5=93=81=203=E3=80=81=E5=8A=A8=E6=80=81=E7=95=8C=E9=9D=A2?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E7=9C=8B=E5=88=B0=E4=BD=9C=E4=B8=9A=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E6=89=80=E5=A4=84=E5=8C=BF=E8=AF=84=E7=8A=B6=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/users/_course_homework.html.erb | 29 +++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb index 58b29696c..5ba83401c 100644 --- a/app/views/users/_course_homework.html.erb +++ b/app/views/users/_course_homework.html.erb @@ -12,13 +12,38 @@ <% end %> TO <%= link_to activity.course.name.to_s+" | 课程作业", homework_common_index_path(:course => activity.course.id, :host=> Setting.host_course), :class => "newsBlue ml15"%> -
+ + <% if activity.homework_detail_manual.comment_status == 1%> + 未开启匿评 + <% elsif activity.homework_detail_manual.comment_status == 2%> + 匿评中 + <% elsif activity.homework_detail_manual.comment_status == 3%> + 匿评已结束 + <% end%>
- <%= student_work_activity_submit_status(homework: activity) %> + <% is_teacher = User.current.allowed_to?(:as_teacher,activity.course) %> + <%= user_for_homework_common activity,is_teacher %>
+ + <% if activity.homework_type == 2 && is_teacher%> +
+ <%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: activity.id, is_test: true), class: 'c_blue test-program-btn', title: '教师可以通过模拟答题设置作业的标准答案' %> +
+ <% end %> + <% if activity.homework_type == 2%> +
+ 语言: + <% if activity.homework_detail_programing.language.to_i == 1%> + C + <% elsif activity.homework_detail_programing.language.to_i == 2%> + C++ + <% end%> +
+ <% end %> +
截止时间:<%= activity.end_time.to_s %>