From 2f283c411b04531f5f94671103a80448cf0458e4 Mon Sep 17 00:00:00 2001 From: Matt Tuchfarber Date: Mon, 29 Oct 2018 16:35:54 -0400 Subject: [PATCH] Update course mode selection text for content gating --- common/djangoapps/course_modes/views.py | 2 + lms/templates/course_modes/choose.html | 68 +++++++++++++----- .../lms/templates/course_modes/choose.html | 70 ++++++++++++++----- 3 files changed, 108 insertions(+), 32 deletions(-) diff --git a/common/djangoapps/course_modes/views.py b/common/djangoapps/course_modes/views.py index 6d5fcc73cf..89dac8f5d9 100644 --- a/common/djangoapps/course_modes/views.py +++ b/common/djangoapps/course_modes/views.py @@ -30,6 +30,7 @@ from openedx.core.djangoapps.catalog.utils import get_currency_data from openedx.core.djangoapps.embargo import api as embargo_api from openedx.core.djangoapps.programs.utils import ProgramDataExtender, ProgramProgressMeter from openedx.core.djangoapps.waffle_utils import WaffleFlag, WaffleFlagNamespace +from openedx.features.course_duration_limits.config import CONTENT_TYPE_GATING_FLAG from student.models import CourseEnrollment from util.db import outer_atomic from xmodule.modulestore.django import modulestore @@ -185,6 +186,7 @@ class ChooseModeView(View): "error": error, "responsive": True, "nav_hidden": True, + "content_gating_enabled": CONTENT_TYPE_GATING_FLAG.is_enabled(), } context.update( get_experiment_user_metadata_context( diff --git a/lms/templates/course_modes/choose.html b/lms/templates/course_modes/choose.html index 9d0cafd9d7..068b89919b 100644 --- a/lms/templates/course_modes/choose.html +++ b/lms/templates/course_modes/choose.html @@ -86,19 +86,33 @@ from openedx.core.djangolib.markup import HTML, Text
% if has_credit_upsell: -

${_("Pursue Academic Credit with a Verified Certificate")}

+ % if content_gating_enabled: +

${_("Pursue Academic Credit with the Verified Track")}

+ % else: +

${_("Pursue Academic Credit with a Verified Certificate")}

+ % endif

${_("Become eligible for academic credit and highlight your new skills and knowledge with a verified certificate. Use this valuable credential to qualify for academic credit, advance your career, or strengthen your school applications.")}

-

${_("Benefits of a Verified Certificate")}

-
    -
  • ${Text(_("{b_start}Eligible for credit:{b_end} Receive academic credit after successfully completing the course")).format(**b_tag_kwargs)}
  • -
  • ${Text(_("{b_start}Official:{b_end} Receive an instructor-signed certificate with the institution's logo")).format(**b_tag_kwargs)}
  • -
  • ${Text(_("{b_start}Easily shareable:{b_end} Add the certificate to your CV or resume, or post it directly on LinkedIn")).format(**b_tag_kwargs)}
  • -
+ % if content_gating_enabled: +

${_("Benefits of the Verified Track")}

+
    +
  • ${Text(_("{b_start}Eligible for credit:{b_end} Receive academic credit after successfully completing the course")).format(**b_tag_kwargs)}
  • +
  • ${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)}
  • +
  • ${Text(_("{b_start}Graded Assignments: {b_end}Build your skills through graded assignments and projects.")).format(**b_tag_kwargs)}
  • +
  • ${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)}
  • +
+ % else: +

${_("Benefits of a Verified Certificate")}

+
    +
  • ${Text(_("{b_start}Eligible for credit:{b_end} Receive academic credit after successfully completing the course")).format(**b_tag_kwargs)}
  • +
  • ${Text(_("{b_start}Official:{b_end} Receive an instructor-signed certificate with the institution's logo")).format(**b_tag_kwargs)}
  • +
  • ${Text(_("{b_start}Easily shareable:{b_end} Add the certificate to your CV or resume, or post it directly on LinkedIn")).format(**b_tag_kwargs)}
  • +
+ % endif
    @@ -112,25 +126,43 @@ from openedx.core.djangolib.markup import HTML, Text

% else: -

${_("Pursue a Verified Certificate")}

+ % if content_gating_enabled: +

${_("Pursue the Verified Track")}

+ % else: +

${_("Pursue a Verified Certificate")}

+ % endif +

${_("Highlight your new knowledge and skills with a verified certificate. Use this valuable credential to improve your job prospects and advance your career, or highlight your certificate in school applications.")}

-

${_("Benefits of a Verified Certificate")}

-
    -
  • ${Text(_("{b_start}Official: {b_end}Receive an instructor-signed certificate with the institution's logo")).format(**b_tag_kwargs)}
  • -
  • ${Text(_("{b_start}Easily shareable: {b_end}Add the certificate to your CV or resume, or post it directly on LinkedIn")).format(**b_tag_kwargs)}
  • -
  • ${Text(_("{b_start}Motivating: {b_end}Give yourself an additional incentive to complete the course")).format(**b_tag_kwargs)}
  • -
+ % if content_gating_enabled: +

${_("Benefits of the Verified Track")}

+
    +
  • ${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)}
  • +
  • ${Text(_("{b_start}Graded Assignments: {b_end}Build your skills through graded assignments and projects.")).format(**b_tag_kwargs)}
  • +
  • ${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)}
  • +
+ % else: +

${_("Benefits of a Verified Certificate")}

+
    +
  • ${Text(_("{b_start}Official: {b_end}Receive an instructor-signed certificate with the institution's logo")).format(**b_tag_kwargs)}
  • +
  • ${Text(_("{b_start}Easily shareable: {b_end}Add the certificate to your CV or resume, or post it directly on LinkedIn")).format(**b_tag_kwargs)}
  • +
  • ${Text(_("{b_start}Motivating: {b_end}Give yourself an additional incentive to complete the course")).format(**b_tag_kwargs)}
  • +
+ % endif
  • - + % if content_gating_enabled: + + % else: + + % endif
@@ -173,7 +205,11 @@ from openedx.core.djangolib.markup import HTML, Text

${_("Audit This Course (No Certificate)")}

## Translators: b_start notes the beginning of a section of text bolded for emphasis, and b_end marks the end of the bolded text. -

${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)}

+ % if content_gating_enabled: +

${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)}

+ % else: +

${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)}

+ % endif
diff --git a/themes/edx.org/lms/templates/course_modes/choose.html b/themes/edx.org/lms/templates/course_modes/choose.html index 368f3b5db1..3b82606259 100644 --- a/themes/edx.org/lms/templates/course_modes/choose.html +++ b/themes/edx.org/lms/templates/course_modes/choose.html @@ -154,19 +154,34 @@ from openedx.features.portfolio_project import INCLUDE_PORTFOLIO_UPSELL_MODAL
% if has_credit_upsell: -

${_("Pursue Academic Credit with a Verified Certificate")}

+ % if content_gating_enabled: +

${_("Pursue Academic Credit with the Verified Track")}

+ % else: +

${_("Pursue Academic Credit with a Verified Certificate")}

+ % endif

${_("Become eligible for academic credit and highlight your new skills and knowledge with a verified certificate. Use this valuable credential to qualify for academic credit, advance your career, or strengthen your school applications.")}

-

${_("Benefits of a Verified Certificate")}

-
    -
  • ${Text(_("{b_start}Eligible for credit:{b_end} Receive academic credit after successfully completing the course")).format(**b_tag_kwargs)}
  • -
  • ${Text(_("{b_start}Official:{b_end} Receive an instructor-signed certificate with the institution's logo")).format(**b_tag_kwargs)}
  • -
  • ${Text(_("{b_start}Easily shareable:{b_end} Add the certificate to your CV or resume, or post it directly on LinkedIn")).format(**b_tag_kwargs)}
  • -
+ % if content_gating_enabled: +

${_("Benefits of the Verified Track")}

+
    +
  • ${Text(_("{b_start}Eligible for credit:{b_end} Receive academic credit after successfully completing the course")).format(**b_tag_kwargs)}
  • +
  • ${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)}
  • +
  • ${Text(_("{b_start}Graded Assignments: {b_end}Build your skills through graded assignments and projects.")).format(**b_tag_kwargs)}
  • +
  • ${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)}
  • +
  • ${Text(_("{b_start}Support our Mission: {b_end}EdX, a non-profit, relies on verified certificates to help fund affordable education to everyone globally.")).format(**b_tag_kwargs)}
  • +
+ % else: +

${_("Benefits of a Verified Certificate")}

+
    +
  • ${Text(_("{b_start}Eligible for credit:{b_end} Receive academic credit after successfully completing the course")).format(**b_tag_kwargs)}
  • +
  • ${Text(_("{b_start}Official:{b_end} Receive an instructor-signed certificate with the institution's logo")).format(**b_tag_kwargs)}
  • +
  • ${Text(_("{b_start}Easily shareable:{b_end} Add the certificate to your CV or resume, or post it directly on LinkedIn")).format(**b_tag_kwargs)}
  • +
+ % endif
    @@ -180,26 +195,45 @@ from openedx.features.portfolio_project import INCLUDE_PORTFOLIO_UPSELL_MODAL

% else: -

${_("Pursue a Verified Certificate")}

- + % if content_gating_enabled: +

${_("Pursue the Verified Track")}

+ % else: +

${_("Pursue a Verified Certificate")}

+ % endif

${_("Highlight your new knowledge and skills with a verified certificate. Use this valuable credential to improve your job prospects and advance your career, or highlight your certificate in school applications.")}

-

${_("Benefits of a Verified Certificate")}

+ % if content_gating_enabled: +

${_("Benefits of the Verified Track")}

+
    +
  • ${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)}
  • +
  • ${Text(_("{b_start}Graded Assignments: {b_end}Build your skills through graded assignments and projects.")).format(**b_tag_kwargs)}
  • +
  • ${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)}
  • +
  • ${Text(_("{b_start}Support our Mission: {b_end}EdX, a non-profit, relies on verified certificates to help fund affordable education to everyone globally.")).format(**b_tag_kwargs)}
  • +
+ % else: +

${_("Benefits of a Verified Certificate")}

+
    +
  • ${Text(_("{b_start}Official: {b_end}Receive an instructor-signed certificate with the institution's logo")).format(**b_tag_kwargs)}
  • +
  • ${Text(_("{b_start}Easily shareable: {b_end}Add the certificate to your CV or resume, or post it directly on LinkedIn")).format(**b_tag_kwargs)}
  • +
  • ${Text(_("{b_start}Motivating: {b_end}Give yourself an additional incentive to complete the course")).format(**b_tag_kwargs)}
  • +
  • ${Text(_("{b_start}Support our Mission: {b_end} EdX, a non-profit, relies on verified certificates to help fund free education for everyone globally")).format(**b_tag_kwargs)}
  • +
+ % endif
    -
  • ${Text(_("{b_start}Official: {b_end}Receive an instructor-signed certificate with the institution's logo")).format(**b_tag_kwargs)}
  • -
  • ${Text(_("{b_start}Easily shareable: {b_end}Add the certificate to your CV or resume, or post it directly on LinkedIn")).format(**b_tag_kwargs)}
  • -
  • ${Text(_("{b_start}Motivating: {b_end}Give yourself an additional incentive to complete the course")).format(**b_tag_kwargs)}
  • -
  • ${Text(_("{b_start}Support our Mission: {b_end} EdX, a non-profit, relies on verified certificates to help fund free education for everyone globally")).format(**b_tag_kwargs)}
  • - + % if content_gating_enabled: + + % else: + + % endif
@@ -281,7 +315,11 @@ from openedx.features.portfolio_project import INCLUDE_PORTFOLIO_UPSELL_MODAL

${_("Audit This Course (No Certificate)")}

## Translators: b_start notes the beginning of a section of text bolded for emphasis, and b_end marks the end of the bolded text. -

${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)}

+ % if content_gating_enabled: +

${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)}

+ % else: +

${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)}

+ % endif