@@ -73,10 +101,88 @@
+
+
+ 迟交扣分:<%= activity.late_penalty%>分
+
+ <% if activity.anonymous_comment == 0%>
+
+ 匿评开启时间:<%= activity.homework_detail_manual.evaluation_start%> 00:00
+
+ <% end %>
+
+
+
+
+ 缺评扣分:<%= activity.homework_detail_manual.absence_penalty%>分/作品
+
+ <% if activity.anonymous_comment == 0%>
+
+ 匿评关闭时间:<%= activity.homework_detail_manual.evaluation_end%> 23:59
+
+ <% end %>
+
+
+ <% if activity.student_works.count != 0 %>
+ <% sw = activity.student_works.reorder("created_at desc").first %>
+
+ <%=time_from_now sw.created_at %><%= link_to sw.user.show_name, user_activities_path(sw.user_id), :class => "newsBlue ml5 mr5"%>提交了作品
+
+ <% end %>
+
+ <% if activity.student_works.count != 0 %>
+ <% sw_id = "("+activity.student_works.map{|sw| sw.id}.join(",")+")" %>
+ <% student_work_scores = StudentWorksScore.where("student_work_id in #{sw_id}").reorder("created_at desc") %>
+ <% unless student_work_scores.empty? %>
+ <% last_score = student_work_scores.first %>
+
+ <%=time_from_now last_score.created_at %><%= link_to last_score.user.show_name, user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品
+
+ <% end %>
+ <% end %>
+
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => activity.attachments} %>
+ <% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
+
+ <% projects = activity.student_work_projects.where("is_leader = 1") %>
+
+ 已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
+
+ <% projects.each do |pro| %>
+ <% project = Project.find pro.project_id %>
+
+
+
+ <% if project.is_public || User.current.member_of?(project) || User.current.admin? %>
+ <%= link_to image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius"),project_path(project.id,:host=>Setting.host_name),:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像" %>
+ <% else %>
+ <%= image_tag(url_to_avatar(project),:width=>"40",:height => "40",:class => "borderRadius",:id=>"project_img_"+project.id.to_s+"_"+activity.id.to_s,:alt =>"项目头像") %>
+ <% end %>
+ <% time=project.updated_on %>
+ <% time=ForgeActivity.where("project_id=?",project.id).last.updated_at if ForgeActivity.where("project_id=?",project.id).last %>
+
<%=(User.find project.user_id).show_name %>(组长)
+
<%=time_from_now time %>
+
+ 项目名称:<%=project.name %>
+ 创建者:<%=(User.find project.user_id).show_name %>(组长)
+ 更新时间:<%=time_from_now time %>
+
+
+ <% end %>
+
+ <% end %>
+
<% if is_teacher%>
<% comment_status = activity.homework_detail_manual.comment_status %>
diff --git a/app/views/users/_course_homework.html.erb b/app/views/users/_course_homework.html.erb
index a0ce84795..cd1ffd7ae 100644
--- a/app/views/users/_course_homework.html.erb
+++ b/app/views/users/_course_homework.html.erb
@@ -124,6 +124,24 @@
<% end %>
+ <% if activity.student_works.count != 0 %>
+ <% sw = activity.student_works.reorder("created_at desc").first %>
+
+ <%=time_from_now sw.created_at %><%= link_to sw.user.show_name, user_activities_path(sw.user_id), :class => "newsBlue ml5 mr5"%>提交了作品
+
+ <% end %>
+
+ <% if activity.student_works.count != 0 %>
+ <% sw_id = "("+activity.student_works.map{|sw| sw.id}.join(",")+")" %>
+ <% student_work_scores = StudentWorksScore.where("student_work_id in #{sw_id}").reorder("created_at desc") %>
+ <% unless student_work_scores.empty? %>
+ <% last_score = student_work_scores.first %>
+
+ <%=time_from_now last_score.created_at %><%= link_to last_score.user.show_name, user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品
+
+ <% end %>
+ <% end %>
+
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => activity.attachments} %>
@@ -131,7 +149,7 @@
<% if activity.homework_type == 3 && activity.homework_detail_group.base_on_project == 1 %>
<% projects = activity.student_work_projects.where("is_leader = 1") %>
-
+
已关联项目:<%='各小组尚未将小组项目关联到本次作业。' if projects.empty? %>
<% projects.each do |pro| %>
diff --git a/app/views/users/_user_homework_detail.html.erb b/app/views/users/_user_homework_detail.html.erb
index 0472613e4..7a91827a6 100644
--- a/app/views/users/_user_homework_detail.html.erb
+++ b/app/views/users/_user_homework_detail.html.erb
@@ -127,6 +127,24 @@
<% end %>
+ <% if homework_common.student_works.count != 0 %>
+ <% sw = homework_common.student_works.reorder("created_at desc").first %>
+
+ <%=time_from_now sw.created_at %><%= link_to sw.user.show_name, user_activities_path(sw.user_id), :class => "newsBlue ml5 mr5"%>提交了作品
+
+ <% end %>
+
+ <% if homework_common.student_works.count != 0 %>
+ <% sw_id = "("+homework_common.student_works.map{|sw| sw.id}.join(",")+")" %>
+ <% student_work_scores = StudentWorksScore.where("student_work_id in #{sw_id}").reorder("created_at desc") %>
+ <% unless student_work_scores.empty? %>
+ <% last_score = student_work_scores.first %>
+
+ <%=time_from_now last_score.created_at %><%= link_to last_score.user.show_name, user_activities_path(last_score.user_id), :class => "newsBlue ml5 mr5"%>评阅了作品
+
+ <% end %>
+ <% end %>
+
<%= render :partial => 'student_work/work_attachments', :locals => {:attachments => homework_common.attachments} %>
diff --git a/public/stylesheets/org.css b/public/stylesheets/org.css
index b37a38da0..2279f0fe5 100644
--- a/public/stylesheets/org.css
+++ b/public/stylesheets/org.css
@@ -103,4 +103,8 @@ ul.wlist{ float:right; border-bottom:none; height:30px; margin-top:20px; }
.sectionContent span {width:175px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; display:inline-block; height:18px; vertical-align:middle;}.popbox_polls{width:300px;height:100px;position:fixed !important;z-index:100;left:50%;top:50%;margin:-100px 0 0 -150px;
background:#fff; -moz-border-radius:5px; -webkit-border-radius:5px; border-radius:5px; box-shadow:0px 0px 8px #194a81; overflow:auto;}
.org_login_list a {color:#269ac9;}
-div.flash {margin-top :0px !important}
\ No newline at end of file
+div.flash {margin-top :0px !important}
+
+.w80{ width:80px;}
+.relatePInfo {text-align: left; position:absolute; background-color:#ffffff; padding:3px 8px; white-space:nowrap; box-shadow:0px 2px 8px rgba(146, 153, 169, 0.5); z-index:999; color:#585858; cursor:pointer; display:none;}
+.captainName {max-width:40px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; display: inline-block;}
\ No newline at end of file