首页进入我发布的作业,再编辑作业,确认编辑,却返回“我管理的作业”
This commit is contained in:
parent
057439b9d3
commit
a5a0f21ba4
|
@ -198,9 +198,9 @@ class HomeworkCommonController < ApplicationController
|
|||
|
||||
@hw_status = params[:hw_status].to_i
|
||||
if params[:is_manage] == "1"
|
||||
redirect_to manage_or_receive_homeworks_user_path(User.current.id)
|
||||
redirect_to user_manage_homeworks_user_path(User.current.id)
|
||||
elsif params[:is_manage] == "2"
|
||||
redirect_to my_homeworks_user_path(User.current.id)
|
||||
redirect_to user_receive_homeworks_user_path(User.current.id)
|
||||
elsif @hw_status == 1
|
||||
redirect_to user_course_community_path(User.current.id)
|
||||
elsif @hw_status == 2
|
||||
|
|
|
@ -778,7 +778,7 @@ class StudentWorkController < ApplicationController
|
|||
end
|
||||
end
|
||||
end
|
||||
redirect_to student_homeworks_user_path(User.current.id)
|
||||
redirect_to student_work_index_path(:homework => @homework.id)
|
||||
end
|
||||
|
||||
def retry_work
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
}
|
||||
function cancel_edit(){
|
||||
<% if @is_manage.to_i == 1 %>
|
||||
window.location.href='<%=manage_or_receive_homeworks_user_path(User.current.id) %>';
|
||||
window.location.href='<%=user_manage_homeworks_user_path(User.current.id) %>';
|
||||
<% elsif @is_manage.to_i == 2 %>
|
||||
window.location.href='<%=my_homeworks_user_path(User.current.id) %>';
|
||||
window.location.href='<%=user_receive_homeworks_user_path(User.current.id) %>';
|
||||
<% elsif @hw_status == 3 %>
|
||||
window.location.href='<%=homework_common_index_path(:course => @course.id) %>';
|
||||
<% elsif @hw_status == 1 %>
|
||||
|
|
Loading…
Reference in New Issue