From 283e93c9e23f467ea14ef655437415ba76e1f657 Mon Sep 17 00:00:00 2001
From: sw <939547590@qq.com>
Date: Sat, 4 Jul 2015 12:07:21 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E5=90=AF=E7=94=A8=E5=8C=BF=E8=AF=84?=
=?UTF-8?q?=E4=BD=9C=E4=B8=9A=E4=B8=8D=E7=8E=B0=E5=AE=9E=E5=8C=BF=E8=AF=84?=
=?UTF-8?q?=E6=A0=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
....erb => _evaluation_student_work.html.erb} | 33 ++++--------
.../_evaluation_student_work_title.html.erb | 43 ++++++++++++++++
app/views/student_work/_student_work.html.erb | 50 ++++---------------
.../student_work/_student_work_title.html.erb | 8 +--
app/views/student_work/index.html.erb | 41 +++++++++------
public/stylesheets/courses.css | 2 +
public/stylesheets/public.css | 2 +
7 files changed, 94 insertions(+), 85 deletions(-)
rename app/views/student_work/{_eavluation_student_work.html.erb => _evaluation_student_work.html.erb} (68%)
create mode 100644 app/views/student_work/_evaluation_student_work_title.html.erb
diff --git a/app/views/student_work/_eavluation_student_work.html.erb b/app/views/student_work/_evaluation_student_work.html.erb
similarity index 68%
rename from app/views/student_work/_eavluation_student_work.html.erb
rename to app/views/student_work/_evaluation_student_work.html.erb
index c555b36a9..0f66452c7 100644
--- a/app/views/student_work/_eavluation_student_work.html.erb
+++ b/app/views/student_work/_evaluation_student_work.html.erb
@@ -42,29 +42,16 @@
<%= score.nil? ? "--" : format("%.1f",score)%>
<% unless score.nil?%>
- <% if @homework.homework_type == 1%>
-
-
- 作品最终评分为
- <%= student_work.final_score%> 分。
- 迟交扣分
- <%= student_work.late_penalty%> 分,
- 缺评扣分
- <%= student_work.absence_penalty%> 分,
- 最终成绩为
- <%= format("%.1f",score)%> 分。
-
- <% else%>
-
-
- 作品最终评分为
- <%= student_work.final_score%> 分。
- 迟交扣分
- <%= student_work.late_penalty%> 分,
- 最终成绩为
- <%= format("%.1f",score)%> 分。
-
- <% end%>
+
+ 作品最终评分为
+ <%= student_work.final_score%> 分。
+ 迟交扣分
+ <%= student_work.late_penalty%> 分,
+ 缺评扣分
+ <%= student_work.absence_penalty%> 分,
+ 最终成绩为
+ <%= format("%.1f",score)%> 分。
+
<% end%>
diff --git a/app/views/student_work/_evaluation_student_work_title.html.erb b/app/views/student_work/_evaluation_student_work_title.html.erb
new file mode 100644
index 000000000..0e4151065
--- /dev/null
+++ b/app/views/student_work/_evaluation_student_work_title.html.erb
@@ -0,0 +1,43 @@
+
+ 学号
+
+
+ <%= link_to "姓名",@show_all ? student_work_index_path(:homework => @homework.id,:order => "name", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
+ <% if @show_all && @order == "name"%>
+
+ <% end%>
+
+
+ 作品名称
+
+
+ <%= link_to "时间",@show_all ? student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
+ <% if @show_all && @order == "created_at"%>
+ <%= link_to "",student_work_index_path(:homework => @homework.id,:order => "created_at", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
+ <% end%>
+
+
+ <%= link_to "教师",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
+ <% if @show_all && @order == "teacher_score"%>
+ <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teacher_score", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
+ <% end%>
+
+
+ <%= link_to "教辅",@show_all ? student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
+ <% if @show_all && @order == "teaching_asistant_score"%>
+ <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "teaching_asistant_score", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
+
+ <% end%>
+
+
+ <%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
+ <% if @show_all && @order == "student_score"%>
+ <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
+ <% end%>
+
+
+ <%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
+ <% if @show_all && @order == "score"%>
+ <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
+ <% end%>
+
\ No newline at end of file
diff --git a/app/views/student_work/_student_work.html.erb b/app/views/student_work/_student_work.html.erb
index c555b36a9..dd7ab7e2d 100644
--- a/app/views/student_work/_student_work.html.erb
+++ b/app/views/student_work/_student_work.html.erb
@@ -8,7 +8,7 @@
<%= link_to student_work.user.show_name,user_path(student_work.user),:title => student_work.user.show_name, :class => "c_blue02"%>
-
+
<%= link_to student_work.name, student_work_path(student_work),:remote => true,:title => student_work.name, :class => "c_blue02"%>
@@ -24,47 +24,19 @@
<%= student_work.teaching_asistant_score.nil? ? "--" : format("%.1f",student_work.teaching_asistant_score)%>
-
- <%= student_work.student_score.nil? ? "--" : format("%.1f",student_work.student_score)%>
- <% unless student_work.student_score.nil?%>
-
- (<%= student_work.student_works_scores.where(:reviewer_role => 3).count%>)
-
-
- 现共有
- <%= student_work.student_works_scores.where(:reviewer_role => 3).count%>
- 名学生进行了匿评,平均分为
- <%= format("%.1f",student_work.student_score)%> 分。
-
- <% end%>
-
<% score = student_work.respond_to?("score") ? student_work.score : student_work.final_score - student_work.absence_penalty - student_work.late_penalty%>
-
+
<%= score.nil? ? "--" : format("%.1f",score)%>
<% unless score.nil?%>
- <% if @homework.homework_type == 1%>
-
-
- 作品最终评分为
- <%= student_work.final_score%> 分。
- 迟交扣分
- <%= student_work.late_penalty%> 分,
- 缺评扣分
- <%= student_work.absence_penalty%> 分,
- 最终成绩为
- <%= format("%.1f",score)%> 分。
-
- <% else%>
-
-
- 作品最终评分为
- <%= student_work.final_score%> 分。
- 迟交扣分
- <%= student_work.late_penalty%> 分,
- 最终成绩为
- <%= format("%.1f",score)%> 分。
-
- <% end%>
+
+
+ 作品最终评分为
+ <%= student_work.final_score%> 分。
+ 迟交扣分
+ <%= student_work.late_penalty%> 分,
+ 最终成绩为
+ <%= format("%.1f",score)%> 分。
+
<% end%>
diff --git a/app/views/student_work/_student_work_title.html.erb b/app/views/student_work/_student_work_title.html.erb
index 0e4151065..c46f7dc79 100644
--- a/app/views/student_work/_student_work_title.html.erb
+++ b/app/views/student_work/_student_work_title.html.erb
@@ -7,7 +7,7 @@
<% end%>
-
+
作品名称
@@ -29,12 +29,6 @@
<% end%>
-
- <%= link_to "匿评",@show_all ? student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
- <% if @show_all && @order == "student_score"%>
- <%= link_to "", student_work_index_path(:homework => @homework.id,:order => "student_score", :sort => @score, :name => @name) ,:class => @score == 'desc' ? 'st_up' : 'st_down'%>
- <% end%>
-
<%= link_to "成绩",@show_all ? student_work_index_path(:homework => @homework.id,:order => "score", :sort => @score, :name => @name) : "javascript:void(0)",:class => "f14 f_b c_dark fl"%>
<% if @show_all && @order == "score"%>
diff --git a/app/views/student_work/index.html.erb b/app/views/student_work/index.html.erb
index 7bac9f97b..6c0844fd7 100644
--- a/app/views/student_work/index.html.erb
+++ b/app/views/student_work/index.html.erb
@@ -77,29 +77,38 @@
<% end%>
-
- <% if @is_evaluation.nil?%>
- <%= render :partial => 'student_work_title'%>
- <% else%>
- <%= render :partial => 'evaluation_work_title'%>
- <% end%>
-
- <% @stundet_works.each do |student_work|%>
- <% if @is_evaluation%>
+ <% if @is_evaluation%>
+
+ <%= render :partial => 'evaluation_work_title'%>
+
+
+ <% @stundet_works.each do |student_work|%>
<%= render :partial => "evaluation_work",:locals => {:student_work => student_work}%>
- <% else %>
- <% if @homework.homework_type == 1%>
- <%= render :partial => "eavluation_student_work",:locals => {:student_work => student_work}%>
- <% else%>
+
+ <% end%>
+ <% else %>
+ <% if @homework.homework_type == 1%>
+
+ <%= render :partial => 'evaluation_student_work_title'%>
+
+
+ <% @stundet_works.each do |student_work|%>
+ <%= render :partial => "evaluation_student_work",:locals => {:student_work => student_work}%>
+
+ <% end%>
+ <% else%>
+
+ <%= render :partial => 'student_work_title'%>
+
+
+ <% @stundet_works.each do |student_work|%>
<%= render :partial => "student_work",:locals => {:student_work => student_work}%>
+
<% end%>
<% end%>
-
-
<% end%>
-
diff --git a/public/stylesheets/courses.css b/public/stylesheets/courses.css
index 651436ec4..41514ab12 100644
--- a/public/stylesheets/courses.css
+++ b/public/stylesheets/courses.css
@@ -626,6 +626,8 @@ a:hover.icon_add{background:url(images/icons.png) -20px -310px no-repeat;}
.hwork_tit{ width:210px; float:left; }
.hwork_tit a{ width:205px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
+.hwork_tit_une{ width:270px; float:left; }
+.hwork_tit_une a{ width:265px; display:block; overflow:hidden; white-space: nowrap; text-overflow:ellipsis; }
.hwork_code{ width:56px; text-align:center; }
.hwork_code02{ width:60px; text-align:center; }
.hwork_tit_e{ width:420px; float:left; }
diff --git a/public/stylesheets/public.css b/public/stylesheets/public.css
index e015fbe57..27792347a 100644
--- a/public/stylesheets/public.css
+++ b/public/stylesheets/public.css
@@ -98,6 +98,8 @@ h4{ font-size:14px; color:#3b3b3b;}
.w210{ width:210px;}
.w150{ width:150px;}
.w280{ width:280px;}
+.w265{ width: 265px;}
+.w270{ width: 270px;}
.w430{ width:470px;}
.w520{ width:520px;}
.w543{ width:543px;}