Merge branch 'yuanke' into develop

This commit is contained in:
huang 2016-05-19 16:11:06 +08:00
commit 4857769c49
22 changed files with 255 additions and 184 deletions

View File

@ -81,6 +81,7 @@ class StudentWorkController < ApplicationController
#根据传入的tIndex确定是第几次测试
#之后如果觉得很卡 可以改成将结果传回JS再以参数形式传回来
def program_test_ex
tStarttime = Time.now
is_test = params[:is_test] == 'true'
@ -106,108 +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 #本次测试结果
if result["status"].to_i == -2 #编译错误
result["error_msg"] = result["error_msg"][0..2047]
end
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"] #编译错误时的信息
if result["status"] == 0
tmpstatus = 0
end
#该状态用于存入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
unless student_work.save
resultObj[:status] = 200
else
student_work.name = params[:title]
student_work.description = params[:src]
if result["status"] == 0
tmpstatus = 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
unless student_work.save
resultObj[:status] = 200
else
student_work.name = params[:title]
student_work.description = params[:src]
#每次从数据库取出上次的结果加上本次的结果再存入数据库
if result["status"].to_i != -2
result["results"].first['user_wait'] = tUsedtime
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["results"][0]["status"].to_i == 2
result["status"] = 2
#每次从数据库取出上次的结果加上本次的结果再存入数据库
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
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
#将每次用户等待时间都存起来以便管理界面显示用
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']
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
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
#将每次用户等待时间都存起来以便管理界面显示用
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']
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

View File

@ -24,8 +24,8 @@
<th style="width: 100px;">
测试完成时间
</th>
<th style="width: 60px;">
<span style="float:left; margin-left:20px;">答题状态</span>
<th style="width: 80px;">
<span style="float:left; margin-left:30px;">答题状态</span>
</th>
<th style="width: 50px;">
<span style="float:left; margin-left:20px;">耗时</span>
@ -76,6 +76,10 @@
<%= "代码超时" %>
<% elsif test.status == -3 %>
<%= "请求超时" %>
<% elsif test.status == -4 %>
<%= "judge代码出错!" %>
<% elsif test.status == -5 %>
<%= "trustie代码出错!" %>
<% else %>
<%= "答题错误" %>
<% end %>

View File

@ -43,8 +43,8 @@
<% count=activity.children.count%>
<% end %>
<li class="ml15">
<span class="grayTxt">发帖时间<%= format_time(activity.created_on) %></span>
<span class="grayTxt">更新时间<%= format_time(activity.updated_on) %></span>
<span class="grayTxt">发布<%= format_time(activity.created_on) %></span>
<span class="grayTxt">更新:<%= format_time(activity.updated_on) %></span>
<p class="list-info fr grayTxt">
<span><%= count>0 ? "#{count}" :"0" %></span>
<span>回复</span>

View File

@ -45,8 +45,8 @@
<p><%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54, :maxwordsnum=>100} %></p>
</div>
<div class="ml15 mt10">
<span class="grayTxt">发帖时间<%= format_time(activity.created_on) %></span>
<span class="grayTxt">更新时间<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %></span>
<span class="grayTxt">发帖:<%= format_time(activity.created_on) %></span>
<span class="grayTxt">更新:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %></span>
<% count=0 %>
<% if activity.parent %>
<% count=activity.parent.children.count%>

View File

@ -33,8 +33,8 @@
<p><%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>activity.description, :maxheight=>54, :maxwordsnum=>100} %></p>
</div>
<div class="ml15 mt10">
<span class="grayTxt">发布时间<%= format_time(activity.created_on) %></span>
<span class="grayTxt">更新时间<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %></span>
<span class="grayTxt">发布:<%= format_time(activity.created_on) %></span>
<span class="grayTxt">更新:<%= format_time(CourseActivity.where("course_act_type='#{activity.class}' and course_act_id =#{activity.id}").first.updated_at) %></span>
<% count=0 %>
<% count=activity.comments.count %>
<p class="list-info fr grayTxt"><span><%= count>0 ? "#{count}" : "0" %></span><span>回复</span><span>|</span><span><%= get_praise_num(activity) > 0 ? "#{get_praise_num(activity)}" : "0" %></span><span>赞</span></p>

View File

@ -1,4 +1,4 @@
<div class="homepagePostIntro break_word upload_img list_style maxh360 table_maxWidth lh18" id="activity_description_<%= user_activity_id%>">
<div class="homepagePostIntro break_word upload_img maxh360 table_maxWidth " id="activity_description_<%= user_activity_id%>">
<div id="intro_content_<%= user_activity_id%>">
<%= content.to_s.html_safe%>
</div>

View File

@ -45,8 +45,8 @@
<p><%=render :partial =>"users/intro_content_ex", :locals=>{:user_activity_id =>activity.id, :content=>content, :maxheight=>54, :maxwordsnum=>100} %></p>
</div>
<div class="ml15 mt10 f12">
<span class="grayTxt">发帖时间<%= format_time(activity.created_on) %></span>
<span class="grayTxt">更新时间<%= format_time(ForgeActivity.where("forge_act_type='#{activity.class}' and forge_act_id =#{activity.id}").first.updated_at) %></span>
<span class="grayTxt">发帖:<%= format_time(activity.created_on) %></span>
<span class="grayTxt">更新:<%= format_time(ForgeActivity.where("forge_act_type='#{activity.class}' and forge_act_id =#{activity.id}").first.updated_at) %></span>
<% count=0 %>
<% if activity.parent %>
<% count=activity.parent.children.count%>

View File

@ -28,12 +28,10 @@
</li>
<div class="cl"></div>
<li class="ml15">
<!--<span class="grayTxt">创建:<%#= format_time(course.created_at) %></span>-->
<span class="grayTxt">更新:<%= format_time(course.updated_on) %></span>
<span class="grayTxt">
创建时间:<%= format_time(course.created_at) %>
</span>
<span class="grayTxt">更新时间:<%= format_time(course.updated_on) %></span>
<span class="grayTxt">
开课学期:&nbsp;&nbsp;<span><%= current_time_and_term course %></span>
学期:&nbsp;&nbsp;<span><%= current_time_and_term course %></span>
</span>
<% if User.current.admin? || User.current.allowed_to?(:as_teacher,@course) %>
<% homework_num = course.homework_commons.count %>

View File

@ -27,8 +27,8 @@
</li>
<div class="cl"></div>
<li class="ml15">
<span class="grayTxt">创建时间:<%= format_time(project.created_on) %></span>
<span class="grayTxt">更新时间<%= format_time(project.updated_at) %></span>
<!--<span class="grayTxt">创建时间:<%#= format_time(project.created_on) %></span>-->
<span class="grayTxt">更新:<%= format_time(project.updated_at) %></span>
<p class="list-info fr grayTxt"><span><%= project.project_score.issue_num %></span><span>问题</span><span>|</span><span> <%= project.project_score.attach_num %></span><span>资源</span></p>
</li>
<div class="cl"></div>

View File

@ -92,6 +92,15 @@
<input type="hidden" name="is_test" value="<%=@is_test%>">
<div class="mt15">
<span>请使用 <%= @homework.language_name %> 语言编写</span>
<% if @homework.language.to_i == 1 %>
<span class = "fr">编译器信息:gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC)</span>
<% elsif @homework.language.to_i == 2 %>
<span class = "fr">编译器信息:gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC)</span>
<% elsif @homework.language.to_i == 3 %>
<span class = "fr">编译器信息:Python version "2.6.6"</span>
<% elsif @homework.language.to_i == 4 %>
<span class = "fr">编译器信息:java version "1.7.0_85" OpenJDK Runtime Environment</span>
<% end %>
<span data-language=<%=@homework.language%> style="display-hidden" id="data-language"></span>
</div>
<div class="mt10">

View File

@ -75,6 +75,15 @@
<div class="mt15">
<span>请使用 <%= @homework.language_name %> 语言编写</span>
<% if @homework.language.to_i == 1 %>
<span class = "fr">编译器信息:gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC)</span>
<% elsif @homework.language.to_i == 2 %>
<span class = "fr">编译器信息:gcc version "4.4.7" 20120313 (Red Hat 4.4.7-11) (GCC)</span>
<% elsif @homework.language.to_i == 3 %>
<span class = "fr">编译器信息:Python version "2.6.6"</span>
<% elsif @homework.language.to_i == 4 %>
<span class = "fr">编译器信息:java version "1.7.0_85" OpenJDK Runtime Environment</span>
<% end %>
</div>
<div class="mt10">
<%= f.text_area :name, id: 'program-title', class:"InputBox W700", placeholder:"请概括你的代码的功能" %>

View File

@ -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

View File

@ -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 = "</br><div style='width:550px;text-align:center'>仅支持如下图片格式:bmp,jpeg,jpg,png,gif,BMP,JPEG,JPG,PNG,GIF!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>";
pop_up_box(htmlvalue,580,30,50);
}
},
afterError : function(str) {

View File

@ -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);

View File

@ -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;}
.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;}

View File

@ -1287,3 +1287,33 @@ function description_showwords_ellipsis(id,num){
$("#intro_content_"+id).show();
}
//by yk 弹框 valuehtml代码或跳转其他页面代码 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("<a href='javascript:void(0)' onclick='hideModal();' style='margin-right: 5px; margin-top:-10px;right:0;' class='resourceClose'></a>");
$('#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();
}
}

View File

@ -11,11 +11,14 @@ $(function(){
var title = $('#program-title').val();
if (!src) {
alert('请输入正确的代码');
var htmlvalue = "</br><div style='width:550px;text-align:center'>请输入正确的代码!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>";
pop_up_box(htmlvalue,580,30,50);
return false;
}
if (!title) {
alert('请输入标题');
var htmlvalue = "</br><div style='width:550px;text-align:center'>请输入标题!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>";
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 = "</br><div style='width:430px;text-align:center;margin:0 auto' >您的程序引发了不知名异常,请在公共贴吧提交您的代码进行意见反馈,我们处理后会立即联系您,谢谢!</div><div style='width:550px;text-align:center'><a target='_Blank' href="+forums_1_path+">点我进入反馈页面</a></div>";
pop_up_box(htmlvalue,580,30,50);
$('#test-program-btn').show();
return;
}
else if (data.status==-3){
var htmlvalue = "</br><div style='width:550px;text-align:center'>对不起,服务器繁忙请稍后再试!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>";
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 = "</br><div style='width:550px;text-align:center'>答题正确,是否立刻提交?</div></br><div style='width:164px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn fl' onclick='submit_code()'>确定</a><a href='javascript:void(0);' class='Blue-btn fl' onclick='hideModal()'>取消</a></div><script>function submit_code(){$('.HomeWorkCon form').submit();hideModal();}</script>";
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 = "</br><div style='width:550px;text-align:center'>您的答案超时了, 请检查代码是否存在死循环的错误!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>";
pop_up_box(htmlvalue,580,30,50);
} else {
alert("对不起,服务器繁忙请稍后再试!");
var htmlvalue = "</br><div style='width:550px;text-align:center'>对不起,服务器繁忙请稍后再试!</div></br><div style='width:67px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn' onclick='hideModal()'>确定</a></div>";
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 = "</br><div style='width:550px;text-align:center'>测试后才能提交,是否立刻测试?</div></br><div style='width:164px; margin:0 auto; text-align:center'><a href='javascript:void(0);' id='code-test-button' class='Blue-btn fl'>确定</a><a href='javascript:void(0);' class='Blue-btn fl' onclick='hideModal()'>取消</a></div>";
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 = "</br><div style='width:550px;text-align:center'>测试不通过,是否强制提交?</div></br><div style='width:164px; margin:0 auto; text-align:center'><a href='javascript:void(0);' class='Blue-btn fl' onclick='submit_code()'>确定</a><a href='javascript:void(0);' class='Blue-btn fl' onclick='hideModal()'>取消</a></div><script>function submit_code(){$('.HomeWorkCon form').submit();hideModal();}</script>";
pop_up_box(htmlvalue,580,30,50);
return;
};
$(".HomeWorkCon form").submit();
});

View File

@ -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 */
@ -1125,10 +1125,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;}

View File

@ -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;}

View File

@ -679,9 +679,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;}
@ -718,8 +719,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;}
@ -861,7 +862,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}
@ -1352,8 +1356,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; }

View File

@ -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;}

View File

@ -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;}