Conditionalize track selection based on settings of course duration and content gating

This commit is contained in:
Bill Filler
2018-12-18 16:30:15 -05:00
committed by Gabe Mulley
parent b35cf731a1
commit c253374372
7 changed files with 83 additions and 54 deletions

View File

@@ -86,7 +86,7 @@ from openedx.core.djangolib.markup import HTML, Text
<div class="wrapper-copy">
<span class="deco-ribbon"></span>
% if has_credit_upsell:
% if content_gating_enabled:
% if content_gating_enabled or course_duration_limit_enabled:
<h4 class="title">${_("Pursue Academic Credit with the Verified Track")}</h4>
% else:
<h4 class="title">${_("Pursue Academic Credit with a Verified Certificate")}</h4>
@@ -97,12 +97,16 @@ from openedx.core.djangolib.markup import HTML, Text
<p>
<div class="wrapper-copy-inline">
<div class="copy-inline">
% if content_gating_enabled:
% if content_gating_enabled or course_duration_limit_enabled:
<h4>${_("Benefits of the Verified Track")}</h4>
<ul>
<li>${Text(_("{b_start}Eligible for credit:{b_end} Receive academic credit after successfully completing the course")).format(**b_tag_kwargs)}</li>
<li>${Text(_("{b_start}Unlimited Course Access: {b_end}Learn at your own pace, and access materials anytime to brush up on what you've learned.")).format(**b_tag_kwargs)}</li>
<li>${Text(_("{b_start}Graded Assignments: {b_end}Build your skills through graded assignments and projects.")).format(**b_tag_kwargs)}</li>
% if course_duration_limit_enabled:
<li>${Text(_("{b_start}Unlimited Course Access: {b_end}Learn at your own pace, and access materials anytime to brush up on what you've learned.")).format(**b_tag_kwargs)}</li>
% endif
% if content_gating_enabled:
<li>${Text(_("{b_start}Graded Assignments: {b_end}Build your skills through graded assignments and projects.")).format(**b_tag_kwargs)}</li>
% endif
<li>${Text(_("{b_start}Easily Sharable: {b_end}Add the certificate to your CV or resume, or post it directly on LinkedIn.")).format(**b_tag_kwargs)}</li>
</ul>
% else:
@@ -126,7 +130,7 @@ from openedx.core.djangolib.markup import HTML, Text
</p>
</div>
% else:
% if content_gating_enabled:
% if content_gating_enabled or course_duration_limit_enabled:
<h4 class="title">${_("Pursue the Verified Track")}</h4>
% else:
<h4 class="title">${_("Pursue a Verified Certificate")}</h4>
@@ -138,11 +142,15 @@ from openedx.core.djangolib.markup import HTML, Text
<p>
<div class="wrapper-copy-inline">
<div class="copy-inline">
% if content_gating_enabled:
% if content_gating_enabled or course_duration_limit_enabled:
<h4>${_("Benefits of the Verified Track")}</h4>
<ul>
<li>${Text(_("{b_start}Unlimited Course Access: {b_end}Learn at your own pace, and access materials anytime to brush up on what you've learned.")).format(**b_tag_kwargs)}</li>
<li>${Text(_("{b_start}Graded Assignments: {b_end}Build your skills through graded assignments and projects.")).format(**b_tag_kwargs)}</li>
% if course_duration_limit_enabled:
<li>${Text(_("{b_start}Unlimited Course Access: {b_end}Learn at your own pace, and access materials anytime to brush up on what you've learned.")).format(**b_tag_kwargs)}</li>
% endif
% if content_gating_enabled:
<li>${Text(_("{b_start}Graded Assignments: {b_end}Build your skills through graded assignments and projects.")).format(**b_tag_kwargs)}</li>
% endif
<li>${Text(_("{b_start}Easily Sharable: {b_end}Add the certificate to your CV or resume, or post it directly on LinkedIn.")).format(**b_tag_kwargs)}</li>
</ul>
% else:
@@ -158,7 +166,7 @@ from openedx.core.djangolib.markup import HTML, Text
<ul class="list-actions">
<li class="action action-select">
<input type="hidden" name="contribution" value="${min_price}" />
% if content_gating_enabled:
% if content_gating_enabled or course_duration_limit_enabled:
<input type="submit" name="verified_mode" value="${_('Pursue the Verified Track')} ($${min_price} USD)" />
% else:
<input type="submit" name="verified_mode" value="${_('Pursue a Verified Certificate')} ($${min_price} USD)" />
@@ -205,8 +213,12 @@ from openedx.core.djangolib.markup import HTML, Text
<h4 class="title">${_("Audit This Course (No Certificate)")}</h4>
<div class="copy">
## Translators: b_start notes the beginning of a section of text bolded for emphasis, and b_end marks the end of the bolded text.
% if content_gating_enabled:
% if content_gating_enabled and course_duration_limit_enabled:
<p>${Text(_("Audit this course for free and have access to course materials and discussions forums. {b_start}This track does not include graded assignments, or unlimited course access.{b_end}")).format(**b_tag_kwargs)}</p>
% elif content_gating_enabled and not course_duration_limit_enabled:
<p>${Text(_("Audit this course for free and have access to course materials and discussions forums. {b_start}This track does not include graded assignments.{b_end}")).format(**b_tag_kwargs)}</p>
% elif not content_gating_enabled and course_duration_limit_enabled:
<p>${Text(_("Audit this course for free and have access to course materials and discussions forums. {b_start}This track does not include unlimited course access.{b_end}")).format(**b_tag_kwargs)}</p>
% else:
<p>${Text(_("Audit this course for free and have complete access to all the course material, activities, tests, and forums. {b_start}Please note that this track does not offer a certificate for learners who earn a passing grade.{b_end}")).format(**b_tag_kwargs)}</p>
% endif