新建编程作业时的提交验证

cxt_course
cxt 9 years ago
parent 6f4618fffb
commit a0f4cc1c0c

@ -857,13 +857,14 @@ function regex_group_attr(){
//验证编程作业的参数 //验证编程作业的参数
function regex_program_attr() { function regex_program_attr() {
var result = true;
$.each($('#programHomework textarea.InputBox'), function(i, val){ $.each($('#programHomework textarea.InputBox'), function(i, val){
if ($(val).val().length<=0) { if (result && $(val).val().length<=0) {
$(val)[0].focus(); $(val)[0].focus();
return false; result = false;
} }
}); });
return true; return result;
} }
function regexHomeworkCommonName() function regexHomeworkCommonName()

@ -236,13 +236,14 @@ function regex_group_attr(){
//验证编程作业的参数 //验证编程作业的参数
function regex_program_attr() { function regex_program_attr() {
var result = true;
$.each($('#programHomework textarea.InputBox'), function(i, val){ $.each($('#programHomework textarea.InputBox'), function(i, val){
if ($(val).val().length<=0) { if (result && $(val).val().length<=0) {
$(val)[0].focus(); $(val)[0].focus();
return false; result = false;
} }
}); });
return true; return result;
} }
//老师导入作业时查询作业 //老师导入作业时查询作业

Loading…
Cancel
Save