diff --git a/cms/envs/common.py b/cms/envs/common.py
index 8d5b7b143ece..eb8858779e8d 100644
--- a/cms/envs/common.py
+++ b/cms/envs/common.py
@@ -436,7 +436,7 @@
'openedx.core.djangoapps.oauth_dispatch.dot_overrides.backends.EdxRateLimitedAllowAllUsersModelBackend',
]
-LMS_BASE = None
+LMS_BASE = "localhost:8000"
LMS_ROOT_URL = "http://localhost:8000"
LMS_INTERNAL_ROOT_URL = LMS_ROOT_URL
LMS_ENROLLMENT_API_PATH = "/api/enrollment/v1/"
diff --git a/cms/envs/production.py b/cms/envs/production.py
index 47852715fd2c..cfa5847bf749 100644
--- a/cms/envs/production.py
+++ b/cms/envs/production.py
@@ -139,7 +139,7 @@
EMAIL_PORT = ENV_TOKENS.get('EMAIL_PORT', EMAIL_PORT)
EMAIL_USE_TLS = ENV_TOKENS.get('EMAIL_USE_TLS', EMAIL_USE_TLS)
-LMS_BASE = ENV_TOKENS.get('LMS_BASE')
+LMS_BASE = ENV_TOKENS.get('LMS_BASE', LMS_BASE)
LMS_ROOT_URL = ENV_TOKENS.get('LMS_ROOT_URL')
LMS_INTERNAL_ROOT_URL = ENV_TOKENS.get('LMS_INTERNAL_ROOT_URL', LMS_ROOT_URL)
ENTERPRISE_API_URL = ENV_TOKENS.get('ENTERPRISE_API_URL', LMS_INTERNAL_ROOT_URL + '/enterprise/api/v1/')
diff --git a/common/djangoapps/student/tests/test_retirement.py b/common/djangoapps/student/tests/test_retirement.py
index e9b597625e63..83d5730243be 100644
--- a/common/djangoapps/student/tests/test_retirement.py
+++ b/common/djangoapps/student/tests/test_retirement.py
@@ -264,7 +264,9 @@ class TestRegisterRetiredUsername(TestCase):
# The returned message here varies depending on whether a ValidationError -or-
# an AccountValidationError occurs.
INVALID_ACCT_ERR_MSG = ('An account with the Public Username', 'already exists.')
- INVALID_ERR_MSG = ('It looks like', 'belongs to an existing account. Try again with a different username.')
+ INVALID_ERR_MSG = ('It looks like', 'belongs to an existing account. Please use a different public username. '
+ 'Your email address is still your unique identifier for your account.')
+
def setUp(self):
super(TestRegisterRetiredUsername, self).setUp()
diff --git a/common/lib/xmodule/xmodule/tests/test_video.py b/common/lib/xmodule/xmodule/tests/test_video.py
index 1addb314513f..5f3132952c23 100644
--- a/common/lib/xmodule/xmodule/tests/test_video.py
+++ b/common/lib/xmodule/xmodule/tests/test_video.py
@@ -23,6 +23,7 @@
from lxml import etree
from mock import ANY, Mock, patch, MagicMock
import ddt
+import httpretty
from django.conf import settings
from django.test import TestCase
@@ -62,29 +63,19 @@
'''
YOUTUBE_SUBTITLES = (
- "LILA FISHER: Hi, welcome to Edx. I'm Lila Fisher, an Edx fellow helping to put together these"
- " courses. As you know, our courses are entirely online. So before we start learning about the"
- " subjects that brought you here, let's learn about the tools that you will use to navigate through"
- " the course material. Let's start with what is on your screen right now. You are watching a video"
- " of me talking. You have several tools associated with these videos. Some of them are standard"
- " video buttons, like the play Pause Button on the bottom left. Like most video players, you can see"
- " how far you are into this particular video segment and how long the entire video segment is."
- " Something that you might not be used to is the speed option. While you are going through the"
- " videos, you can speed up or slow down the video player with these buttons. Go ahead and try that"
- " now. Make me talk faster and slower. If you ever get frustrated by the pace of speech, you can"
- " adjust it this way. Another great feature is the transcript on the side. This will follow along"
- " with everything that I am saying as I am saying it, so you can read along if you like. You can"
- " also click on any of the words, and you will notice that the video jumps to that word. The video"
- " slider at the bottom of the video will let you navigate through the video quickly. If you ever"
- " find the transcript distracting, you can toggle the captioning button in order to make it go away"
- " or reappear. Now that you know about the video player, I want to point out the sequence navigator."
- " Right now you're in a lecture sequence, which interweaves many videos and practice exercises. You"
- " can see how far you are in a particular sequence by observing which tab you're on. You can"
- " navigate directly to any video or exercise by clicking on the appropriate tab. You can also"
- " progress to the next element by pressing the Arrow button, or by clicking on the next tab. Try"
- " that now. The tutorial will continue in the next video."
+ "Sample trascript line 1. "
+ "Sample trascript line 2. "
+ "Sample trascript line 3."
)
+MOCKED_YOUTUBE_TRANSCRIPT_API_RESPONSE = '''
+
+ Sample trascript line 1.
+ Sample trascript line 2.
+ Sample trascript line 3.
+
+'''
+
ALL_LANGUAGES = (
[u"en", u"English"],
[u"eo", u"Esperanto"],
@@ -1038,6 +1029,7 @@ def test_video_with_no_subs_index_dictionary(self):
"content_type": "Video"
})
+ @httpretty.activate
def test_video_with_youtube_subs_index_dictionary(self):
"""
Test index dictionary of a video module with YouTube subtitles.
@@ -1057,6 +1049,13 @@ def test_video_with_youtube_subs_index_dictionary(self):
'''
yt_subs_id = 'OEoXaMPEzfM'
+ url = 'http://video.google.com/timedtext?lang=en&v={}'.format(yt_subs_id)
+ httpretty.register_uri(
+ method=httpretty.GET,
+ uri=url,
+ body=MOCKED_YOUTUBE_TRANSCRIPT_API_RESPONSE,
+ content_type='application/xml'
+ )
descriptor = instantiate_descriptor(data=xml_data_sub)
subs = download_youtube_subs(yt_subs_id, descriptor, settings)
save_subs_to_store(json.loads(subs), yt_subs_id, descriptor)
@@ -1068,6 +1067,7 @@ def test_video_with_youtube_subs_index_dictionary(self):
"content_type": "Video"
})
+ @httpretty.activate
def test_video_with_subs_and_transcript_index_dictionary(self):
"""
Test index dictionary of a video module with
@@ -1089,6 +1089,13 @@ def test_video_with_subs_and_transcript_index_dictionary(self):
'''
yt_subs_id = 'OEoXaMPEzfM'
+ url = 'http://video.google.com/timedtext?lang=en&v={}'.format(yt_subs_id)
+ httpretty.register_uri(
+ method=httpretty.GET,
+ uri=url,
+ body=MOCKED_YOUTUBE_TRANSCRIPT_API_RESPONSE,
+ content_type='application/xml'
+ )
descriptor = instantiate_descriptor(data=xml_data_sub_transcript)
subs = download_youtube_subs(yt_subs_id, descriptor, settings)
save_subs_to_store(json.loads(subs), yt_subs_id, descriptor)
diff --git a/common/lib/xmodule/xmodule/video_module/video_module.py b/common/lib/xmodule/xmodule/video_module/video_module.py
index 6e2dc44790f1..c354db76e830 100644
--- a/common/lib/xmodule/xmodule/video_module/video_module.py
+++ b/common/lib/xmodule/xmodule/video_module/video_module.py
@@ -48,7 +48,8 @@
VideoTranscriptsMixin,
clean_video_id,
subs_filename,
- get_transcript_for_video
+ get_transcript_for_video,
+ get_transcript
)
from .video_handlers import VideoStudentViewHandlers, VideoStudioViewHandlers
@@ -1040,6 +1041,13 @@ def _update_transcript_for_index(language=None):
if self.sub:
_update_transcript_for_index()
+ else:
+ try:
+ transcript = get_transcript(self, lang=self.transcript_language, output_format=Transcript.TXT)[0].replace("\n", " ")
+ transcript_index_name = "transcript_{}".format(self.transcript_language)
+ video_body.update({transcript_index_name: transcript})
+ except NotFoundError:
+ pass
# Check to see if there are transcripts in other languages besides default transcript
if self.transcripts:
diff --git a/lms/djangoapps/certificates/views/webview.py b/lms/djangoapps/certificates/views/webview.py
index a1481fcf178d..f54785861cc5 100644
--- a/lms/djangoapps/certificates/views/webview.py
+++ b/lms/djangoapps/certificates/views/webview.py
@@ -97,6 +97,8 @@ def _update_certificate_context(context, course, user_certificate, platform_name
# Populate dynamic output values using the course/certificate data loaded above
certificate_type = context.get('certificate_type')
+ lms_base = configuration_helpers.get_value("lms_base", settings.LMS_BASE)
+
# Override the defaults with any mode-specific static values
context['certificate_id_number'] = user_certificate.verify_uuid
context['certificate_verify_url'] = "{prefix}{uuid}{suffix}".format(
@@ -129,11 +131,22 @@ def _update_certificate_context(context, course, user_certificate, platform_name
platform_name=platform_name
)
+ # edx-417: this is used in SOA, replaces document_title there
+ context['document_title_1_a'] = _("UC San Diego").upper()
+ context['document_title_1_b'] = _("Online").upper()
+ context['document_title_2'] = _("Statement of Accomplishment").upper()
+
# Translators: This text fragment appears after the student's name (displayed in a large font) on the certificate
# screen. The text describes the accomplishment represented by the certificate information displayed to the user
- context['accomplishment_copy_description_full'] = _("successfully completed, received a passing grade, and was "
- "awarded this {platform_name} "
- "Statement of Accomplishment in ").format(platform_name=platform_name)
+ # edx-417
+ context['accomplishment_copy_description_full'] = _("has successfully completed an offering of")
+ context['accomplishment_disclaimer'] = _("A Statement of accomplishment acknowledges that a {platform_name} " +
+ "course offered on {lms_base} was completed with a score indicating mastery of material by a particular learner. " +
+ "A Statement of accomplishment is not a certificate. It does not convey any academic credit, grade or degree, " +
+ "or indicate enrollment at UC San Diego").format(
+ platform_name=platform_name,
+ lms_base=lms_base
+ ).upper()
certificate_type_description = get_certificate_description(user_certificate.mode, certificate_type, platform_name)
if certificate_type_description:
diff --git a/lms/envs/common.py b/lms/envs/common.py
index 4bdcf9b52e31..d4e0741af05e 100644
--- a/lms/envs/common.py
+++ b/lms/envs/common.py
@@ -58,6 +58,7 @@
ENABLE_JASMINE = False
+LMS_BASE = "localhost:8000"
LMS_ROOT_URL = "http://localhost:8000"
LMS_INTERNAL_ROOT_URL = LMS_ROOT_URL
LMS_ENROLLMENT_API_PATH = "/api/enrollment/v1/"
@@ -1620,6 +1621,7 @@ def _make_locale_paths(settings):
'style-certificates': {
'source_filenames': [
'certificates/css/main-ltr.css',
+ 'css/lms-main-v1.css',
'css/vendor/font-awesome.css',
],
'output_filename': 'css/certificates-style.css'
diff --git a/lms/envs/production.py b/lms/envs/production.py
index fb72e34ea146..ea6c51495a28 100644
--- a/lms/envs/production.py
+++ b/lms/envs/production.py
@@ -178,6 +178,7 @@
EDXMKTG_LOGGED_IN_COOKIE_NAME = ENV_TOKENS.get('EDXMKTG_LOGGED_IN_COOKIE_NAME', EDXMKTG_LOGGED_IN_COOKIE_NAME)
EDXMKTG_USER_INFO_COOKIE_NAME = ENV_TOKENS.get('EDXMKTG_USER_INFO_COOKIE_NAME', EDXMKTG_USER_INFO_COOKIE_NAME)
+LMS_BASE = ENV_TOKENS.get('LMS_BASE', LMS_BASE)
LMS_ROOT_URL = ENV_TOKENS.get('LMS_ROOT_URL')
LMS_INTERNAL_ROOT_URL = ENV_TOKENS.get('LMS_INTERNAL_ROOT_URL', LMS_ROOT_URL)
diff --git a/lms/envs/test.py b/lms/envs/test.py
index 8b5ea3705e9a..23d74182db9e 100644
--- a/lms/envs/test.py
+++ b/lms/envs/test.py
@@ -559,6 +559,7 @@
COMPREHENSIVE_THEME_LOCALE_PATHS = [REPO_ROOT / "themes/conf/locale", ]
LMS_ROOT_URL = "http://localhost:18000"
+LMS_BASE = "localhost:18000"
# TODO (felipemontoya): This key is only needed during lettuce tests.
# To be removed during https://openedx.atlassian.net/browse/DEPR-19
diff --git a/lms/static/js/student_account/views/LoginView.js b/lms/static/js/student_account/views/LoginView.js
index f5d7551c2cf2..4f91fcede225 100644
--- a/lms/static/js/student_account/views/LoginView.js
+++ b/lms/static/js/student_account/views/LoginView.js
@@ -231,12 +231,17 @@
},
renderAuthWarning: function() {
- var message = _.sprintf(
- gettext('You have successfully signed into %(currentProvider)s, but your %(currentProvider)s' +
- ' account does not have a linked %(platformName)s account. To link your accounts,' +
- ' sign in now using your %(platformName)s password.'),
- {currentProvider: this.currentProvider, platformName: this.platformName}
- );
+ var message = HtmlUtils.interpolateHtml(
+ gettext('{paragraphStart}You have successfully signed into {currentProvider}, but your {currentProvider} account does not have a linked {platformName} account.{paragraphEnd}' + // eslint-disable-line max-len
+ '{blankLine}{paragraphStart}If you already have a {platformName} account, please log in below to link it to your {currentProvider} account.{paragraphEnd}' + // eslint-disable-line max-len
+ '{blankLine}{paragraphStart}If you do not have a {platformName} account, please click the "Create a {platformName} Account" button.{paragraphEnd}'), { // eslint-disable-line max-len
+ currentProvider: this.currentProvider,
+ platformName: this.platformName,
+ paragraphStart: HtmlUtils.HTML('
'),
+ paragraphEnd: HtmlUtils.HTML('
'),
+ blankLine: HtmlUtils.HTML('
')
+ }
+ );
this.clearAuthWarning();
this.renderFormFeedback(this.formStatusTpl, {
diff --git a/openedx/core/djangoapps/user_api/accounts/__init__.py b/openedx/core/djangoapps/user_api/accounts/__init__.py
index d89a14600c10..3ff30b006796 100644
--- a/openedx/core/djangoapps/user_api/accounts/__init__.py
+++ b/openedx/core/djangoapps/user_api/accounts/__init__.py
@@ -52,7 +52,8 @@
)
USERNAME_CONFLICT_MSG = _(
u"It looks like {username} belongs to an existing account. "
- u"Try again with a different username."
+ u"Please use a different public username. "
+ u"Your email address is still your unique identifier for your account."
)
# Translators: This message is shown to users who enter a username/email/password
diff --git a/openedx/core/djangoapps/user_api/tests/test_views.py b/openedx/core/djangoapps/user_api/tests/test_views.py
index 60af5d22309d..7044f41ca564 100644
--- a/openedx/core/djangoapps/user_api/tests/test_views.py
+++ b/openedx/core/djangoapps/user_api/tests/test_views.py
@@ -914,7 +914,8 @@ def test_register_duplicate_retired_username_account_validation_error(self):
"username": [{
"user_message": (
"It looks like {} belongs to an existing account. "
- "Try again with a different username."
+ "Please use a different public username. "
+ "Your email address is still your unique identifier for your account."
).format(
self.USERNAME
)
@@ -2220,7 +2221,8 @@ def test_register_duplicate_username(self):
"username": [{
"user_message": (
"It looks like {} belongs to an existing account. "
- "Try again with a different username."
+ "Please use a different public username. "
+ "Your email address is still your unique identifier for your account."
).format(
self.USERNAME
)
@@ -2255,7 +2257,8 @@ def test_register_duplicate_username_and_email(self):
"username": [{
"user_message": (
"It looks like {} belongs to an existing account. "
- "Try again with a different username."
+ "Please use a different public username. "
+ "Your email address is still your unique identifier for your account."
).format(
self.USERNAME
)
diff --git a/openedx/features/ucsd_features/additional_registration_fields.py b/openedx/features/ucsd_features/additional_registration_fields.py
index 704b76238176..392bfcedd674 100644
--- a/openedx/features/ucsd_features/additional_registration_fields.py
+++ b/openedx/features/ucsd_features/additional_registration_fields.py
@@ -13,12 +13,34 @@ class AdditionalRegistrationFieldsForm(ModelForm):
"""
The fields on this form are derived from the AdditionalRegistrationFields model in models.py.
"""
- def __init__(self, *args, **kwargs):
- super(AdditionalRegistrationFieldsForm, self).__init__(*args, **kwargs)
class Meta(object):
model = AdditionalRegistrationFields
fields = ('gender_nb', 'ethnicity', 'age', 'education', 'howheard')
+ error_messages = {
+ 'gender_nb': {
+ 'required': 'Please select your Gender.',
+ },
+ 'ethnicity': {
+ 'required': 'Please select your Ethnicity.',
+ },
+ 'age': {
+ 'required': 'Please select your Age Group.',
+ },
+ 'education': {
+ 'required': 'Please select your Education Level.',
+ },
+ 'howheard': {
+ 'required': 'Please tell, how did you hear about us.'
+ },
+ }
+ help_texts = {
+ 'gender_nb': 'Select "Decline to State" if you prefer not to tell.',
+ 'ethnicity': 'The ethnic or social group you belong to.',
+ 'age': 'Select the range in which your current age falls.',
+ 'education': 'Your most recent educational qualification.',
+ 'howheard': 'From where did you learn about us?',
+ }
# Admin Customization
diff --git a/requirements/edx/base.txt b/requirements/edx/base.txt
index afccb1c2437b..97100db7e535 100644
--- a/requirements/edx/base.txt
+++ b/requirements/edx/base.txt
@@ -21,7 +21,8 @@ git+https://github.com/edx/django-rest-framework.git@1ceda7c086fddffd1c440cc8685
-e git+https://github.com/edx/DoneXBlock.git@01a14f3bd80ae47dd08cdbbe2f88f3eb88d00fba#egg=done-xblock
-e git+https://github.com/jazkarta/edx-jsme.git@690dbf75441fa91c7c4899df0b83d77f7deb5458#egg=edx-jsme
git+https://github.com/mitodl/edx-sga.git@3828ba9e413080a81b907a3381e5ffa05e063f81#egg=edx-sga==0.8.3
-git+https://github.com/edx/xblock-lti-consumer.git@v1.1.8#egg=lti_consumer-xblock==1.1.8
+git+https://github.com/edx/xblock-lti-consumer.git@v1.2.5#egg=lti_consumer-xblock==1.2.5
+git+https://github.com/appsembler/tahoe-lti.git@release-0.2.0#egg=tahoe-lti==release-0.2.0
git+https://github.com/edx/MongoDBProxy.git@25b99097615bda06bd7cdfe5669ed80dc2a7fed0#egg=MongoDBProxy==0.1.0
-e .
git+https://github.com/edx/edx-ora2.git@2.2.0#egg=ora2==2.2.0
diff --git a/requirements/edx/development.txt b/requirements/edx/development.txt
index 0f22cce5c57f..84db82a6aad1 100644
--- a/requirements/edx/development.txt
+++ b/requirements/edx/development.txt
@@ -24,7 +24,8 @@ git+https://github.com/edx/django-rest-framework.git@1ceda7c086fddffd1c440cc8685
-e git+https://github.com/jazkarta/edx-jsme.git@690dbf75441fa91c7c4899df0b83d77f7deb5458#egg=edx-jsme
git+https://github.com/mitodl/edx-sga.git@3828ba9e413080a81b907a3381e5ffa05e063f81#egg=edx-sga==0.8.3
git+https://github.com/edx/lettuce.git@7a04591c78ac56dac3eb3e91ca94b15cce844133#egg=lettuce==0.2.23+edx.1
-git+https://github.com/edx/xblock-lti-consumer.git@v1.1.8#egg=lti_consumer-xblock==1.1.8
+git+https://github.com/edx/xblock-lti-consumer.git@v1.2.5#egg=lti_consumer-xblock==1.2.5
+git+https://github.com/appsembler/tahoe-lti.git@release-0.2.0#egg=tahoe-lti==release-0.2.0
git+https://github.com/edx/MongoDBProxy.git@25b99097615bda06bd7cdfe5669ed80dc2a7fed0#egg=MongoDBProxy==0.1.0
-e .
git+https://github.com/edx/edx-ora2.git@2.2.0#egg=ora2==2.2.0
diff --git a/requirements/edx/github.in b/requirements/edx/github.in
index 4f917bdf63a9..8204937c8981 100644
--- a/requirements/edx/github.in
+++ b/requirements/edx/github.in
@@ -70,6 +70,7 @@
-e git+https://github.com/jazkarta/edx-jsme.git@690dbf75441fa91c7c4899df0b83d77f7deb5458#egg=edx-jsme
-e git+https://github.com/mitodl/django-cas.git@afac57bc523f145ae826f4ed3d4fa8b2c86c5364#egg=django-cas==2.1.1
-e git+https://github.com/dgrtwo/ParsePy.git@7949b9f754d1445eff8e8f20d0e967b9a6420639#egg=parse_rest
+-e git+https://github.com/appsembler/tahoe-lti.git@release-0.2.0#egg=tahoe-lti==release-0.2.0
# Forked to get Django 1.10+ compat that is in origin BitBucket repo, without an official build.
# This can go away when we update auth to not use django-rest-framework-oauth
@@ -95,7 +96,7 @@
-e git+https://github.com/edx/RateXBlock.git@367e19c0f6eac8a5f002fd0f1559555f8e74bfff#egg=rate-xblock
-e git+https://github.com/edx/DoneXBlock.git@01a14f3bd80ae47dd08cdbbe2f88f3eb88d00fba#egg=done-xblock
-e git+https://github.com/edx-solutions/xblock-google-drive.git@138e6fa0bf3a2013e904a085b9fed77dab7f3f21#egg=xblock-google-drive
--e git+https://github.com/edx/xblock-lti-consumer.git@v1.1.8#egg=lti_consumer-xblock==1.1.8
+-e git+https://github.com/edx/xblock-lti-consumer.git@v1.2.5#egg=lti_consumer-xblock==1.2.5
# Third Party XBlocks
diff --git a/requirements/edx/testing.txt b/requirements/edx/testing.txt
index 9d55925b1a24..9e96879777a5 100644
--- a/requirements/edx/testing.txt
+++ b/requirements/edx/testing.txt
@@ -22,7 +22,8 @@ git+https://github.com/edx/django-rest-framework.git@1ceda7c086fddffd1c440cc8685
-e git+https://github.com/jazkarta/edx-jsme.git@690dbf75441fa91c7c4899df0b83d77f7deb5458#egg=edx-jsme
git+https://github.com/mitodl/edx-sga.git@3828ba9e413080a81b907a3381e5ffa05e063f81#egg=edx-sga==0.8.3
git+https://github.com/edx/lettuce.git@7a04591c78ac56dac3eb3e91ca94b15cce844133#egg=lettuce==0.2.23+edx.1
-git+https://github.com/edx/xblock-lti-consumer.git@v1.1.8#egg=lti_consumer-xblock==1.1.8
+git+https://github.com/edx/xblock-lti-consumer.git@v1.2.5#egg=lti_consumer-xblock==1.2.5
+git+https://github.com/appsembler/tahoe-lti.git@release-0.2.0#egg=tahoe-lti==release-0.2.0
git+https://github.com/edx/MongoDBProxy.git@25b99097615bda06bd7cdfe5669ed80dc2a7fed0#egg=MongoDBProxy==0.1.0
-e .
git+https://github.com/edx/edx-ora2.git@2.2.0#egg=ora2==2.2.0