">
-
- <%=link_to(test.homeworkid, student_work_index_path(:homework => test.homeworkid))%>
+ |
+ <%=link_to(infos.homeworkid, student_work_index_path(:homework => infos.homeworkid))%>
|
<% if test.status != -2 && test.results.first['user_wait'] %>
@@ -51,7 +53,7 @@
<% end %>
|
- <%=%W(C C++ Python Java).at(test.language.to_i - 1)%>
+ <%=%W(C C++ Python Java).at(infos.language.to_i - 1)%>
|
<%=Time.parse(test.created_at.to_s).strftime("%Y-%m-%d %H:%M:%S")%>
diff --git a/app/views/courses/_compare_code_tips_1.html.erb b/app/views/courses/_compare_code_tips_1.html.erb
index 696c40a48..4dc073797 100644
--- a/app/views/courses/_compare_code_tips_1.html.erb
+++ b/app/views/courses/_compare_code_tips_1.html.erb
@@ -1,8 +1,6 @@
- <%if @homework.simi_time != nil %>
- <%="您上次查重的时间为"+Time.parse(@homework.simi_time.to_s).strftime("%Y-%m-%d %H:%M")%>
- <%end%>
+
重新查重
查看结果
@@ -39,7 +37,7 @@
console.log(data);
if (data.status == 0) {
- $("#ajax-modal").html('<%= escape_javascript( render :partial => 'courses/compare_code_tips_2',:locals => {:des=>"查重完成是否立即查看结果?",:status=>1, :homework=> homework,:courseid=> courseid})%>');
+ $("#ajax-modal").html('<%= escape_javascript( render :partial => 'courses/compare_code_tips_2',:locals => {:des=>"查重完成,是否立即查看结果?",:status=>1, :homework=> homework,:courseid=> courseid})%>');
showModal('ajax-modal', '580px');
$('#ajax-modal').siblings().remove();
$('#ajax-modal').before(" ");
diff --git a/app/views/courses/_show_compare_code.html.erb b/app/views/courses/_show_compare_code.html.erb
index 39f8e0565..00bea362e 100644
--- a/app/views/courses/_show_compare_code.html.erb
+++ b/app/views/courses/_show_compare_code.html.erb
@@ -8,8 +8,13 @@
<% end %>
- <%=src_name%>
- <%=dst_name%>
+ <%=src_name%>
+ <% if @simi_value.to_i >= 90 %>
+ 相似度<%=@simi_value.to_i%>%
+ <% else %>
+ 相似度<%=@simi_valu.to_i%>%
+ <% end %>
+ <%=dst_name%>
<%= src_code if src_code%>
<%= dst_code if dst_code%>
diff --git a/app/views/courses/code_repeat.html.erb b/app/views/courses/code_repeat.html.erb
index 8a48cfda4..ccca72a20 100644
--- a/app/views/courses/code_repeat.html.erb
+++ b/app/views/courses/code_repeat.html.erb
@@ -2,16 +2,17 @@
查重结果
- - 作品名称
+ - 序号
+ - 作品名称
- 姓名
- 学号
- 时间
- - 作品名称
+ - 作品名称
- 姓名
- 学号
- 时间
@@ -20,18 +21,18 @@
<%if @homework.homework_type == 2 %>
- <% @student_works.each do |student_work|%>
+ <% @student_works.each_with_index do |student_work,index|%>
+ - <%=index+1%>
<% student_work_name = student_work.name.nil? || student_work.name.empty? ? student_work.user.show_name + '的作品' : student_work.name%>
-
- - <%=student_work_name%>
+ - <%=student_work_name%>
- <%=student_work.user.show_name%>
- <%= student_work.user.user_extensions.nil? ? "--" : student_work.user.user_extensions.student_id%>
- <%= Time.parse(format_time(student_work.created_at)).strftime("%m-%d %H:%M")%>
<% if student_work.simi_id.to_i > 0 && @works_hash[student_work.simi_id.to_i] %>
<% simi_student_work = @works_hash[student_work.simi_id.to_i] %>
<% simi_student_work_name = simi_student_work.name.nil? || simi_student_work.name.empty? ? simi_student_work.user.show_name + '的作品' : simi_student_work.name%>
- - <%=simi_student_work_name%>
+ - <%=simi_student_work_name%>
- <%=simi_student_work.user.show_name%>
- <%= simi_student_work.user.user_extensions.nil? ? "--" : simi_student_work.user.user_extensions.student_id%>
- <%= Time.parse(format_time(simi_student_work.created_at)).strftime("%m-%d %H:%M")%>
@@ -47,11 +48,12 @@
<%= link_to("查看", show_comparecode_course_path(:homework_id => @homework.id,:src_id => student_work.id,:dst_id => student_work.simi_id.to_i),:class => "cha-btn",:remote => true ) %>
<%else%>
- - 无
+ - 无
- --
- --
- --
- --
+ -
<% end %>
<%end%>
diff --git a/app/views/courses/show_comparecode.js.erb b/app/views/courses/show_comparecode.js.erb
index 5cfae9428..be98db344 100644
--- a/app/views/courses/show_comparecode.js.erb
+++ b/app/views/courses/show_comparecode.js.erb
@@ -1,10 +1,10 @@
-$("#ajax-modal").html('<%= escape_javascript( render :partial => 'courses/show_compare_code' ,:locals => {:src_code=> @src_code,:src_name=> @src_username,:dst_name=> @dst_username, :dst_code=> @dst_code,})%>');
+$("#ajax-modal").html('<%= escape_javascript( render :partial => 'courses/show_compare_code' ,:locals => {:src_code=> @src_code,:src_name=> @src_username,:dst_name=> @dst_username, :dst_code=> @dst_code, :simivalue=> @simi_value })%>');
showModal('ajax-modal', '1250px');
$('#ajax-modal').siblings().remove();
-$('#ajax-modal').before(" ");
-$('#ajax-modal').parent().css("top","20%").css("left","20%").css("position","absolute");
+$('#ajax-modal').before(" ");
+$('#ajax-modal').parent().css("top","30%").css("left","20%").css("padding-top","20px").css("position","fixed");
//$('#ajax-modal').parent().addClass("resourceUploadPopup");
-$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px").css("padding-top","10px");
+$('#ajax-modal').css("padding-left","16px").css("padding-bottom","16px");
function closeModal(){
hideModal($(".program-compare-code"));
diff --git a/app/views/student_work/_student_work_list.html.erb b/app/views/student_work/_student_work_list.html.erb
index db15e94fb..f6d310269 100644
--- a/app/views/student_work/_student_work_list.html.erb
+++ b/app/views/student_work/_student_work_list.html.erb
@@ -123,7 +123,7 @@
if (data.status == 0) {
var homework_simi_time = data.comparetime;
- if (!homework_simi_time){
+ if (homework_simi_time == 0){
//没进行过代码查重则直接查重
test_repeat();
}
diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css
index 3a20dfa04..5162bcb16 100644
--- a/public/stylesheets/application.css
+++ b/public/stylesheets/application.css
@@ -2850,19 +2850,21 @@ img.school_avatar {
a.btn_message_free{ background:#15BCCF; display:block; text-align:center; color:#fff; padding:3px 0; width:60px; margin-bottom:10px;margin-left: 58px;}
/*20160401袁可------------------ 查重结果样式*/
-.conbox{ width:1000px; margin:0 auto; border:1px solid #f0f0f0; background:#fff;}
+.conbox{ width:1000px; margin:0 auto; border:3px solid #f0f0f0; background:#fff;}
.conbox-h2{ font-size:16px; padding:10px 0; padding-left:25px;}
.chabox{ width:1000px;}
-.chabox ul li{ float:left; width:87px; text-align:center; display:block;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
-.chabox ul li.chabox-w-151{ width:151px; display:block;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
+.chabox ul li{ float:left; width:82px; text-align:center; display:block;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
+.chabox ul li.chabox-w-401{ width:151px; display:block;white-space:nowrap; overflow:hidden; text-overflow:ellipsis;}
.chabox ul li.chabox-r-line{ border-right:1px solid #D1D1D1;}
.chabox-top{ width:1000px; }
.chabox-top li{ font-size:14px; font-weight:bold; line-height:40px; height:40px; background:#E4E4E4; color:#000;}
-.chabox-con li{font-size:12px; line-height:35px; height:35px; color:#000; border-bottom:1px solid #DFDFDF;}
+.chabox-con li{font-size:12px; line-height:35px; height:35px; color:#888; border-bottom:1px solid #DFDFDF;}
a.cha-btn{ display:block; width:50px; height:20px; line-height:20px; margin:0 auto; border:1px solid #269ac9; color:#269ac9;-webkit-border-radius: 3px;border-radius:3px; margin-top:8px;}
a:hover.cha-btn{ background:#269ac9; color:#fff;}
.chabox-header li{ font-size:14px; font-weight:bold; line-height:40px; height:40px; border-top:1px solid #E4E4E4; border-right:1px solid #E4E4E4; color:#000;}
.chabox ul li.chabox-w-500{ width:499px;}
+.chabox ul li.chabox-w-40{ width:39px; border-right:1px solid #D1D1D1;}
+.chabox ul li.chabox-txt-left{ text-align:left;text-indent:1em; }
.contrast-box{ width:1200px;box-shadow: 0 0 5px #6B6B6B; background:#fff; margin:0 auto; }
.contrast-con{ width:599px; border-right:1px solid #D1D1D1; float:left;}
|