This commit is contained in:
huang 2015-09-03 17:19:04 +08:00
commit f5b4b02fb6
4 changed files with 3 additions and 7 deletions

View File

@ -360,7 +360,7 @@ class UsersController < ApplicationController
def user_commit_homework
flash[:notice] = l(:notice_successful_create)
redirect_to user_homeworks_user_path(User.current)
redirect_to student_work_index_url(:homework => params[:homework])
end
def user_new_homework

View File

@ -2347,7 +2347,7 @@ module ApplicationHelper
if homework.homework_type == 1 && homework.homework_detail_manual && homework.homework_detail_manual.comment_status != 1 #匿评作业,且作业状态不是在开启匿评之前
link_to "修改作品", "", :class => 'c_blue', :title => "开启匿评后不可修改作品"
elsif homework.homework_type == 2 #编程作业不能修改作品
link_to "作品已交", "",:class => 'c_blue',:title => "编程作业不可修改作品"
link_to "作品已交", student_work_index_path(:homework => homework.id),:class => 'c_blue',:title => "编程作业不可修改作品"
else
link_to "修改作品", edit_student_work_path(work.id),:class => 'c_blue'
end

View File

@ -21,7 +21,7 @@
</div>
<% if homework_common.homework_type == 2 && is_teacher%>
<div class="homepagePostSubmit">
<%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: homework_common.id, is_test: true) %>
<%= link_to "模拟答题", new_user_commit_homework_users_path(homework_id: homework_common.id, is_test: true), class: 'c_blue' %>
</div>
<% end %>
<div class="homepagePostDeadline">

View File

@ -49,10 +49,6 @@
<div class="cl"></div>
<a href="javascript:void(0);" class="c_blue"><%= @homework.user.show_name %></a>
<p class="HomeWorkP"><%= @homework.description.html_safe %> <br />
<% @homework.homework_tests.each do |test| %>
输入 <%=test.input%> <br />
输出 <%=test.output%><br />
<% end %>
</p>
</div>
<!--p class="c_grey mt15">注:迟交扣<span class="c_red">2</span>分,缺评一个作品扣<span class="c_red">2</span>分</p-->