学生提交作品后,跳转至“作品列表”,而不是“作业信息”

This commit is contained in:
cxt 2016-09-30 10:29:42 +08:00
parent 17c82c5291
commit a9a53caa13
4 changed files with 4 additions and 4 deletions

View File

@ -1033,7 +1033,7 @@ class UsersController < ApplicationController
update_org_activity(homework.class,homework.id)
flash[:notice] = l(:notice_successful_create)
redirect_to student_work_index_url(:homework => params[:homework])
redirect_to student_work_index_url(:homework => params[:homework], :tab => 2)
else
render_403
end

View File

@ -38,6 +38,6 @@
<script type="text/javascript">
function clickOK() {
window.location.href = '<%= student_work_index_url(:homework => @homework.id)%>';
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/student_work?homework=" + "<%= @homework.id%>&tab=2"
}
</script>

View File

@ -39,6 +39,6 @@
<script type="text/javascript">
function clickOK() {
window.location.href = '<%= student_work_index_url(:homework => @homework.id)%>';
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/student_work?homework=" + "<%= @homework.id%>&tab=2"
}
</script>

View File

@ -12,5 +12,5 @@ window.location.href = '<%= edit_student_work_url(@work)%>';
function clickCanel() {
hideModal('#popbox02');
window.location.href = '<%= student_work_index_url(:homework => @homework.id)%>';
window.location.href= "<%= Setting.protocol%>://"+"<%= Setting.host_name%>"+"/student_work?homework=" + "<%= @homework.id%>&tab=2"
}