commit
4bd8fa0f51
|
@ -198,9 +198,9 @@ class HomeworkCommonController < ApplicationController
|
||||||
|
|
||||||
@hw_status = params[:hw_status].to_i
|
@hw_status = params[:hw_status].to_i
|
||||||
if params[:is_manage] == "1"
|
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"
|
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
|
elsif @hw_status == 1
|
||||||
redirect_to user_course_community_path(User.current.id)
|
redirect_to user_course_community_path(User.current.id)
|
||||||
elsif @hw_status == 2
|
elsif @hw_status == 2
|
||||||
|
|
|
@ -778,7 +778,7 @@ class StudentWorkController < ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
redirect_to student_homeworks_user_path(User.current.id)
|
redirect_to student_work_index_path(:homework => @homework.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
def retry_work
|
def retry_work
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
}
|
}
|
||||||
function cancel_edit(){
|
function cancel_edit(){
|
||||||
<% if @is_manage.to_i == 1 %>
|
<% 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 %>
|
<% 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 %>
|
<% elsif @hw_status == 3 %>
|
||||||
window.location.href='<%=homework_common_index_path(:course => @course.id) %>';
|
window.location.href='<%=homework_common_index_path(:course => @course.id) %>';
|
||||||
<% elsif @hw_status == 1 %>
|
<% elsif @hw_status == 1 %>
|
||||||
|
|
|
@ -76,7 +76,7 @@ function submit_set_score_rule(end_time){
|
||||||
function regex_evaluation_start(end_time){
|
function regex_evaluation_start(end_time){
|
||||||
var evaluation_start = $.trim($("#evaluation_start_time").val());
|
var evaluation_start = $.trim($("#evaluation_start_time").val());
|
||||||
if(evaluation_start == ""){
|
if(evaluation_start == ""){
|
||||||
$("#homework_evaluation_start_time").text("开启匿评日期不能为空");
|
$("#homework_evaluation_start_time").text("开启评审日期不能为空");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var end_time = new Date(end_time);
|
var end_time = new Date(end_time);
|
||||||
|
@ -85,7 +85,7 @@ function regex_evaluation_start(end_time){
|
||||||
$("#homework_evaluation_start_time").text("");
|
$("#homework_evaluation_start_time").text("");
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
$("#homework_evaluation_start_time").text("开启匿评日期必须大于截止日期");
|
$("#homework_evaluation_start_time").text("开启评审日期必须大于关闭评审日期");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ function regex_evaluation_end(){
|
||||||
var evaluation_start = $.trim($("#evaluation_start_time").val());
|
var evaluation_start = $.trim($("#evaluation_start_time").val());
|
||||||
var evaluation_end = $.trim($("#evaluation_end_time").val());
|
var evaluation_end = $.trim($("#evaluation_end_time").val());
|
||||||
if(evaluation_end == ""){
|
if(evaluation_end == ""){
|
||||||
$("#homework_evaluation_end_time").text("关闭匿评日期不能为空");
|
$("#homework_evaluation_end_time").text("关闭评审日期不能为空");
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
var evaluation_start_time = new Date(evaluation_start);
|
var evaluation_start_time = new Date(evaluation_start);
|
||||||
|
@ -104,7 +104,7 @@ function regex_evaluation_end(){
|
||||||
$("#homework_evaluation_end_time").text("");
|
$("#homework_evaluation_end_time").text("");
|
||||||
return true;
|
return true;
|
||||||
}else{
|
}else{
|
||||||
$("#homework_evaluation_end_time").text("关闭匿评日期不能小于开启匿评日期");
|
$("#homework_evaluation_end_time").text("关闭评审日期不能小于开启评审日期");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -116,7 +116,7 @@ function regex_evaluation_num(){
|
||||||
var evaluation_num = $.trim($("#evaluation_num").val());
|
var evaluation_num = $.trim($("#evaluation_num").val());
|
||||||
var regex = /^\d+$/;
|
var regex = /^\d+$/;
|
||||||
if(evaluation_num==""){
|
if(evaluation_num==""){
|
||||||
$("#evaluation_num_notice").text("匿评人数不能为空");
|
$("#evaluation_num_notice").text("评审人数不能为空");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else if(regex.test(evaluation_num)){
|
else if(regex.test(evaluation_num)){
|
||||||
|
@ -134,13 +134,13 @@ function regex_evaluation_num(){
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$("#evaluation_num_notice").text("匿评人数必须为大于0");
|
$("#evaluation_num_notice").text("评审人数必须为大于0");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
$("#evaluation_num_notice").text("匿评人数只能为正整数");
|
$("#evaluation_num_notice").text("评审人数只能为正整数");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue