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 def user_commit_homework
flash[:notice] = l(:notice_successful_create) flash[:notice] = l(:notice_successful_create)
redirect_to user_homeworks_user_path(User.current) redirect_to student_work_index_url(:homework => params[:homework])
end end
def user_new_homework 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 #匿评作业,且作业状态不是在开启匿评之前 if homework.homework_type == 1 && homework.homework_detail_manual && homework.homework_detail_manual.comment_status != 1 #匿评作业,且作业状态不是在开启匿评之前
link_to "修改作品", "", :class => 'c_blue', :title => "开启匿评后不可修改作品" link_to "修改作品", "", :class => 'c_blue', :title => "开启匿评后不可修改作品"
elsif homework.homework_type == 2 #编程作业不能修改作品 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 else
link_to "修改作品", edit_student_work_path(work.id),:class => 'c_blue' link_to "修改作品", edit_student_work_path(work.id),:class => 'c_blue'
end end

View File

@ -21,7 +21,7 @@
</div> </div>
<% if homework_common.homework_type == 2 && is_teacher%> <% if homework_common.homework_type == 2 && is_teacher%>
<div class="homepagePostSubmit"> <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> </div>
<% end %> <% end %>
<div class="homepagePostDeadline"> <div class="homepagePostDeadline">

View File

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