diff --git a/app/views/bids/_homework_list.html.erb b/app/views/bids/_homework_list.html.erb index c1de9629d..705040579 100644 --- a/app/views/bids/_homework_list.html.erb +++ b/app/views/bids/_homework_list.html.erb @@ -58,90 +58,93 @@ - - - - - + + + + + - - - - - - - - - + + + + + + + + - + <% if is_evaluation || is_teacher%> + <%= render :partial => 'app_link', :locals => {:attachments => homework.attachments} %> + <% end %> + +
- 作品名称:  - <% if homework.name == nil || homework.name == "" %> - <% homework_filename = homework.user.name + "提交的作业" %> - <% else %> - <% homework_filename = homework.name %> - <% end %> - - <%= link_to homework_filename , homework_attach_path(homework)%> - - - 合作成员:  - <% homework_users = homework_user_of_homework(homework,is_teacher) %> - <% if homework.users.count == 0 %> - 无 - <% else %> - <%= homework_users %> - <% end %> - - <% if Time.parse(@bid.deadline.to_s) < Time.parse(homework.created_at.to_s) %> - 迟交 - <% end %> -
+ 作品名称:  + <% if homework.name == nil || homework.name == "" %> + <% homework_filename = homework.user.name + "提交的作业" %> + <% else %> + <% homework_filename = homework.name %> + <% end %> + + <%= link_to homework_filename , homework_attach_path(homework)%> + + + 合作成员:  + <% homework_users = homework_user_of_homework(homework,is_teacher) %> + <% if homework.users.count == 0 %> + 无 + <% else %> + <%= homework_users %> + <% end %> + + <% 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 %> - <%= project_score homework.project %> - <% else %> - 0.00 - <% end %> - - -
- 提交文件:  - <% if is_evaluation || is_teacher%> - <%= link_to "打包下载", :controller => "zipdown", :action => "download_user_homework",:homework => homework%> - <% else %> - 未开启互评功能作业不允许下载 - <% end %> - - - 互评得分:  - <%= student_score_for_homework(homework) %>   - <% if is_evaluation && is_student && (!users_for_homework(homework).include? User.current)%> - <%= link_to "学生互评>>",homework_attach_path(homework) %> - <% end %> - -
+ 开发项目:  + <% if homework.project != nil %> + <%= link_to homework.project.name,project_path(homework.project.id)%> + <% else %> + 暂无 + <% end %> + + 项目得分:  + ;"> + <%= homework.project.nil? ? "N/A" : project_score(homework.project) %> + + +
+ 提交文件:  + <% if is_evaluation || is_teacher%> + <%= link_to "打包下载", :controller => "zipdown", :action => "download_user_homework",:homework => homework%> + <% else %> + 未开启互评功能作业不允许下载 + <% end %> + + + 互评得分:  + <% student_homework_score = student_score_for_homework(homework) %> + ;"> + <% score = student_homework_score == "0.00"? "N/A" : student_homework_score %> + <%= score %> +    + <% if is_evaluation && is_student && (!users_for_homework(homework).include? User.current)%> + <%= link_to "学生互评>>",homework_attach_path(homework) %> + <% end %> + +
- <% if is_evaluation || is_teacher%> - <%= render :partial => 'app_link', :locals => {:attachments => homework.attachments} %> - <% end %> - - 终评得分:  - <%= score_for_homework homework %>   - <% if is_teacher %> - <%= link_to "教师评分>>",homework_attach_path(homework) %> - <% end %> - - + 终评得分:  + <% totle_homework_score = score_for_homework(homework) %> + ;"> + <% score = totle_homework_score == "0.00"? "N/A" : totle_homework_score %> + <%= score %> +    + <% if is_teacher %> + <%= link_to "教师评分>>",homework_attach_path(homework) %> + <% end %> + +