Merge branch 'develop_new' of http://git.trustie.net/jacknudt/trustieforge into develop_new

Conflicts:
	db/schema.rb
This commit is contained in:
huang 2016-04-05 11:25:25 +08:00
commit c408185b40
5 changed files with 29 additions and 4 deletions

View File

@ -29,6 +29,7 @@
<tbody> <tbody>
<%@count=@page*30 %> <%@count=@page*30 %>
<% for homework in @homework do %> <% for homework in @homework do %>
<% unless homework.nil? %>
<% @count+=1 %> <% @count+=1 %>
<tr> <tr>
<td align="center"> <td align="center">
@ -56,6 +57,7 @@
<%=format_date( homework.created_at ) %> <%=format_date( homework.created_at ) %>
</td> </td>
</tr> </tr>
<% end %>
<% end %> <% end %>
</tbody> </tbody>
</table> </table>

View File

@ -4,9 +4,9 @@
<p class="f14 mt5"> <p class="f14 mt5">
<span class="fb">作品名称:</span><%=@student_work.name%> <span class="fb">作品名称:</span><%=@student_work.name%>
</p> </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="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 class="cl"></div>
</div> </div>
<p class="mt5"> <p class="mt5">

View File

@ -4,9 +4,9 @@
<p class="f14 mt5"> <p class="f14 mt5">
<span class="fb">作品名称:</span><%=@student_work.name%> <span class="fb">作品名称:</span><%=@student_work.name%>
</p> </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="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 class="cl"></div>
</div> </div>
<p class="mt5"> <p class="mt5">

View File

@ -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

View File

@ -11,7 +11,11 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
<<<<<<< HEAD
ActiveRecord::Schema.define(:version => 20160331063938) do ActiveRecord::Schema.define(:version => 20160331063938) do
=======
ActiveRecord::Schema.define(:version => 20160405021915) do
>>>>>>> c3ee4dadfb92c75e8649cad7e0ed57c2ec02ec00
create_table "activities", :force => true do |t| create_table "activities", :force => true do |t|
t.integer "act_id", :null => false t.integer "act_id", :null => false