Skip to content

Commit 2400c77

Browse files
committed
Fix code showing rather than score at least points in modules
closes CNVS-30768 Test Plan: - Go to /courses/x/modules - As a teacher create a module by clicking on +Module and enter a module name - Publish the module by clicking on the cloud icon - Click on + on module row and Add an assignment module item to the module - Edit the module by clicking on cog icon in the module row, Add requirement , score at least x for the assignment - You should not see code showing, but instead "Score at least X points" where X is the value of the points you used. Change-Id: I62ef34ea4a39dd1aa85a80504c87b3d5b33a0eb5 Reviewed-on: https://gerrit.instructure.com/86901 Reviewed-by: James Williams <jamesw@instructure.com> Tested-by: Jenkins QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com> Product-Review: Clay Diffrient <cdiffrient@instructure.com>
1 parent bf0dc3f commit 2400c77

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

app/helpers/context_modules_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module ContextModulesHelper
2020
def cache_if_module(context_module, editable, user, context, &block)
2121
if context_module
2222
visible_assignments = user ? user.assignment_and_quiz_visibilities(context) : []
23-
cache_key_items = ['context_module_render_16_', context_module.cache_key, editable, true, Time.zone, Digest::MD5.hexdigest(visible_assignments.to_s)]
23+
cache_key_items = ['context_module_render_17_', context_module.cache_key, editable, true, Time.zone, Digest::MD5.hexdigest(visible_assignments.to_s)]
2424
cache_key = cache_key_items.join('/')
2525
cache_key = add_menu_tools_to_cache_key(cache_key)
2626
cache(cache_key, nil, &block)

app/views/context_modules/_content_next.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ TEXT
6363
>
6464
<% editable = can_do(@context, @current_user, :manage_content) %>
6565
<% visible_assignments = @current_user.try(:assignment_and_quiz_visibilities, @context) %>
66-
<% cache_key_items = [@context.cache_key, editable, 'all_context_modules_draft_8', collection_cache_key(@modules), Time.zone, Digest::MD5.hexdigest(visible_assignments.to_s)] %>
66+
<% cache_key_items = [@context.cache_key, editable, 'all_context_modules_draft_9', collection_cache_key(@modules), Time.zone, Digest::MD5.hexdigest(visible_assignments.to_s)] %>
6767
<% cache_key = cache_key_items.join('/') %>
6868
<% cache_key = add_menu_tools_to_cache_key(cache_key) %>
6969
<% cache(cache_key) do %>

app/views/context_modules/_module_item_next.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
<span class="requirement_type min_score_requirement">
8686
<% score_display = content_tag(:span, criterion && criterion[:min_score] || nbsp, class: 'min_score') %>
8787
<span class="unfulfilled">
88-
<%= t 'min_score.unfulfilled', 'Score at least %{score}, :score => score_display' %>
88+
<%= t 'min_score.unfulfilled', 'Score at least %{score}', :score => score_display %>
8989
<span class="screenreader-only"><%= t 'Must score at least %{score} to complete this module item', :score => score_display %></span>
9090
</span>
9191
<span class="fulfilled">

0 commit comments

Comments
 (0)