作业动态设置评分后无法刷新
This commit is contained in:
parent
79a893d5c1
commit
a62ecc10ad
|
@ -262,6 +262,7 @@ class HomeworkCommonController < ApplicationController
|
||||||
@user_activity_id = -1
|
@user_activity_id = -1
|
||||||
end
|
end
|
||||||
@is_in_course = params[:is_in_course]
|
@is_in_course = params[:is_in_course]
|
||||||
|
@course_activity = params[:course_activity].to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -500,8 +500,9 @@ class StudentWorkController < ApplicationController
|
||||||
if params[:student_path]
|
if params[:student_path]
|
||||||
redirect_to student_work_index_url(:homework => @homework.id)
|
redirect_to student_work_index_url(:homework => @homework.id)
|
||||||
else
|
else
|
||||||
@user_activity_id = params[:user_activity_id]
|
@user_activity_id = params[:user_activity_id].to_i
|
||||||
@is_in_course = params[:is_in_course]
|
@is_in_course = params[:is_in_course].to_i
|
||||||
|
@course_activity = params[:course_activity].to_i
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
end
|
end
|
||||||
|
|
|
@ -104,6 +104,8 @@ class WordsController < ApplicationController
|
||||||
@user = User.find(@journal_destroyed.jour_id)
|
@user = User.find(@journal_destroyed.jour_id)
|
||||||
@jours_count = @user.journals_for_messages.where('m_parent_id IS NULL').count
|
@jours_count = @user.journals_for_messages.where('m_parent_id IS NULL').count
|
||||||
@is_user = true
|
@is_user = true
|
||||||
|
elsif @journal_destroyed.jour_ype == 'HomeworkCommon'
|
||||||
|
|
||||||
end
|
end
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.js
|
format.js
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/set_score_rule',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:is_in_course => @is_in_course,:remote=>true}) %>');
|
$('#ajax-modal').html('<%= escape_javascript(render :partial => 'student_work/set_score_rule',:locals => {:homework => @homework, :student_path => false, :user_activity_id => @user_activity_id,:is_in_course => @is_in_course,:course_activity =>@course_activity,:remote=>true}) %>');
|
||||||
showModal('ajax-modal', '350px');
|
showModal('ajax-modal', '350px');
|
||||||
$('#ajax-modal').siblings().remove();
|
$('#ajax-modal').siblings().remove();
|
||||||
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
$('#ajax-modal').before("<span style='float: right;cursor:pointer;'>" +
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<% render :partial => 'student_work/set_score_rule_detail', :locals => {:homework => homework, :f => f}%>
|
<% render :partial => 'student_work/set_score_rule_detail', :locals => {:homework => homework, :f => f}%>
|
||||||
<% end%>
|
<% end%>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= form_for('new_form',:url => {:controller => 'student_work',:action => 'set_score_rule',:homework => homework.id,:user_activity_id=>user_activity_id,:is_in_course=>is_in_course},:method => "post",:remote => true) do |f|%>
|
<%= form_for('new_form',:url => {:controller => 'student_work',:action => 'set_score_rule',:homework => homework.id,:user_activity_id=>user_activity_id,:is_in_course=>is_in_course,:course_activity=>course_activity},:method => "post",:remote => true) do |f|%>
|
||||||
<% render :partial => 'student_work/set_score_rule_detail', :locals => {:homework => homework, :f => f}%>
|
<% render :partial => 'student_work/set_score_rule_detail', :locals => {:homework => homework, :f => f}%>
|
||||||
<% end%>
|
<% end%>
|
||||||
<% end %>
|
<% end %>
|
|
@ -1,6 +1,6 @@
|
||||||
clickCanel();
|
clickCanel();
|
||||||
<% if @user_activity_id %>
|
<% if @user_activity_id %>
|
||||||
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id}) %>");
|
$("#user_activity_<%= @user_activity_id%>").replaceWith("<%= escape_javascript(render :partial => 'users/course_homework', :locals => {:activity => @homework,:user_activity_id =>@user_activity_id,:course_activity=>@courae_activity}) %>");
|
||||||
init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
|
init_activity_KindEditor_data(<%= @user_activity_id%>,"","87%");
|
||||||
<% else %>
|
<% else %>
|
||||||
$("#homework_common_<%= @homework.id %>").replaceWith("<%= escape_javascript(render :partial => 'users/user_homework_detail', :locals => {:homework_common => @homework,:is_in_course => @is_in_course}) %>");
|
$("#homework_common_<%= @homework.id %>").replaceWith("<%= escape_javascript(render :partial => 'users/user_homework_detail', :locals => {:homework_common => @homework,:is_in_course => @is_in_course}) %>");
|
||||||
|
|
|
@ -90,7 +90,7 @@
|
||||||
<%= link_to(l(:label_bid_respond_delete), homework_common_path(activity,:is_in_course => -1,:course_activity=>course_activity),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
|
<%= link_to(l(:label_bid_respond_delete), homework_common_path(activity,:is_in_course => -1,:course_activity=>course_activity),:method => 'delete', :confirm => l(:text_are_you_sure), :class => "postOptionLink") %>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<%= link_to("评分设置", score_rule_set_homework_common_path(activity,:user_activity_id => user_activity_id, :is_in_course => 0),:class => "postOptionLink", :remote => true) %>
|
<%= link_to("评分设置", score_rule_set_homework_common_path(activity,:user_activity_id => user_activity_id, :is_in_course => -1,:course_activity=>course_activity),:class => "postOptionLink", :remote => true) %>
|
||||||
</li>
|
</li>
|
||||||
<% if activity.anonymous_comment == 0 %>
|
<% if activity.anonymous_comment == 0 %>
|
||||||
<li>
|
<li>
|
||||||
|
|
Loading…
Reference in New Issue