Add contains_content_type_gated_content attribute to display items in the Sequence Metadata API. This attribute is used to display the content type gating paywall in frontend-app-learning.
Also, refactor existing timed exam code that checks for content_type_gated_content in a sequence to make it try with the new code AA-613
This commit is contained in:
@@ -269,8 +269,8 @@ class IndexQueryTestCase(ModuleStoreTestCase):
|
||||
NUM_PROBLEMS = 20
|
||||
|
||||
@ddt.data(
|
||||
(ModuleStoreEnum.Type.mongo, 10, 171),
|
||||
(ModuleStoreEnum.Type.split, 4, 167),
|
||||
(ModuleStoreEnum.Type.mongo, 10, 174),
|
||||
(ModuleStoreEnum.Type.split, 4, 170),
|
||||
)
|
||||
@ddt.unpack
|
||||
def test_index_query_counts(self, store_type, expected_mongo_query_count, expected_mysql_query_count):
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
</div>
|
||||
% endif
|
||||
% endif
|
||||
% if not gated_sequence_fragment:
|
||||
% if not gated_sequence_paywall:
|
||||
<div class="sequence-nav">
|
||||
<button class="sequence-nav-button button-previous">
|
||||
<span class="icon fa fa-chevron-prev" aria-hidden="true"></span>
|
||||
@@ -103,11 +103,11 @@
|
||||
% if not exclude_units:
|
||||
% if gated_content['gated']:
|
||||
<%include file="_gated_content.html" args="prereq_url=gated_content['prereq_url'], prereq_section_name=gated_content['prereq_section_name'], gated_section_name=gated_content['gated_section_name']"/>
|
||||
% elif gated_sequence_fragment:
|
||||
% elif gated_sequence_paywall:
|
||||
<h2 class="hd hd-2 unit-title">
|
||||
${sequence_name}<span class="sr">${_("Content Locked")}</span>
|
||||
</h2>
|
||||
${gated_sequence_fragment | n, decode.utf8}
|
||||
${gated_sequence_paywall | n, decode.utf8}
|
||||
% else:
|
||||
<div class="sr-is-focusable" tabindex="-1"></div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user