Increments cache key for modules page
Instructors were getting a cached copy of the modules page, but a new copy of context_modules.js. The new version of context_modules requires an id to be present as an element on the page. The cached copies of this page does not include an id attribute. The problem resolves itself anytime the cache is busted by modifying other aspects of the module. This forces the cache to bust for everyone so they get a new copy of the page. fixes CNVS-22413 Test Plan: - Load up an old course (you need to have an old cached copy of the page) - You should be able to add an item to a module without problems. Change-Id: I217e63b1587577db65120d51dfd777c705acddbc Reviewed-on: https://gerrit.instructure.com/60779 Reviewed-by: James Williams <jamesw@instructure.com> Tested-by: Jenkins QA-Review: Charles Kimball <ckimball@instructure.com> Product-Review: Clay Diffrient <cdiffrient@instructure.com>
This commit is contained in:
parent
c20d91d9cc
commit
5bc6569581
|
@ -20,7 +20,7 @@ module ContextModulesHelper
|
|||
def cache_if_module(context_module, editable, differentiated_assignments, user, context, &block)
|
||||
if context_module
|
||||
visible_assignments = (differentiated_assignments && user) ? user.assignment_and_quiz_visibilities(context) : []
|
||||
cache_key_items = ['context_module_render_11_', context_module.cache_key, editable, true, Time.zone]
|
||||
cache_key_items = ['context_module_render_12_', context_module.cache_key, editable, true, Time.zone]
|
||||
cache_key_items << Digest::MD5.hexdigest(visible_assignments.to_s) if differentiated_assignments
|
||||
cache_key = cache_key_items.join('/')
|
||||
cache_key = add_menu_tools_to_cache_key(cache_key)
|
||||
|
|
Loading…
Reference in New Issue