进入自己的作业不让评分
This commit is contained in:
parent
b506a961a1
commit
fced7dcb91
|
@ -96,13 +96,22 @@ module HomeworkAttachHelper
|
|||
if array.nil? || array.count == 0
|
||||
return "()"
|
||||
end
|
||||
array.each do |member|
|
||||
if member == array.last
|
||||
ary += member.id.to_s + ")"
|
||||
array.length.times do |i|
|
||||
if i == array.length - 1
|
||||
ary += array[i].id.to_s + ")"
|
||||
else
|
||||
ary += member.id.to_s + ","
|
||||
if !(array[i].nil? || array[i].id.nil? || array[i].id.to_s == "")
|
||||
ary += array[i].id.to_s + ","
|
||||
end
|
||||
end
|
||||
end
|
||||
#array.each do |member|
|
||||
# if member == array.last
|
||||
# ary += member.id.to_s + ")"
|
||||
# else
|
||||
# ary += member.id.to_s + ","
|
||||
# end
|
||||
#end
|
||||
ary
|
||||
end
|
||||
end
|
|
@ -49,12 +49,12 @@
|
|||
<% ids = 'project_respond_form_'+ journal.id.to_s%>
|
||||
<% if reply_allow %>
|
||||
<div id='<%= ids %>' class="respond-form">
|
||||
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal} %>
|
||||
<%= render :partial => 'words/new_respond', :locals => {:journal => journal, :m_reply_id => journal,:show_name => true} %>
|
||||
</div>
|
||||
<% end %>
|
||||
<div style="clear: both;"></div>
|
||||
<div>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => journal } %>
|
||||
<%= render :partial => "words/journal_reply", :locals => {:journal => journal, :show_name => true} %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cl"></div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<% if is_comprehensive_evaluation == 3 %>
|
||||
<% if is_comprehensive_evaluation == 3 || User.current == homework.user%>
|
||||
<%= l(:label_work_rating) %>:
|
||||
<%= render :partial => 'show_score', locals: {:stars => totle_score} %>
|
||||
<% elsif is_comprehensive_evaluation == 2 %>
|
||||
|
|
Loading…
Reference in New Issue