diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb index deab2feb6..b71c5a6e3 100644 --- a/app/controllers/student_work_controller.rb +++ b/app/controllers/student_work_controller.rb @@ -81,6 +81,7 @@ class StudentWorkController < ApplicationController #根据传入的tIndex确定是第几次测试 #之后如果觉得很卡 可以改成将结果传回JS再以参数形式传回来 def program_test_ex + tStarttime = Time.now is_test = params[:is_test] == 'true' @@ -106,106 +107,123 @@ class StudentWorkController < ApplicationController tEndtime = Time.now tUsedtime = (tEndtime.to_i-tStarttime.to_i)*1000+(tEndtime.usec - tStarttime.usec)/1000 logger.debug "program_test_ex user wait time = #{tUsedtime} 毫秒" - - #status 0:答案正确 -3http超时 -2:编译错误 -1:答案错误 2:程序运行超时 + #status 0:答案正确 -5program_test_ex 函数出错 -4judge代码出错 -3http超时 -2:编译错误 -1:答案错误 2:程序运行超时 + resultObj[:status] = -3 CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>-3,:wait_time=>tUsedtime,:student_work_id=>student_work.id) - - end - if result["status"].to_i != -2 - #result["results"].first['output'] = result["results"].first['output'].gsub(" ","□") - #result["results"].first['result'] = result["results"].first['result'].gsub(" ","□") - space_replace_1(result["results"].first['output']) - space_replace_1(result["results"].first['result']) + rescue + #-4 judge代码 出错 + logger.debug "program_test_error 1" + resultObj[:status] = -4 + tmpstatus = -4 + CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>tmpstatus,:time_used=>0,:wait_time=>0,:student_work_id=>student_work.id) end - logger.debug result + begin + if resultObj[:status] != -3 && resultObj[:status] != -4 + if result["status"].to_i != -2 + #result["results"].first['output'] = result["results"].first['output'].gsub(" ","□") + #result["results"].first['result'] = result["results"].first['result'].gsub(" ","□") + space_replace_1(result["results"].first['output']) + space_replace_1(result["results"].first['result']) + end - #-1 默认值 0全部正确并结束 2 超时 -2 编译错误 - resultObj[:status] = -1 - resultObj[:results] = result["results"].first #本次测试结果 - result["error_msg"] = result["error_msg"][0..2047] - resultObj[:error_msg] = result["error_msg"] #编译错误时的信息 + logger.debug result - #该状态用于存入CodeTests - tmpstatus = -1 - if result["status"].to_i == -2 #编译错误 - resultObj[:results] = result["error_msg"] - resultObj[:status] = -2 - tmpstatus = -2 - elsif result["results"][0]["status"].to_i == 2 - resultObj[:status] = 2 - tmpstatus = 2 - end + #-1 默认值 0全部正确并结束 2 超时 -2 编译错误 + resultObj[:status] = -1 + resultObj[:results] = result["results"].first #本次测试结果 + if result["status"].to_i == -2 #编译错误 + result["error_msg"] = result["error_msg"][0..2047] + end + resultObj[:error_msg] = result["error_msg"] #编译错误时的信息 + + #该状态用于存入CodeTests + tmpstatus = -1 + if result["status"].to_i == -2 #编译错误 + resultObj[:results] = result["error_msg"] + resultObj[:status] = -2 + tmpstatus = -2 + elsif result["results"][0]["status"].to_i == 2 + resultObj[:status] = 2 + tmpstatus = 2 + end - if result["status"] == 0 - tmpstatus = 0 - end + if result["status"] == 0 + tmpstatus = 0 + end - unless student_work.save - resultObj[:status] = 200 - else - student_work.name = params[:title] - student_work.description = params[:src] + unless student_work.save + resultObj[:status] = 200 + else + student_work.name = params[:title] + student_work.description = params[:src] - if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(Time.now.to_s).strftime("%Y-%m-%d") - student_work.late_penalty = @homework.late_penalty - else - student_work.late_penalty = 0 - end + if Time.parse(@homework.end_time.to_s).strftime("%Y-%m-%d") < Time.parse(Time.now.to_s).strftime("%Y-%m-%d") + student_work.late_penalty = @homework.late_penalty + else + student_work.late_penalty = 0 + end - #每次从数据库取出上次的结果加上本次的结果再存入数据库 - if result["status"].to_i != -2 - result["results"].first['user_wait'] = tUsedtime + #每次从数据库取出上次的结果加上本次的结果再存入数据库 + if result["status"].to_i != -2 + result["results"].first['user_wait'] = tUsedtime - if result["results"][0]["status"].to_i == 2 - result["status"] = 2 - end - end + if result["results"][0]["status"].to_i == 2 + result["status"] = 2 + end + end - status = result["status"] - if index == 1 - student_work_test = student_work.student_work_tests.build(status: status, - results: [resultObj[:results]],src: params[:src]) - student_work_test.save! - resultObj[:testid] = student_work_test.id - else - #先从数据库取出result - student_work_test = StudentWorkTest.find(params[:testid]) - results = student_work_test.results - results << resultObj[:results] - student_work_test.results = results - student_work_test.status = (result["status"] != 0 ? result["status"] : student_work_test.status) - student_work_test.save! - status = student_work_test.status - resultObj[:testid] = student_work_test.id - end + status = result["status"] + if index == 1 + student_work_test = student_work.student_work_tests.build(status: status, + results: [resultObj[:results]],src: params[:src]) + student_work_test.save! + resultObj[:testid] = student_work_test.id + else + #先从数据库取出result + student_work_test = StudentWorkTest.find(params[:testid]) + results = student_work_test.results + results << resultObj[:results] + student_work_test.results = results + student_work_test.status = (result["status"] != 0 ? result["status"] : student_work_test.status) + student_work_test.save! + status = student_work_test.status + resultObj[:testid] = student_work_test.id + end - #超时或编译错误则直接返回了并存入数据库 - if resultObj[:status] == 2 || resultObj[:status] == -2 || index == @homework.homework_tests.size - if status == 0 - resultObj[:status] = 0 - end - student_work.save! - resultObj[:time] = student_work_test.created_at.to_s(:db) - resultObj[:index] = student_work.student_work_tests.count - end + #超时或编译错误则直接返回了并存入数据库 + if resultObj[:status] == 2 || resultObj[:status] == -2 || index == @homework.homework_tests.size + if status == 0 + resultObj[:status] = 0 + end + student_work.save! + resultObj[:time] = student_work_test.created_at.to_s(:db) + resultObj[:index] = student_work.student_work_tests.count + end - #将每次用户等待时间都存起来以便管理界面显示用 - tEndtime = Time.now - tUsedtime = (tEndtime.to_i-tStarttime.to_i)*1000+(tEndtime.usec - tStarttime.usec)/1000 - logger.debug "program_test_ex user wait time = #{tUsedtime} 毫秒" + #将每次用户等待时间都存起来以便管理界面显示用 + tEndtime = Time.now + tUsedtime = (tEndtime.to_i-tStarttime.to_i)*1000+(tEndtime.usec - tStarttime.usec)/1000 + logger.debug "program_test_ex user wait time = #{tUsedtime} 毫秒" - time_used = 0 - if result["status"].to_i != -2 - #至少一毫秒 - time_used = result["results"].first['time_used'] == 0 ? 1:result["results"].first['time_used'] + time_used = 0 + if result["status"].to_i != -2 + #至少一毫秒 + time_used = result["results"].first['time_used'] == 0 ? 1:result["results"].first['time_used'] + end + #0:答案正确 -3http超时 -2:编译错误 -1:答案错误 2:程序运行超时 + CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>tmpstatus,:time_used=>time_used,:wait_time=>tUsedtime,:student_work_id=>student_work.id) + end end - #0:答案正确 -3http超时 -2:编译错误 -1:答案错误 2:程序运行超时 - CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>tmpstatus,:time_used=>time_used,:wait_time=>tUsedtime,:student_work_id=>student_work.id) - - #渲染返回结果 - render :json => resultObj + rescue + #-5 program_test_ex 函数出错 + logger.debug "program_test_error 2" + resultObj[:status] = -5 + tmpstatus = -5 + CodeTests.create(:homework_id=>@homework.id,:language=>@homework.homework_detail_programing.language,:status=>tmpstatus,:time_used=>0,:wait_time=>0,:student_work_id=>student_work.id) end + #渲染返回结果 + render :json => resultObj end end end diff --git a/app/views/admin/code_work_tests.html.erb b/app/views/admin/code_work_tests.html.erb index 64c3a41e1..2013bd322 100644 --- a/app/views/admin/code_work_tests.html.erb +++ b/app/views/admin/code_work_tests.html.erb @@ -24,8 +24,8 @@ 测试完成时间 - - 答题状态 + + 答题状态 耗时 @@ -76,6 +76,10 @@ <%= "代码超时" %> <% elsif test.status == -3 %> <%= "请求超时" %> + <% elsif test.status == -4 %> + <%= "judge代码出错!" %> + <% elsif test.status == -5 %> + <%= "trustie代码出错!" %> <% else %> <%= "答题错误" %> <% end %> diff --git a/app/views/blogs/_article.html.erb b/app/views/blogs/_article.html.erb index f0b082860..dd818fe72 100644 --- a/app/views/blogs/_article.html.erb +++ b/app/views/blogs/_article.html.erb @@ -43,8 +43,8 @@ <% count=activity.children.count%> <% end %>
  • - 发帖时间:<%= format_time(activity.created_on) %> - 更新时间:<%= format_time(activity.updated_on) %> + 发布:<%= format_time(activity.created_on) %> + 更新:<%= format_time(activity.updated_on) %>

    <%= count>0 ? "#{count}" :"0" %> 回复 diff --git a/app/views/users/_course_boardlist.html.erb b/app/views/users/_course_boardlist.html.erb index c92d117ee..bf23d9a97 100644 --- a/app/views/users/_course_boardlist.html.erb +++ b/app/views/users/_course_boardlist.html.erb @@ -45,8 +45,8 @@

    <%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54, :maxwordsnum=>100} %>

    - 发帖时间:<%= format_time(activity.created_on) %> - 更新时间:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %> + 发帖:<%= format_time(activity.created_on) %> + 更新:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %> <% count=0 %> <% if activity.parent %> <% count=activity.parent.children.count%> diff --git a/app/views/users/_course_newslist.html.erb b/app/views/users/_course_newslist.html.erb index ff99e116e..0e5805112 100644 --- a/app/views/users/_course_newslist.html.erb +++ b/app/views/users/_course_newslist.html.erb @@ -33,8 +33,8 @@

    <%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>activity.description, :maxheight=>54, :maxwordsnum=>100} %>

    - 发布时间:<%= format_time(activity.created_on) %> - 更新时间:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %> + 发布:<%= format_time(activity.created_on) %> + 更新:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %> <% count=0 %> <% count=activity.comments.count %>

    <%= count>0 ? "#{count}" : "0" %>回复|<%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "0" %>

    diff --git a/app/views/users/_intro_content.html.erb b/app/views/users/_intro_content.html.erb index c18e520ba..351f1fdb0 100644 --- a/app/views/users/_intro_content.html.erb +++ b/app/views/users/_intro_content.html.erb @@ -1,4 +1,4 @@ -
    +
    <%= content.to_s.html_safe%>
    diff --git a/app/views/users/_project_boardlist.html.erb b/app/views/users/_project_boardlist.html.erb index 55f576db1..25fd675fb 100644 --- a/app/views/users/_project_boardlist.html.erb +++ b/app/views/users/_project_boardlist.html.erb @@ -45,8 +45,8 @@

    <%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54, :maxwordsnum=>100} %>

    - 发帖时间:<%= format_time(activity.created_on) %> - 更新时间:<%= format_time(ForgeActivity.where("forge_act_type='#{activity.class}' and forge_act_id =#{activity.id}").first.updated_at) %> + 发帖:<%= format_time(activity.created_on) %> + 更新:<%= format_time(ForgeActivity.where("forge_act_type='#{activity.class}' and forge_act_id =#{activity.id}").first.updated_at) %> <% count=0 %> <% if activity.parent %> <% count=activity.parent.children.count%> diff --git a/app/views/users/_user_course_list.html.erb b/app/views/users/_user_course_list.html.erb index 8ef0faa9e..5e3f48963 100644 --- a/app/views/users/_user_course_list.html.erb +++ b/app/views/users/_user_course_list.html.erb @@ -28,12 +28,10 @@
  • + + 更新:<%= format_time(course.updated_on) %> - 创建时间:<%= format_time(course.created_at) %> - - 更新时间:<%= format_time(course.updated_on) %> - - 开课学期:  <%= current_time_and_term course %> + 学期:  <%= current_time_and_term course %> <% if User.current.admin? || User.current.allowed_to?(:as_teacher,@course) %> <% homework_num = course.homework_commons.count %> diff --git a/app/views/users/_user_project_list.html.erb b/app/views/users/_user_project_list.html.erb index 1526da58f..6124b82d8 100644 --- a/app/views/users/_user_project_list.html.erb +++ b/app/views/users/_user_project_list.html.erb @@ -27,8 +27,8 @@
  • - 创建时间:<%= format_time(project.created_on) %> - 更新时间:<%= format_time(project.updated_at) %> + + 更新:<%= format_time(project.updated_at) %>

    <%= project.project_score.issue_num %>问题| <%= project.project_score.attach_num %>资源

  • diff --git a/app/views/users/new_user_commit_homework.html.erb b/app/views/users/new_user_commit_homework.html.erb index 6405ba496..c066baae0 100644 --- a/app/views/users/new_user_commit_homework.html.erb +++ b/app/views/users/new_user_commit_homework.html.erb @@ -92,6 +92,15 @@
    请使用 <%= @homework.language_name %> 语言编写 + <% if @homework.language.to_i == 1 %> + 编译器信息:gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC) + <% elsif @homework.language.to_i == 2 %> + 编译器信息:gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC) + <% elsif @homework.language.to_i == 3 %> + 编译器信息:Python version "2.6.6" + <% elsif @homework.language.to_i == 4 %> + 编译器信息:java version "1.7.0_85" OpenJDK Runtime Environment + <% end %> style="display-hidden" id="data-language">
    diff --git a/app/views/users/user_commit_homework.html.erb b/app/views/users/user_commit_homework.html.erb index 6df6f2115..043886779 100644 --- a/app/views/users/user_commit_homework.html.erb +++ b/app/views/users/user_commit_homework.html.erb @@ -75,6 +75,15 @@
    请使用 <%= @homework.language_name %> 语言编写 + <% if @homework.language.to_i == 1 %> + 编译器信息:gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC) + <% elsif @homework.language.to_i == 2 %> + 编译器信息:gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC) + <% elsif @homework.language.to_i == 3 %> + 编译器信息:Python version "2.6.6" + <% elsif @homework.language.to_i == 4 %> + 编译器信息:java version "1.7.0_85" OpenJDK Runtime Environment + <% end %>
    <%= f.text_area :name, id: 'program-title', class:"InputBox W700", placeholder:"请概括你的代码的功能" %> diff --git a/lib/rails_kindeditor/config/routes.rb b/lib/rails_kindeditor/config/routes.rb index 86b888ad3..e205376d9 100644 --- a/lib/rails_kindeditor/config/routes.rb +++ b/lib/rails_kindeditor/config/routes.rb @@ -2,6 +2,6 @@ Rails.application.routes.draw do namespace :kindeditor do post "/upload" => "assets#create" get "/filemanager" => "assets#list" - get "/uploadpic" => "assets#uploadpic" + post "/uploadpic" => "assets#uploadpic" end end \ No newline at end of file diff --git a/public/assets/kindeditor/kindeditor.js b/public/assets/kindeditor/kindeditor.js index 9ae1300e7..c86a9ccd3 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 = ''; @@ -5694,7 +5694,9 @@ _plugin('core', function(K) { } } else { //alert(data.message); - alert("仅支持如下图片格式:bmp,jpeg,jpg,png,gif,BMP,JPEG,JPG,PNG,GIF"); +// alert("仅支持如下图片格式:bmp,jpeg,jpg,png,gif,BMP,JPEG,JPG,PNG,GIF"); + var htmlvalue = "
    仅支持如下图片格式:bmp,jpeg,jpg,png,gif,BMP,JPEG,JPG,PNG,GIF!

    确定
    "; + pop_up_box(htmlvalue,580,30,50); } }, afterError : function(str) { diff --git a/public/assets/kindeditor/pasteimg.js b/public/assets/kindeditor/pasteimg.js index 7165b142a..97d5e33c5 100644 --- a/public/assets/kindeditor/pasteimg.js +++ b/public/assets/kindeditor/pasteimg.js @@ -370,6 +370,9 @@ function df(myself) { else sstr += that.attr("src") + "|"; } + else if (that.attr("src").indexOf("data:image") >= 0){ + that.parents().removeAttr("href"); //删除所有父节点的href + } } }); uploadpic(sstr,myself); @@ -397,7 +400,7 @@ function uploadpic(piclist,myself) { $.ajax({ url: "/kindeditor/uploadpic", data:{"pic":piclist}, - type: "GET", + type: "POST", beforeSend: function () { // $("#ajax-indicator span").text("图片上传中请稍等..."); keShadow(myself); diff --git a/public/assets/kindeditor/plugins/code/previewcode.css b/public/assets/kindeditor/plugins/code/previewcode.css index b9c8252e8..65c75d6ea 100644 --- a/public/assets/kindeditor/plugins/code/previewcode.css +++ b/public/assets/kindeditor/plugins/code/previewcode.css @@ -51,5 +51,6 @@ span.at {color:#269ac9;} span.at a{color:#269ac9;text-decoration: none;} /*yk*/ -.ke-content ol li{list-style-type: decimal;margin-left: 20px;} -.ke-content ul li{list-style-type: disc;margin-left: 20px;} \ No newline at end of file +.ke-content ol li{list-style-type: decimal;} +.ke-content ul li{list-style-type: disc;} +.ke-content ol,.ke-content ul{margin-top:0;margin-bottom: 0;} \ No newline at end of file diff --git a/public/javascripts/application.js b/public/javascripts/application.js index 112492a7e..24bf3e2cb 100644 --- a/public/javascripts/application.js +++ b/public/javascripts/application.js @@ -1287,3 +1287,33 @@ function description_showwords_ellipsis(id,num){ $("#intro_content_"+id).show(); } + +//by yk 弹框 value:html代码或跳转其他页面代码 tWidth = 580 tTop=30 tLeft=50 +function pop_up_box(value,tWidth,tTop,tLeft){ + + if(!tWidth){ + var tWidth = 580; + } + + if(!tTop){ + var tTop = 30; + } + + if(!tLeft){ + var tLeft = 50; + } + + $("#ajax-modal").html(value); + showModal('ajax-modal', tWidth + "px"); + $('#ajax-modal').siblings().remove(); + $('#ajax-modal').before(""); + $('#ajax-modal').parent().css("top", tTop+"%").css("left", tLeft+"%").css("padding-top", "10px").css("position", "fixed"); + $('#ajax-modal').parent().addClass("resourceUploadPopup"); + $('#ajax-modal').css("padding-left", "16px").css("padding-bottom", "16px"); + + function hideModal(){ + $('#ajax-modal').hide(); + } +} + + diff --git a/public/javascripts/homework.js b/public/javascripts/homework.js index 391774f0b..45d8de48b 100644 --- a/public/javascripts/homework.js +++ b/public/javascripts/homework.js @@ -11,11 +11,14 @@ $(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; } return true; @@ -33,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( @@ -66,6 +44,22 @@ $(function(){ src: src, title: title, is_test: is_test,tIndex:i, testid: testid}, function(data,status){ + if (data.status==-4 || data.status==-5 ){ + //弹框 + var root_path = getRootPath(); + var forums_1_path = root_path + "/forums/1" + var htmlvalue = "
    您的程序引发了不知名异常,请在公共贴吧提交您的代码进行意见反馈,我们处理后会立即联系您,谢谢!
    点我进入反馈页面
    "; + pop_up_box(htmlvalue,580,30,50); + + $('#test-program-btn').show(); + return; + } + else if (data.status==-3){ + var htmlvalue = "
    对不起,服务器繁忙请稍后再试!

    确定
    "; + pop_up_box(htmlvalue,580,30,50); + $('#test-program-btn').show(); + return; + } var tSeq = data.tseq; var tCount = data.tcount; console.log("tSeq="+tSeq); @@ -81,10 +75,8 @@ $(function(){ if (data.status==0 && is_test != 'true') { if (typeof cb == 'function') {cb(data);$('#test-program-btn').show(); return;} - var r=confirm("答题正确,是否立刻提交?"); - if (r) { - $(".HomeWorkCon form").submit(); - } + var htmlvalue = "
    答题正确,是否立刻提交?

    确定取消
    "; + pop_up_box(htmlvalue,580,30,50); $('#test-program-btn').show(); return; } @@ -100,9 +92,11 @@ $(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); } $('#test-program-btn').show(); return; @@ -120,20 +114,21 @@ $(function(){ return; } if($('.ProResult .ProResultTop').length<=0){ - var r=confirm("测试后才能提交,是否立刻测试?"); - if (r) { + var htmlvalue = "
    测试后才能提交,是否立刻测试?

    确定取消
    "; + pop_up_box(htmlvalue,580,30,50); + $("#code-test-button").on('click',function(){ test_program(); - } + hideModal(); + }); return; } - 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; + }; $(".HomeWorkCon form").submit(); }); diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css index af22d6306..539621560 100644 --- a/public/stylesheets/courses.css +++ b/public/stylesheets/courses.css @@ -139,8 +139,8 @@ a.postTypeGrey:hover {color:#269ac9;} .homepagePostSubmit {font-size:14px; color:#888888; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px; padding:0px 10px;} .homepagePostSubmit:hover {background-color:#d8d8d8;} .homepagePostIntro {font-size:14px; color:#484848;overflow:hidden;} -.homepagePostIntro ol li{list-style-type: decimal;margin-left: 20px;} -.homepagePostIntro ul li{list-style-type: disc;margin-left: 20px;} +.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;} +.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;} .homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;} .homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;} @@ -435,8 +435,8 @@ a:hover.ping_sub{ background:#14a8b9;} .ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;} .ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;} /*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/ -.list_style ol li{list-style-type: decimal;margin-left: 20px;} -.list_style ul li{list-style-type: disc;margin-left: 20px;} +.list_style ol li{list-style-type: decimal;margin-left: 40px;} +.list_style ul li{list-style-type: disc;margin-left: 40px;} span.author { font-size: 0.9em; color: #888; } /* 创建作品 work */ @@ -1123,10 +1123,10 @@ a.link_file_a2{ background:url(../images/pic_file.png) 0 -15px no-repeat; paddin .postDetailTitle {width:580px; max-width:580px; margin-bottom:5px;} .postDetailDes {width:580px; max-width:580px; margin-bottom:6px; color:#888888;display:block;overflow:hidden;word-break:keep-all;text-overflow:ellipsis;} .postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;} -.postDetailDes ol li{list-style-type: decimal;margin-left: 20px;} -.postDetailDes ul li{list-style-type: disc;margin-left: 20px;} +.postDetailDes ol li{list-style-type: decimal;margin-left: 40px;} +.postDetailDes ul li{list-style-type: disc;margin-left: 40px;} .postDetailDes td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;} -.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important;} +.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; } .postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;} .postDetailDate {color:#888888; font-size:12px; float:left;} .postDetailReply { margin-top:28px; color:#888888; float:right;} diff --git a/public/stylesheets/css.css b/public/stylesheets/css.css index b740436f9..3e21a5fda 100644 --- a/public/stylesheets/css.css +++ b/public/stylesheets/css.css @@ -120,8 +120,8 @@ a:hover.ping_sub{ background:#14a8b9;} .ping_distop span{ float:left;} .ping_distop p{ color:#5f5f5f;min-height: 24px;} .ping_disfoot a{ float:right; color:#15bccf; margin-left:5px;} -.list_style ol li{list-style-type: decimal;margin-left: 20px;} -.list_style ul li{list-style-type: disc;margin-left: 20px;} +.list_style ol li{list-style-type: decimal;margin-left: 40px;} +.list_style ul li{list-style-type: disc;margin-left: 40px;} .ping_distop span a{ float:right; /*width:20px;*/ height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;} diff --git a/public/stylesheets/new_user.css b/public/stylesheets/new_user.css index 44e64e9ab..9e9839621 100644 --- a/public/stylesheets/new_user.css +++ b/public/stylesheets/new_user.css @@ -678,9 +678,10 @@ a.postTypeGrey:hover {color:#269ac9;} .homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;} .homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;} .homepagePostReply {width:720px; margin:0px auto; background-color:#f1f1f1; margin-top:10px;} +.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;} +.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;} .homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888; position: relative;} -.homepagePostIntro ol li{list-style-type: decimal;margin-left: 20px;} -.homepagePostIntro ul li{list-style-type: disc;margin-left: 20px;} + .borderBottomNone {border-bottom:none !important;} .homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;} .homepagePostReplyBanner {width:718px; height:33px; border:1px solid #e4e4e4; line-height:33px; vertical-align:middle; font-size:12px; color:#888888;} @@ -717,8 +718,8 @@ a.postOptionLink:hover {color:#ffffff; background-color:#269ac9;} .homepagePostReplyDes {float:left; width:642px; margin-left:15px;} .homepagePostReplyPublisher {font-size:12px; color:#888888; margin-bottom:5px;} .homepagePostReplyContent {font-size:12px; color:#484848; margin:3px 5px 12px 5px;font: 14px/1.5 "sans serif",tahoma,verdana,helvetica;font-family:"微软雅黑","宋体";} -.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 20px;} -.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 20px;} +.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 40px;} +.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 40px;} .table_maxWidth table {max-width: 642px;} .homepagePostProjectState {width:52px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;} .homepagePostAssignTo {float:left; font-size:14px; color:#269ac9;} @@ -860,7 +861,10 @@ a.sortArrowActiveU {background:url(images/post_image_list.png) -17px -20px no-re .postDetailTitle {width:570px; max-width:570px; margin-bottom:5px;} .postDetailDes {width:580px; max-width:580px; margin-bottom:6px; color:#888888;display:block;overflow:hidden;word-break:keep-all;text-overflow:ellipsis;} .postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;} -.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important;} +.postDetailDes ol li{list-style-type: decimal;margin-left: 40px;} +.postDetailDes ul li{list-style-type: disc;margin-left: 40px;} +.postDetailDes td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;} +.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; } /*line-height: 18px !important;*/ .postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;} .postDetailDate {color:#888888; font-size:12px; float:left;} .postDetailReply { color:#888888; float:right;display: inline} @@ -1351,8 +1355,8 @@ a.link_file_a{ background:url(../images/pic_file.png) 0 2px no-repeat; padding-l a:hover.link_file_a{ background:url(../images/pic_file.png) 0 -25px no-repeat; color:#3ca5c6;} .link_file_a{ display:block; max-width:450px;overflow:hidden; white-space: nowrap; text-overflow:ellipsis;} -.list_style ol li{list-style-type: decimal;margin-left: 20px;} -.list_style ul li{list-style-type: disc;margin-left: 20px;} +.list_style ol li{list-style-type: decimal;margin-left: 40px;} +.list_style ul li{list-style-type: disc;margin-left: 40px;} .ul_grey li {color:#909090; list-style-position:inside; padding-left:1px;list-style-image:url('../images/news_dot2.png')} .ul_normal_color li {list-style-position:inside; padding-left:1px; list-style-image:url('../images/news_dot.png')} span.author { font-size: 0.9em; color: #888; } diff --git a/public/stylesheets/project.css b/public/stylesheets/project.css index 17977d46a..927be4cc3 100644 --- a/public/stylesheets/project.css +++ b/public/stylesheets/project.css @@ -220,8 +220,8 @@ a:hover.talk_btn{ background:#2a9dc1;} .mt0{ margin-top:0px;} .talk_info{ margin-left:60px; margin-top:10px;} /*.issue_desc li{list-style-type: decimal;margin-left: 20px;}*/ -.issue_desc ol li{list-style-type: decimal;margin-left: 20px;} -.issue_desc ul li{list-style-type: disc;margin-left: 20px;} +.issue_desc ol li{list-style-type: decimal;margin-left: 40px;} +.issue_desc ul li{list-style-type: disc;margin-left: 40px;} .talk_info img {max-width:100%;} a.talk_edit{ color:#426e9a; margin-right:5px;} a:hover.talk_edit{ color:#ff5722;} @@ -333,8 +333,8 @@ a:hover.ping_sub{ background:#14a8b9;} .ping_distop p{ color:#5f5f5f;word-break: break-all;word-wrap: break-word;} .ping_disfoot a{ float:right; color: #6883b6; margin-left:5px; margin-bottom:5px;} /*.ping_distop span a{ float:right; width:20px; height:20px; background:url(images/star.png) -24px 0 no-repeat; margin-right:3px;}*/ -.list_style ol li{list-style-type: decimal;margin-left: 20px;} -.list_style ul li{list-style-type: disc;margin-left: 20px;} +.list_style ol li{list-style-type: decimal;margin-left: 40px;} +.list_style ul li{list-style-type: disc;margin-left: 40px;} /*上传资源弹出框样式*/ .popbox_polls{position:fixed !important;} @@ -971,8 +971,8 @@ a:hover.Reply_pic{border:1px solid #64bdd9;} margin: 10px auto 0px; background-color: #F1F1F1; } -.homepagePostIntro ol li{list-style-type: decimal;margin-left: 20px;} -.homepagePostIntro ul li{list-style-type: disc;margin-left: 20px;} +.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;} +.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;} .homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;} .topBorder { border-top: 1px solid #E4E4E4; @@ -1112,10 +1112,10 @@ a:hover.BlueCirBtnMini{ background:#269ac9; color:#fff;} .postDetailTitle {width:580px; max-width:580px; margin-bottom:5px;} .postDetailDes {width:580px; max-width:580px; margin-bottom:6px; color:#888888;display:block;overflow:hidden;word-break:keep-all;text-overflow:ellipsis;} .postDetailDes p,div,em{word-break: break-all;word-wrap: break-word;} -.postDetailDes ol li{list-style-type: decimal;margin-left: 20px;} -.postDetailDes ul li{list-style-type: disc;margin-left: 20px;} +.postDetailDes ol li{list-style-type: decimal;margin-left: 40px;} +.postDetailDes ul li{list-style-type: disc;margin-left: 40px;} .postDetailDes td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;} -.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important; line-height: 18px !important;} +.homepagePostIntro p,.homepagePostIntro div,.homepagePostIntro em, .homepagePostIntro span{text-align: justify; text-justify:inter-ideograph; word-break: normal !important; word-wrap: break-word !important;} .postDetailCreater {color:#888888; font-size:12px; float:left; margin-right:25px;} .postDetailDate {color:#888888; font-size:12px; float:left;} .postDetailReply { margin-top:28px; color:#888888; float:right;} diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css index 643aea8cf..6aea25f6d 100644 --- a/public/stylesheets/public.css +++ b/public/stylesheets/public.css @@ -603,8 +603,8 @@ a.postTypeGrey:hover {color:#269ac9;} .homepagePostSubmit {font-size:14px; color:#888888; border:1px solid #dddddd; background-color:#eaeaea; float:left; margin-right:20px; padding:0px 10px;} .homepagePostSubmit:hover {background-color:#d8d8d8;} .homepagePostIntro {font-size:14px; color:#484848;overflow:hidden;} -.homepagePostIntro ol li{list-style-type: decimal;margin-left: 20px;} -.homepagePostIntro ul li{list-style-type: disc;margin-left: 20px;} +.homepagePostIntro ol li{list-style-type: decimal;margin-left: 40px;} +.homepagePostIntro ul li{list-style-type: disc;margin-left: 40px;} .homepagePostIntro td,.homepagePostIntro tr {border: 1px solid; border-color: inherit;} .homepagePostDeadline {font-size:12px; color:#888888; float:left; margin-top: 2px;} .homepagePostDate {font-size:12px; color:#888888;margin-bottom: 5px;} @@ -639,8 +639,8 @@ a.postReplyCancel:hover {color:#ffffff;} .homepagePostReplyDes {float:left; width:620px; margin-left:15px;} .homepagePostReplyPublisher {font-size:12px; color:#484848; margin-bottom:5px;} .homepagePostReplyContent {font-size:12px; color:#484848; margin-bottom:12px;} -.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 20px;} -.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 20px;} +.homepagePostReplyContent ol li{list-style-type: decimal;margin-left: 40px;} +.homepagePostReplyContent ul li{list-style-type: disc;margin-left: 40px;} .homepagePostReplyContent td,.homepagePostReplyContent tr {border: 1px solid; border-color: inherit;} .table_maxWidth table {max-width: 642px;} .homepagePostProjectState {width:42px; height:20px; line-height:20px; border-radius:1px; background-color:#28be6c; color:#ffffff; text-align:center; vertical-align:middle; font-size:12px; display:inline-block; margin-left:5px;}