+
+
+
+ <%= image_tag(url_to_avatar(homework.user), :class => "avatar")%> |
+
+
+
+
+ <%= link_to (is_teacher ? homework.user.realname : homework.user ), user_path(homework.user)%>
+
+ |
+
+
+
+ <% if (users_for_homework(homework).include?(User.current) || is_teacher) %>
+ <%= link_to l(:button_edit), edit_homework_attach_path(homework) %>
+ <% if homework.user == User.current || is_teacher %>
+ <%= link_to(l(:label_bid_respond_delete), homework,
+ method: :delete, :confirm => l(:text_are_you_sure)) %>
+ <% end %>
+ <% end %>
+ |
+
+
+
+ |
+
+
- 作业 :
+ 作业名称:
<% if homework.name == nil || homework.name == "" %>
- <% attachments = homework.attachments.map %>
- <% for attachment in attachments %>
- <% if attachments.count > 1 %>
- <% homework_filename = attachment.filename + "等" + attachments.count.to_s + "个文件" %>
- <% else %>
- <% homework_filename = attachment.filename %>
- <% end %>
- <% end %>
+ <% homework_filename = homework.user.name + "提交的作业" %>
<% else %>
<% homework_filename = homework.name %>
<% end %>
- <% if is_evaluation || is_teacher%>
- <%= link_to homework_filename, :controller => "zipdown", :action => "download_user_homework",:homework => homework%>
- <% else %>
- <%= homework_filename %>
- <% end %>
+ <%= link_to homework_filename , homework_attach_path(homework)%>
|
-
- <% if is_student %>
- <% if is_evaluation %>
- <%= link_to "互评>>" , homework_attach_path(homework)%>
- <% else %>
- <%= link_to "查看详细" , homework_attach_path(homework)%>
- <% end %>
- <% else %>
- <% if is_teacher %>
- <%= link_to "综评>>" , homework_attach_path(homework)%>
- <% end %>
+ |
+ 参与人员:
+ <% homework_users = "" %>
+ <% homework.users.each do |user| %>
+ <% homework_users = user.name %>
+ <% end %>
+ <% if homework.users.count == 0 %>
+ 无
+ <% else %>
+ <%= homework_users %>
+ <% end %>
+ |
+
+ <% if Time.parse(@bid.deadline.to_s) < Time.parse(homework.created_at.to_s) %>
+ 迟交
<% end %>
|
-
-
- 发布人: <%= link_to ( is_teacher ? homework.user.realname : homework.user ), user_path(homework.user)%>
- |
-
- 作业评分:
- <%= format("%.2f", homework.rate_averages.first.try(:avg).to_f ) %>
- |
-
- <% if Time.parse(@bid.deadline.to_s) < Time.parse(homework.created_at.to_s) %>
- 迟交
- <% end %>
- |
-
+
+
+ 开发项目:
+ <% if homework.project != nil %>
+ <%= link_to homework.project.name,project_path(homework.project.id)%>
+ <% else %>
+ 该作业暂无项目
+ <% end %>
+ |
+
+ 项目得分:
+ <% if homework.project != nil %>
+ 0分
+ <% else %>
+ 0分
+ <% end %>
+ |
+
+
+
+
+ 提交文件:
+ <%= link_to "打包下载", :controller => "zipdown", :action => "download_user_homework",:homework => homework%>
+
+ |
+
+ 互评得分:
+ <%= format("%.2f", homework.rate_averages.first.try(:avg).to_f ) %>
+ <%= link_to "学生互评>>",homework_attach_path(homework) %>
+ |
+
+
-
- <% if User.current.member_of?(@bid.courses.first) %>
- <%= l(:label_bidding_user_studentcode) %> : <%= homework.user.student_id%>
- <% end %>
- |
+
+
+ |
- <% if (users_for_homework(homework).include?(User.current) || is_teacher) %>
- <%= link_to l(:button_edit), edit_homework_attach_path(homework) %>
- <% if homework.user == User.current || is_teacher %>
- <%= link_to(l(:label_bid_respond_delete), homework,
- method: :delete, :confirm => l(:text_are_you_sure)) %>
- <% end %>
- <% end %>
+ 综评得分:
+ <%= format("%.2f", homework.rate_averages.first.try(:avg).to_f ) %>
+ <%= link_to "教师评分>>",homework_attach_path(homework) %>
|
|