Skip to content

Commit

Permalink
lock the description if the discussion is locked
Browse files Browse the repository at this point in the history
fixes CNVS-25382

this hides the description of the discussion if the discussion is
currently locked for the user. before while they saw the locked message
it also showed the description, now it doesn't.

Test Plan:
1. Create a discussion with an amazing description.
2. Lock said discussion.
3. Go to the discussion as a student.
4. Don't see the description of the discussion.

Change-Id: Iee3240a379264fde483c23cc0abc2efa877b5a14
Reviewed-on: https://gerrit.instructure.com/69476
Tested-by: Jenkins
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
  • Loading branch information
Eric authored and maneframe committed Mar 18, 2016
1 parent fef7ff0 commit aa0c0c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/discussion_topics/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@
</header>

<div class="discussion-section message_wrapper">
<div data-bind="message" class="message user_content"><%= user_content(@topic.message) %></div>
<div data-bind="message" class="message user_content"><%= user_content(@topic.message) unless @locked %></div>
<% if @unlock_at && @unlock_at > Time.now && @topic.is_a?(Announcement) %>
<div class="discussion-fyi">
<%= t 'announcement_locked', 'The content of this announcement will not be visible to users until %{date}', :date => datetime_string(@unlock_at) %>
Expand Down
2 changes: 1 addition & 1 deletion spec/integration/context_module_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def progression_testing(progress_by_item_link)
get @test_url
expect(response).to be_success
html = Nokogiri::HTML(response.body)
expect(html.css('#test_content').length).to eq(@test_content_length || 0)
expect(html.css('#test_content').length).to eq(0)

# complete first module's requirements
p1 = @mod1.evaluate_for(@student)
Expand Down

0 comments on commit aa0c0c9

Please sign in to comment.