2.增加作业综评功能 3.其他课程的学生是不能互评的,只有本门课程的学生可以互评 4.修改添加评论方法 5.修复当作业无人评论时,作业最终得分只显示一个分字president
parent
12b1553a33
commit
27a30d44be
@ -0,0 +1,50 @@
|
||||
<% is_teacher = is_course_teacher User.current,homework.bid.courses.first %>
|
||||
<% if comprehensive_evaluation != nil && comprehensive_evaluation.count > 0 %>
|
||||
<% stars = homework.rates(:quality).where("rater_id = #{comprehensive_evaluation.first.user.id}").select("stars").first.stars * 2 * 10 %>
|
||||
<div style="height: 100px; padding-bottom: 10px">
|
||||
<div style="font-size: 15px">
|
||||
<strong>作业综评:</strong>
|
||||
<span class="user" style="font-size: 15px">
|
||||
<div data-kls="HomeworkAttach" data-id="2" data-dimension="quality" data-average="3.25" class="rateable div_inline jDisabled"
|
||||
style="height: 15px; width: 100px; overflow: hidden; z-index: 1; position: relative;">
|
||||
<div class="jRatingColor" style="width: <%=stars %>%;"></div>
|
||||
<div class="jRatingAverage" style="width: 0px; top: -20px;"></div>
|
||||
<div class="jStar" style="width: 115px; height: 20px; top: -40px;
|
||||
background: url('/images/seems_rateable/stars.png') repeat-x scroll 0% 0% transparent;">
|
||||
</div>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
<div style="font-size: 14px;">
|
||||
<div style="margin-left: 20px;margin-bottom: 10px;margin-top: 10px;"> <%= comprehensive_evaluation.first.notes%> </div>
|
||||
</div>
|
||||
<% if is_teacher %>
|
||||
<div style="text-align: center;">评分:
|
||||
<%= rating_for homework, dimension: :quality, class: 'rateable div_inline' %>
|
||||
<span style="font-size: 11px">(您可以重新打分,打分结果以最后一次打分为主!)</span>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
<% else %>
|
||||
<% if is_teacher %>
|
||||
<div style="height: 200px; padding-bottom: 10px">
|
||||
<div style="font-size: 15px">
|
||||
<strong>作业综评:</strong>
|
||||
</div>
|
||||
<div style="text-align: center;">评分:
|
||||
<%= rating_for homework, dimension: :quality, class: 'rateable div_inline' %>
|
||||
<span style="font-size: 11px">(您可以重新打分,打分结果以最后一次打分为主!)</span>
|
||||
</div>
|
||||
<div>
|
||||
<%= render :partial => 'addjour', :locals => {:homework_attach => homework, :sta => 0,:is_comprehensive_evaluation => 1} %>
|
||||
</div>
|
||||
</div>
|
||||
<% else %>
|
||||
<div style="height: 80px; padding-bottom: 10px">
|
||||
<div style="font-size: 15px">
|
||||
<strong>作业综评:</strong>
|
||||
</div>
|
||||
<div style="text-align: center;font-size: 15px;color: #15BCCC;vertical-align:middle;padding-top: 15px; "><strong>老师还未进行评价!</strong></div>
|
||||
</div>
|
||||
<% end %>
|
||||
<% end %>
|
@ -1,4 +1,9 @@
|
||||
$('#message').html('<%= escape_javascript(render(:partial => 'showjour', :locals => {:jour =>@jour, :state => false} )) %>');
|
||||
$('#pre_show').html('<%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>');
|
||||
$('#new_form_user_message').val("");
|
||||
$('#new_form_reference_user_id').val("");
|
||||
<% if @add_jour.is_comprehensive_evaluation == 1 %>
|
||||
$('#comprehensive_evaluation').html('<%= escape_javascript(render(:partial => 'comprehensive_evaluation',
|
||||
:locals => {:comprehensive_evaluation => @comprehensive_evaluation,:homework => @homework} )) %>');
|
||||
<% else %>
|
||||
$('#message').html('<%= escape_javascript(render(:partial => 'showjour', :locals => {:jour =>@jour, :state => false,:homework => @homework} )) %>');
|
||||
$('#pre_show').html('<%= escape_javascript(render(:partial => 'pre_show', :locals => {:content => nil})) %>');
|
||||
$('#new_form_user_message').val("");
|
||||
$('#new_form_reference_user_id').val("");
|
||||
<% end %>
|
@ -0,0 +1,5 @@
|
||||
class AddColoumToHomeworkJournalsForMessage < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :journals_for_messages, :is_comprehensive_evaluation, :integer
|
||||
end
|
||||
end
|
Loading…
Reference in new issue