Merge branch 'develop_new' of http://git.trustie.net/jacknudt/trustieforge into develop_new
Conflicts: db/schema.rb
This commit is contained in:
commit
c408185b40
|
@ -29,6 +29,7 @@
|
|||
<tbody>
|
||||
<%@count=@page*30 %>
|
||||
<% for homework in @homework do %>
|
||||
<% unless homework.nil? %>
|
||||
<% @count+=1 %>
|
||||
<tr>
|
||||
<td align="center">
|
||||
|
@ -56,6 +57,7 @@
|
|||
<%=format_date( homework.created_at ) %>
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
<p class="f14 mt5">
|
||||
<span class="fb">作品名称:</span><%=@student_work.name%>
|
||||
</p>
|
||||
<div class="f14 mt5" style="max-width: 425px; color:#808181">
|
||||
<div class="f14 mt5" style="max-width: 425px; color:#808181; max-height:300px; overflow: auto;">
|
||||
<div class="fb fl dis">作品描述:</div>
|
||||
<div class="upload_img fl" style="max-width: 350px;"><%=@student_work.description.html_safe %></div>
|
||||
<div class="upload_img fl" style="max-width: 330px;"><%=@student_work.description.html_safe %></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<p class="mt5">
|
||||
|
|
|
@ -4,9 +4,9 @@
|
|||
<p class="f14 mt5">
|
||||
<span class="fb">作品名称:</span><%=@student_work.name%>
|
||||
</p>
|
||||
<div class="f14 mt5" style="max-width: 425px; color:#808181">
|
||||
<div class="f14 mt5" style="max-width: 425px; color:#808181; max-height:300px; overflow: auto;">
|
||||
<div class="fb fl dis">作品描述:</div>
|
||||
<div class="upload_img fl" style="max-width: 350px;"><%=@student_work.description.html_safe %></div>
|
||||
<div class="upload_img fl" style="max-width: 330px;"><%=@student_work.description.html_safe %></div>
|
||||
<div class="cl"></div>
|
||||
</div>
|
||||
<p class="mt5">
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
class DeleteAnonymousWork < ActiveRecord::Migration
|
||||
def up
|
||||
student_works = StudentWork.where("homework_common_id = 2882").map{|work| work.id} unless StudentWork.where("homework_common_id = 2882").empty?
|
||||
student_work_ids = "(" + student_works.join(",") + ")"
|
||||
student_work_scores = StudentWorksScore.where("student_work_id in #{student_work_ids}")
|
||||
unless student_work_scores.empty?
|
||||
student_work_scores.each do |sscore|
|
||||
student_work = StudentWork.find sscore.student_work_id
|
||||
student_work.student_score = 0 unless student_work.nil?
|
||||
student_work.absence_penalty = 0
|
||||
sscore.destroy
|
||||
student_work.save
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
|
@ -11,7 +11,11 @@
|
|||
#
|
||||
# It's strongly recommended to check this file into your version control system.
|
||||
|
||||
<<<<<<< HEAD
|
||||
ActiveRecord::Schema.define(:version => 20160331063938) do
|
||||
=======
|
||||
ActiveRecord::Schema.define(:version => 20160405021915) do
|
||||
>>>>>>> c3ee4dadfb92c75e8649cad7e0ed57c2ec02ec00
|
||||
|
||||
create_table "activities", :force => true do |t|
|
||||
t.integer "act_id", :null => false
|
||||
|
|
Loading…
Reference in New Issue