fix upcoming_events on slave
Change-Id: I638038c1ab50af816ab28b66a79c2be2696a5079 Reviewed-on: https://gerrit.instructure.com/23743 Reviewed-by: Brian Palmer <brianp@instructure.com> Product-Review: Cody Cutrer <cody@instructure.com> QA-Review: Cody Cutrer <cody@instructure.com> Tested-by: Cody Cutrer <cody@instructure.com>
This commit is contained in:
parent
efb46dd0c6
commit
4550e79b19
|
@ -623,9 +623,9 @@ class UsersController < ApplicationController
|
|||
events = @upcoming_events.map do |e|
|
||||
event_json(e, @current_user, session)
|
||||
end
|
||||
end
|
||||
|
||||
render :json => events
|
||||
render :json => events
|
||||
end
|
||||
end
|
||||
|
||||
def ignore_item
|
||||
|
|
|
@ -523,7 +523,9 @@ class ContextModule < ActiveRecord::Base
|
|||
progression ||= self.find_or_create_progression_with_multiple_lookups(user)
|
||||
if self.unpublished?
|
||||
progression.workflow_state = 'locked'
|
||||
progression.save if progression.workflow_state_changed?
|
||||
Shackles.activate(:master) do
|
||||
progression.save if progression.workflow_state_changed?
|
||||
end
|
||||
return progression
|
||||
end
|
||||
requirements_met_changed = false
|
||||
|
@ -538,7 +540,9 @@ class ContextModule < ActiveRecord::Base
|
|||
if recursive_check || progression.new_record? || progression.updated_at < self.updated_at || User.module_progression_jobs_queued?(user.id)
|
||||
if self.completion_requirements.blank? && active_prerequisites.empty?
|
||||
progression.workflow_state = 'completed'
|
||||
progression.save
|
||||
Shackles.activate(:master) do
|
||||
progression.save
|
||||
end
|
||||
end
|
||||
progression.workflow_state = 'locked'
|
||||
if !self.to_be_unlocked
|
||||
|
@ -612,7 +616,9 @@ class ContextModule < ActiveRecord::Base
|
|||
end
|
||||
end
|
||||
progression.current_position = position
|
||||
progression.save if progression.workflow_state_changed? || requirements_met_changed
|
||||
Shackles.activate(:master) do
|
||||
progression.save if progression.workflow_state_changed? || requirements_met_changed
|
||||
end
|
||||
progression
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue