diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js
index 9ae1300e7..12db483b8 100644
--- a/public/assets/kindeditor/kindeditor.js
+++ b/public/assets/kindeditor/kindeditor.js
@@ -249,7 +249,7 @@ K.options = {
themeType : 'default',
langType : 'zh_CN',
urlType : '',
- newlineTag : 'p',
+ newlineTag : 'br',
resizeType : 1,
syncType : 'form',
pasteType : 2,
@@ -2539,7 +2539,7 @@ function _nativeCommand(doc, key, val) {
function _nativeCommandValue(doc, key) {
var val = '';
try {
- val = doc.queryCommandValue(key);
+ val = doc.query_nativeCommand(self.doc, name, val);Value(key);
} catch (e) {}
if (typeof val !== 'string') {
val = '';
diff --git a/public/javascripts/homework.js b/public/javascripts/homework.js
index a4b30384a..45d8de48b 100644
--- a/public/javascripts/homework.js
+++ b/public/javascripts/homework.js
@@ -11,15 +11,12 @@ $(function(){
var title = $('#program-title').val();
if (!src) {
-// alert('请输入正确的代码');
-
var htmlvalue = "
请输入正确的代码!
";
pop_up_box(htmlvalue,580,30,50);
return false;
}
if (!title) {
-// alert('请输入标题');
var htmlvalue = "请输入标题!
";
pop_up_box(htmlvalue,580,30,50);
return false;
@@ -39,31 +36,6 @@ $(function(){
$('#test-program-btn').show();
return;
}
- /*
- $.post(
- '/student_work/program_test_ex',
- {homework: homework_id, student_work_id: student_work_id, src: src, title: title, is_test: is_test},
- function(data,status){
- tested = true;
- console.log(data);
- if(data.index <=0){
- data.index = $('.ProResultTop').length+1;
- }
-
- if (typeof cb == 'function') {cb(data); return;}
-
- var html=bt('t:result-list',data);
- $('.ProResult').prepend(html);
-
- if (data.status==0 && is_test != 'true') {
- var r=confirm("答题正确,是否立刻提交?");
- if (r) {
- $(".HomeWorkCon form").submit();
- }
- }
- }
- );
- */
//先测试一次并返回测试集个数及结果再判断是否需要继续进行测试
var test_post = function(i, testid){
$.post(
@@ -73,7 +45,6 @@ $(function(){
testid: testid},
function(data,status){
if (data.status==-4 || data.status==-5 ){
-// alert("非常抱歉,您的程序引起了后台问题,请在公共贴吧提交您的代码进行意见反馈,谢谢!");
//弹框
var root_path = getRootPath();
var forums_1_path = root_path + "/forums/1"
@@ -84,7 +55,6 @@ $(function(){
return;
}
else if (data.status==-3){
-// alert("对不起,服务器繁忙请稍后再试!");
var htmlvalue = "对不起,服务器繁忙请稍后再试!
";
pop_up_box(htmlvalue,580,30,50);
$('#test-program-btn').show();
@@ -122,11 +92,9 @@ $(function(){
}
).fail(function(xhr, status){
if(status == 'timeout'){
-// alert("您的答案超时了, 请检查代码是否存在死循环的错误.");
var htmlvalue = "您的答案超时了, 请检查代码是否存在死循环的错误!
";
pop_up_box(htmlvalue,580,30,50);
} else {
-// alert("对不起,服务器繁忙请稍后再试!");
var htmlvalue = "对不起,服务器繁忙请稍后再试!
";
pop_up_box(htmlvalue,580,30,50);
}
@@ -146,11 +114,6 @@ $(function(){
return;
}
if($('.ProResult .ProResultTop').length<=0){
-// var r=confirm("测试后才能提交,是否立刻测试?");
-// if (r) {
-// test_program();
-// }
-
var htmlvalue = "测试后才能提交,是否立刻测试?
";
pop_up_box(htmlvalue,580,30,50);
$("#code-test-button").on('click',function(){
@@ -162,10 +125,6 @@ $(function(){
if (!tested) {
test_program(function(data){
if (data.status!=0) {
-// var r=confirm("测试不通过,是否强制提交?");
-// if (!r) {
-// return;
-// }
var htmlvalue = "测试不通过,是否强制提交?
";
pop_up_box(htmlvalue,580,30,50);
return;