% is_student = is_cur_course_student? @homework.bid.courses.first %>
<% is_teacher = is_course_teacher User.current,@homework.bid.courses.first %>
<%= notice %>
|
作业基础信息<%=@count %> |
发布人员:<%= link_to @homework.user, user_path(@homework.user)%>
|
发布时间:<%=format_time @homework.created_at %> |
作业下载:
<% options = {:author => true } %>
<%= render :partial => 'app_link', :locals => {:attachments => @homework.attachments, :options => options} %>
|
所属任务:<%= link_to(@homework.bid.name, project_for_bid_path(@homework.bid))%>
|
平均评分:
<%= rating_for @homework, :static => true, dimension: :quality, class: 'rateable div_inline' %>
|
|
|
作业描述: |
<% @homework.attachments.map do |attachment| %>
<% if attachment.description != nil && attachment.description != "" %>
<%= attachment.description %>
|
<% end %>
<% end %>
|
作业得分:
得分比例
<% 100.step(20,-20) do |star| %>
<%= @stars_status_map["star#{(star/20).to_s}".to_sym] %>
<% end %>
<% score = @homework.average(:quality).try(:avg).try(:round, 2).to_s %>
最终得分
<% if score == "" %>
0分
<% else %>
<%= score %>分
<% end %>
<%= rating_for @homework, :static => true, dimension: :quality, class: 'rateable div_inline' %>
打分总人数
<%= @homework.raters(:quality).count%>
<%= render :partial => 'comprehensive_evaluation', :locals => {:comprehensive_evaluation => @comprehensive_evaluation,:homework => @homework} %>
作业评论:
<% if is_student %>
评分:
<%= rating_for @homework, dimension: :quality, class: 'rateable div_inline' %>
(您可以重新打分,打分结果以最后一次打分为主!)
<% end %>
<% if !is_teacher %>
<%= render :partial => 'addjour', :locals => {:homework_attach => @homework, :sta => 0, :is_comprehensive_evaluation => nil} %>
<% end %>
<%= render :partial => 'showjour', :locals => {:jour => @jour,:homework => @homework} %>