|
|
|
@ -22,8 +22,7 @@ $(function(){
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
var test_program = function(cb){
|
|
|
|
|
$('#test-program-btn').hide()
|
|
|
|
|
|
|
|
|
|
$('#test-program-btn').hide();
|
|
|
|
|
var homework_id = $('#test-program-btn').attr('data-homework-id');
|
|
|
|
|
var student_work_id = $('#test-program-btn').attr('data-student-work-id');
|
|
|
|
|
var src = $('#program-src').val();
|
|
|
|
@ -31,7 +30,7 @@ $(function(){
|
|
|
|
|
var is_test = $('input[name=is_test]').val();
|
|
|
|
|
|
|
|
|
|
if(!valid_form()){
|
|
|
|
|
$('#test-program-btn').show()
|
|
|
|
|
$('#test-program-btn').show();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
/*
|
|
|
|
@ -81,19 +80,19 @@ $(function(){
|
|
|
|
|
$('.ProResult').prepend(html);
|
|
|
|
|
|
|
|
|
|
if (data.status==0 && is_test != 'true') {
|
|
|
|
|
if (typeof cb == 'function') {cb(data); return;}
|
|
|
|
|
if (typeof cb == 'function') {cb(data);$('#test-program-btn').show(); return;}
|
|
|
|
|
var r=confirm("答题正确,是否立刻提交?");
|
|
|
|
|
if (r) {
|
|
|
|
|
$(".HomeWorkCon form").submit();
|
|
|
|
|
}
|
|
|
|
|
$('#test-program-btn').show()
|
|
|
|
|
$('#test-program-btn').show();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//2 超时 -2 编译错误 测试结束
|
|
|
|
|
if (data.status == 2 || data.status == -2 || tSeq >= tCount ){
|
|
|
|
|
if (typeof cb == 'function') {cb(data); return;}
|
|
|
|
|
$('#test-program-btn').show()
|
|
|
|
|
if (typeof cb == 'function') {cb(data);$('#test-program-btn').show(); return;}
|
|
|
|
|
$('#test-program-btn').show();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -105,7 +104,7 @@ $(function(){
|
|
|
|
|
} else {
|
|
|
|
|
alert("对不起,服务器繁忙请稍后再试!");
|
|
|
|
|
}
|
|
|
|
|
$('#test-program-btn').show()
|
|
|
|
|
$('#test-program-btn').show();
|
|
|
|
|
return;
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|