lock the description if the discussion is locked

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>
This commit is contained in:
Eric 2015-12-28 20:39:38 -07:00 committed by James Williams
parent fef7ff0608
commit aa0c0c91c4
2 changed files with 2 additions and 2 deletions

View File

@ -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) %>

View File

@ -144,7 +144,7 @@ describe ContextModule do
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)