Skip to content

Commit

Permalink
Fix code showing rather than score at least points in modules
Browse files Browse the repository at this point in the history
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  <[email protected]>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <[email protected]>
Product-Review: Clay Diffrient <[email protected]>
  • Loading branch information
claydiffrient committed Aug 4, 2016
1 parent bf0dc3f commit 2400c77
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/helpers/context_modules_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module ContextModulesHelper
def cache_if_module(context_module, editable, user, context, &block)
if context_module
visible_assignments = user ? user.assignment_and_quiz_visibilities(context) : []
cache_key_items = ['context_module_render_16_', context_module.cache_key, editable, true, Time.zone, Digest::MD5.hexdigest(visible_assignments.to_s)]
cache_key_items = ['context_module_render_17_', context_module.cache_key, editable, true, Time.zone, Digest::MD5.hexdigest(visible_assignments.to_s)]
cache_key = cache_key_items.join('/')
cache_key = add_menu_tools_to_cache_key(cache_key)
cache(cache_key, nil, &block)
Expand Down
2 changes: 1 addition & 1 deletion app/views/context_modules/_content_next.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ TEXT
>
<% editable = can_do(@context, @current_user, :manage_content) %>
<% visible_assignments = @current_user.try(:assignment_and_quiz_visibilities, @context) %>
<% 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)] %>
<% 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)] %>
<% cache_key = cache_key_items.join('/') %>
<% cache_key = add_menu_tools_to_cache_key(cache_key) %>
<% cache(cache_key) do %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/context_modules/_module_item_next.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
<span class="requirement_type min_score_requirement">
<% score_display = content_tag(:span, criterion && criterion[:min_score] || nbsp, class: 'min_score') %>
<span class="unfulfilled">
<%= t 'min_score.unfulfilled', 'Score at least %{score}, :score => score_display' %>
<%= t 'min_score.unfulfilled', 'Score at least %{score}', :score => score_display %>
<span class="screenreader-only"><%= t 'Must score at least %{score} to complete this module item', :score => score_display %></span>
</span>
<span class="fulfilled">
Expand Down

0 comments on commit 2400c77

Please sign in to comment.