diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index da79dd594..e3480b238 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -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 diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index ad9322cbc..2f210f466 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -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 diff --git a/app/views/users/_user_homework_list.html.erb b/app/views/users/_user_homework_list.html.erb index 273b815c3..f0bab160f 100644 --- a/app/views/users/_user_homework_list.html.erb +++ b/app/views/users/_user_homework_list.html.erb @@ -21,7 +21,7 @@ <% if homework_common.homework_type == 2 && is_teacher%>
- <%= 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' %>
<% end %>
diff --git a/app/views/users/new_user_commit_homework.html.erb b/app/views/users/new_user_commit_homework.html.erb index e4b1db757..8d5a1a48c 100644 --- a/app/views/users/new_user_commit_homework.html.erb +++ b/app/views/users/new_user_commit_homework.html.erb @@ -49,10 +49,6 @@
<%= @homework.user.show_name %>

<%= @homework.description.html_safe %>
- <% @homework.homework_tests.each do |test| %> -输入 <%=test.input%>
-输出 <%=test.output%>
- <% end %>