commit
a69997f6c7
@ -1,5 +1,5 @@
|
||||
<% if is_praise_homework User.current.id,@work.id %>
|
||||
<%= link_to "赞(#{praise_homework_count @work.id})",praise_student_work_student_work_path(@work), :remote => true,:class => 'orange_btn', :style => 'font-size:12px;'%>
|
||||
<% if is_praise_homework User.current.id,work.id %>
|
||||
<%= link_to "赞(#{praise_homework_count work.id})",praise_student_work_student_work_path(work), :remote => true,:class => 'orange_btn', :style => 'font-size:12px;'%>
|
||||
<% else %>
|
||||
<%= link_to "赞(#{praise_homework_count @work.id})","javascript:void(0)",:class => 'grey_btn', :style => 'font-size:12px;'%>
|
||||
<%= link_to "赞(#{praise_homework_count work.id})","javascript:void(0)",:class => 'grey_btn', :style => 'font-size:12px;'%>
|
||||
<% end %>
|
@ -1 +1 @@
|
||||
$('#student_work_praise_<%= @work.id%>').html('<%= escape_javascript(render :partial => 'student_work/student_work_praise')%>');
|
||||
$('#student_work_praise_<%= @work.id%>').html('<%= escape_javascript(render :partial => 'student_work/student_work_praise', :locals => {:work => @work})%>');
|
@ -0,0 +1,17 @@
|
||||
class UpdateOneStudentTeacherScore < ActiveRecord::Migration
|
||||
def up
|
||||
work = StudentWork.find 49774
|
||||
score = StudentWorksScore.new
|
||||
score.score = 100
|
||||
score.user_id = 7318
|
||||
score.student_work_id = work.id
|
||||
score.reviewer_role = 1
|
||||
if score.save
|
||||
work.teacher_score = score.score
|
||||
end
|
||||
work.save
|
||||
end
|
||||
|
||||
def down
|
||||
end
|
||||
end
|
Loading…
Reference in new issue