使用
winzip
工具进行解压可能会导致
diff --git a/public/javascripts/course.js b/public/javascripts/course.js
index 172e630f0..c8e3b533e 100644
--- a/public/javascripts/course.js
+++ b/public/javascripts/course.js
@@ -788,13 +788,24 @@ $(function(){
$(".student_score_info").bind("mouseover",function(e){
//alert($(this).html());
$(this).find("div").show();
- $(this).find("div").css("top",e.pageY);
- $(this).find("div").css("left",e.pageX);
+ //$(this).find("div").css("top",e.pageY);
+ //$(this).find("div").css("left",e.pageX);
});
$(".student_score_info").bind("mouseout",function(e){
//alert($(this).html());
$(this).find("div").hide();
});
+ //最终成绩提示
+ $(".student_final_scor_info").bind("mouseover",function(e){
+ //alert($(this).html());
+ $(this).find("div").show();
+ //$(this).find("div").css("top",e.pageY);
+ //$(this).find("div").css("left",e.pageX);
+ });
+ $(".student_final_scor_info").bind("mouseout",function(e){
+ //alert($(this).html());
+ $(this).find("div").hide();
+ });
$("#about_project label").eq(1).remove();
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 177e8202d..c25821b80 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -654,7 +654,8 @@ a.down_btn{ border:1px solid #CCC; color:#999; padding:0px 5px; font-size:12px;
a:hover.down_btn{ background:#14ad5a; color:#fff; border:1px solid #14ad5a;}
.fr{ float:right;}
.li_min_search{ float:right; margin-right:-10px;}
-.info_ni{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 200px;margin-top: 10px;}
+.info_ni_download{ width:100px; padding:5px;position: fixed;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 200px;margin-top: 10px;}
+.info_ni{ width:100px; padding:5px;position: fixed;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 50px;margin-top: -5px;}
/*返回顶部*/
.to_top{width: 19px;height: 74px;position: fixed;top: 50px;right: 1px;color: white;background: #15bccf; line-height: 1.2; padding-top: 10px;padding-left: 5px;font-size: 14px;cursor: pointer;}
.hwork_num_ab{ width:120px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;min-height: 1px;}
From d2b76e92f270942924f26ef379df2a781d65fd7e Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 3 Jul 2015 10:55:22 +0800
Subject: [PATCH 08/12] =?UTF-8?q?=E5=B1=95=E5=BC=80=E5=90=8E=E6=88=90?=
=?UTF-8?q?=E7=BB=A9=E5=BE=97=E5=88=86=E6=A1=86=E6=98=BE=E7=A4=BA=E4=BD=8D?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/stylesheets/courses.css | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index c25821b80..be0e4de71 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -654,8 +654,8 @@ a.down_btn{ border:1px solid #CCC; color:#999; padding:0px 5px; font-size:12px;
a:hover.down_btn{ background:#14ad5a; color:#fff; border:1px solid #14ad5a;}
.fr{ float:right;}
.li_min_search{ float:right; margin-right:-10px;}
-.info_ni_download{ width:100px; padding:5px;position: fixed;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 200px;margin-top: 10px;}
-.info_ni{ width:100px; padding:5px;position: fixed;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 50px;margin-top: -5px;}
+.info_ni_download{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 200px;margin-top: 10px;}
+.info_ni{ width:100px; padding:5px;position: absolute;display:none;-moz-border-radius:3px; -webkit-border-radius:3px; border-radius:3px; box-shadow:0px 0px 5px #194a81; color:#666; background:#fff; text-align:left;margin-left: 50px;margin-top: -5px;}
/*返回顶部*/
.to_top{width: 19px;height: 74px;position: fixed;top: 50px;right: 1px;color: white;background: #15bccf; line-height: 1.2; padding-top: 10px;padding-left: 5px;font-size: 14px;cursor: pointer;}
.hwork_num_ab{ width:120px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis;min-height: 1px;}
From 4eb9ce6f0fe10f299ca9e3d355dfb7c187901852 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 3 Jul 2015 10:58:30 +0800
Subject: [PATCH 09/12] =?UTF-8?q?css=E6=8A=A5=E9=94=99?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/stylesheets/courses.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index be0e4de71..702140467 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -678,7 +678,7 @@ input#score{ width:40px;}
.student_work_search{background-color: #64bdd9;color: white !important;padding: 2px 7px;margin-left: 10px;cursor: pointer; }
/* 与我相关 */
-.new_icon{background:url(../images/new_icon.png) 0px 0px no-repeat; width:35px; height:15px; display:block;}
+/*.new_icon{background:url(../images/new_icon.png) 0px 0px no-repeat; width:35px; height:15px; display:block;}*/
a.about_me{text-align:center;font-size:16px; color:#64bdd9; margin:10px 0 0 10px;}
a:hover.about_me{ color:#0781b4;}
From 2938679795fe0a31d3c5dd7ba0a3845eebf61f57 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 3 Jul 2015 11:41:53 +0800
Subject: [PATCH 10/12] =?UTF-8?q?=E8=BF=9F=E4=BA=A4=E5=92=8C=E7=BC=BA?=
=?UTF-8?q?=E8=AF=84=E6=89=A3=E5=88=86=EF=BC=8C=E4=BF=AE=E6=94=B9=E4=B8=BA?=
=?UTF-8?q?0=E5=90=8E=E7=BB=A7=E7=BB=AD=E4=BF=AE=E6=94=B9=E6=9C=89?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/homework_common_controller.rb | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb
index 6b33a38ec..7808691cf 100644
--- a/app/controllers/homework_common_controller.rb
+++ b/app/controllers/homework_common_controller.rb
@@ -92,7 +92,7 @@ class HomeworkCommonController < ApplicationController
@homework.publish_time = params[:homework_common][:publish_time]
@homework.homework_type = params[:homework_common][:homework_type]
unless @homework.late_penalty == params[:late_penalty]
- @homework.student_works.where("late_penalty != 0").each do |student_work|
+ @homework.student_works.where("created_at > #{@homework.end_time}").each do |student_work|
student_work.late_penalty = params[:late_penalty]
student_work.save
end
@@ -108,8 +108,10 @@ class HomeworkCommonController < ApplicationController
@homework_detail_manual.evaluation_num = params[:evaluation_num]
unless @homework_detail_manual.absence_penalty == params[:absence_penalty]
if @homework_detail_manual.comment_status == 3 #当前作业处于匿评结束状态,修改缺评扣分才会修改每个作品应扣分的值
- @homework.student_works.where("absence_penalty != 0").each do |student_work|
- student_work.absence_penalty = student_work.absence_penalty / @homework_detail_manual.absence_penalty * params[:absence_penalty].to_i
+ work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"
+ @homework.student_works.each do |student_work|
+ absence_penalty_count = student_work.user.student_works_evaluation_distributions.where("student_work_id IN #{work_ids}").count - student_work.user.student_works_scores.where("student_work_id IN #{work_ids}").count
+ student_work.absence_penalty = absence_penalty_count > 0 ? absence_penalty_count * @homework_detail_manual.absence_penalty : 0
student_work.save
end
end
From 73d7ae4988c53b95545aabe2a85d8999f70b6761 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 3 Jul 2015 11:44:11 +0800
Subject: [PATCH 11/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=9C=E5=93=81?=
=?UTF-8?q?=E6=97=B6=E5=8C=BF=E8=AF=84=E6=89=A3=E5=88=86=E6=8F=90=E7=A4=BA?=
=?UTF-8?q?=E4=B8=8D=E6=AD=A3=E7=A1=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/views/homework_common/_homework_common_form.html.erb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/views/homework_common/_homework_common_form.html.erb b/app/views/homework_common/_homework_common_form.html.erb
index 21ed8900c..4542be9f5 100644
--- a/app/views/homework_common/_homework_common_form.html.erb
+++ b/app/views/homework_common/_homework_common_form.html.erb
@@ -103,7 +103,7 @@
缺评扣分:
<%= select_tag :absence_penalty,options_for_select(absence_penalty_option,homework.homework_detail_manual.absence_penalty), {:class => "fl mb10 h26 w70"} %>
分
-
学生漏评1个作品将扣 2 分
+
学生漏评1个作品将扣 <%= homework.homework_detail_manual.absence_penalty%> 分
From 981ad6e743d0b086d576f4934a25a044a166ab29 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Fri, 3 Jul 2015 11:49:02 +0800
Subject: [PATCH 12/12] =?UTF-8?q?=E7=BC=BA=E8=AF=84=E5=88=97=E8=A1=A8?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/student_work_controller.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/controllers/student_work_controller.rb b/app/controllers/student_work_controller.rb
index 954ab733f..596d5ba51 100644
--- a/app/controllers/student_work_controller.rb
+++ b/app/controllers/student_work_controller.rb
@@ -257,7 +257,7 @@ class StudentWorkController < ApplicationController
work_ids = "(" + @homework.student_works.map(&:id).join(",") + ")"
@stundet_works = StudentWork.find_by_sql("SELECT *,(all_count - has_count) AS absence FROM(
SELECT * ,
- (SELECT evaluation_num FROM homework_detail_manuals WHERE homework_detail_manuals.homework_common_id = #{@homework.id}) AS all_count,
+ (SELECT COUNT(*) FROM `student_works_evaluation_distributions` WHERE user_id = student_works.user_id AND student_work_id IN #{work_ids}) AS all_count,
(SELECT COUNT(*) FROM `student_works_scores` WHERE user_id = student_works.user_id AND student_work_id IN #{work_ids}) AS has_count
FROM `student_works`
WHERE homework_common_id = #{@homework.id}