|
|
|
@ -56,18 +56,20 @@ function show_more_project(url){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//老师提交 新建/修改 作业
|
|
|
|
|
function submit_homework(id)
|
|
|
|
|
{
|
|
|
|
|
if(!regex_homework_name())
|
|
|
|
|
{
|
|
|
|
|
function submit_homework(id){
|
|
|
|
|
if(!regex_homework_name()){
|
|
|
|
|
$("#homework_name").focus();
|
|
|
|
|
}
|
|
|
|
|
else if(!regex_homework_end_time())
|
|
|
|
|
{
|
|
|
|
|
else if(!regex_homework_end_time()){
|
|
|
|
|
$("#homework_end_time").focus();
|
|
|
|
|
}
|
|
|
|
|
else if(!regex_course_id())
|
|
|
|
|
{
|
|
|
|
|
else if(!regex_evaluation_start()){
|
|
|
|
|
$("#evaluation_start_time").focus()
|
|
|
|
|
}
|
|
|
|
|
else if(!regex_evaluation_end()){
|
|
|
|
|
$("#evaluation_end_time").focus()
|
|
|
|
|
}
|
|
|
|
|
else if(!regex_course_id()){
|
|
|
|
|
$("#course_id").focus();
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
@ -134,6 +136,42 @@ function search_homework_by_name(url){
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//验证匿评开启时间:大于截止时间,或者为空
|
|
|
|
|
function regex_evaluation_start(){
|
|
|
|
|
var evaluation_start = $.trim($("#evaluation_start_time").val());
|
|
|
|
|
if(evaluation_start == ""){
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
var end_time = new Date($.trim($("#homework_end_time").val()));
|
|
|
|
|
var evaluation_start_time = new Date(evaluation_start);
|
|
|
|
|
if(evaluation_start_time > end_time){
|
|
|
|
|
return true;
|
|
|
|
|
}else{
|
|
|
|
|
$("#homework_end_time_span").text("开启匿评日期必须大于截止日期");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//验证匿评结束时间:大于匿评开启时间,或者为空。当匿评开启时间为空时,匿评结束时间必须为空
|
|
|
|
|
function regex_evaluation_end(){
|
|
|
|
|
var evaluation_start = $.trim($("#evaluation_start_time").val());
|
|
|
|
|
var evaluation_end = $.trim($("#evaluation_end_time").val());
|
|
|
|
|
if(evaluation_end == ""){
|
|
|
|
|
return true;
|
|
|
|
|
}else if(evaluation_start == ""){
|
|
|
|
|
$("#homework_end_time_span").text("开启匿评日期为空时,关闭匿评日期必须为空");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
var evaluation_start_time = new Date(evaluation_start);
|
|
|
|
|
var evaluation_end_time = new Date(evaluation_end);
|
|
|
|
|
if(evaluation_end_time > evaluation_start_time){
|
|
|
|
|
return true;
|
|
|
|
|
}else{
|
|
|
|
|
$("#homework_end_time_span").text("关闭匿评日期必须大于开启匿评日期");
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//提交新建作品
|
|
|
|
|
function new_student_work()
|
|
|
|
|
{
|
|
|
|
|