From a5a0f21ba462d6397b179fdf44bfd39d4ff1b3e1 Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 13 Jan 2017 17:14:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E6=88=91=E5=8F=91=E5=B8=83=E7=9A=84=E4=BD=9C=E4=B8=9A=EF=BC=8C?= =?UTF-8?q?=E5=86=8D=E7=BC=96=E8=BE=91=E4=BD=9C=E4=B8=9A=EF=BC=8C=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E7=BC=96=E8=BE=91=EF=BC=8C=E5=8D=B4=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E2=80=9C=E6=88=91=E7=AE=A1=E7=90=86=E7=9A=84=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/homework_common_controller.rb | 4 ++-- app/controllers/student_work_controller.rb | 2 +- app/views/homework_common/edit.html.erb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 290dc1ba2..083b5bb5e 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -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 diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index 493222e21..bf558910e 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -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 diff --git a/app/views/homework_common/edit.html.erb b/app/views/homework_common/edit.html.erb index b2bc236ca..3240cfdea 100644 --- a/app/views/homework_common/edit.html.erb +++ b/app/views/homework_common/edit.html.erb @@ -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 %> From 56047e415b6e6d5abe1cf1a3068841782bb189bc Mon Sep 17 00:00:00 2001 From: cxt Date: Fri, 13 Jan 2017 17:28:33 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=AB=9E=E8=B5=9B=E8=AF=84=E5=88=86?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=EF=BC=9A=E5=A6=82=E5=9B=BE=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E6=98=AF=E7=8F=AD=E7=BA=A7=E4=BD=9C=E4=B8=9A=E4=B8=AD=E7=9A=84?= =?UTF-8?q?=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/javascripts/contest.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/public/javascripts/contest.js b/public/javascripts/contest.js index 615256d5f..764d096af 100644 --- a/public/javascripts/contest.js +++ b/public/javascripts/contest.js @@ -76,7 +76,7 @@ function submit_set_score_rule(end_time){ function regex_evaluation_start(end_time){ var evaluation_start = $.trim($("#evaluation_start_time").val()); if(evaluation_start == ""){ - $("#homework_evaluation_start_time").text("开启匿评日期不能为空"); + $("#homework_evaluation_start_time").text("开启评审日期不能为空"); return false; } var end_time = new Date(end_time); @@ -85,7 +85,7 @@ function regex_evaluation_start(end_time){ $("#homework_evaluation_start_time").text(""); return true; }else{ - $("#homework_evaluation_start_time").text("开启匿评日期必须大于截止日期"); + $("#homework_evaluation_start_time").text("开启评审日期必须大于关闭评审日期"); return false; } } @@ -95,7 +95,7 @@ function regex_evaluation_end(){ var evaluation_start = $.trim($("#evaluation_start_time").val()); var evaluation_end = $.trim($("#evaluation_end_time").val()); if(evaluation_end == ""){ - $("#homework_evaluation_end_time").text("关闭匿评日期不能为空"); + $("#homework_evaluation_end_time").text("关闭评审日期不能为空"); return true; } var evaluation_start_time = new Date(evaluation_start); @@ -104,7 +104,7 @@ function regex_evaluation_end(){ $("#homework_evaluation_end_time").text(""); return true; }else{ - $("#homework_evaluation_end_time").text("关闭匿评日期不能小于开启匿评日期"); + $("#homework_evaluation_end_time").text("关闭评审日期不能小于开启评审日期"); return false; } } @@ -116,7 +116,7 @@ function regex_evaluation_num(){ var evaluation_num = $.trim($("#evaluation_num").val()); var regex = /^\d+$/; if(evaluation_num==""){ - $("#evaluation_num_notice").text("匿评人数不能为空"); + $("#evaluation_num_notice").text("评审人数不能为空"); return false; } else if(regex.test(evaluation_num)){ @@ -134,13 +134,13 @@ function regex_evaluation_num(){ return true; } else{ - $("#evaluation_num_notice").text("匿评人数必须为大于0"); + $("#evaluation_num_notice").text("评审人数必须为大于0"); return false; } } } else{ - $("#evaluation_num_notice").text("匿评人数只能为正整数"); + $("#evaluation_num_notice").text("评审人数只能为正整数"); return false; } }