Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
d0c7a532
Commit
d0c7a532
authored
Jun 21, 2017
by
Omar Al-Ithawi
Committed by
Alex Dusenbery
Aug 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the platform name translatable
parent
167e4d58
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
25 deletions
+27
-25
cms/envs/aws.py
+3
-3
cms/envs/common.py
+5
-2
common/djangoapps/third_party_auth/models.py
+10
-10
common/test/acceptance/tests/studio/test_studio_help.py
+6
-6
lms/envs/aws.py
+1
-1
lms/envs/common.py
+2
-2
lms/envs/devstack.py
+0
-1
No files found.
cms/envs/aws.py
View file @
d0c7a532
...
...
@@ -246,9 +246,9 @@ LOGGING = get_logger_config(LOG_DIR,
service_variant
=
SERVICE_VARIANT
)
#theming start:
PLATFORM_NAME
=
ENV_TOKENS
.
get
(
'PLATFORM_NAME'
,
'edX'
)
STUDIO_NAME
=
ENV_TOKENS
.
get
(
'STUDIO_NAME'
,
'edX Studio'
)
STUDIO_SHORT_NAME
=
ENV_TOKENS
.
get
(
'STUDIO_SHORT_NAME'
,
'Studio'
)
PLATFORM_NAME
=
ENV_TOKENS
.
get
(
'PLATFORM_NAME'
,
PLATFORM_NAME
)
STUDIO_NAME
=
ENV_TOKENS
.
get
(
'STUDIO_NAME'
,
STUDIO_NAME
)
STUDIO_SHORT_NAME
=
ENV_TOKENS
.
get
(
'STUDIO_SHORT_NAME'
,
STUDIO_SHORT_NAME
)
# Event Tracking
if
"TRACKING_IGNORE_URL_PATTERNS"
in
ENV_TOKENS
:
...
...
cms/envs/common.py
View file @
d0c7a532
...
...
@@ -65,6 +65,9 @@ from lms.envs.common import (
MEDIA_ROOT
,
MEDIA_URL
,
# Lazy Gettext
_
,
# Django REST framework configuration
REST_FRAMEWORK
,
...
...
@@ -125,8 +128,8 @@ from openedx.core.lib.license import LicenseMixin
# Dummy secret key for dev/test
SECRET_KEY
=
'dev key'
STUDIO_NAME
=
"Studio"
STUDIO_SHORT_NAME
=
"Studio"
STUDIO_NAME
=
_
(
"Your Platform Studio"
)
STUDIO_SHORT_NAME
=
_
(
"Studio"
)
FEATURES
=
{
'GITHUB_PUSH'
:
False
,
...
...
common/djangoapps/third_party_auth/models.py
View file @
d0c7a532
...
...
@@ -51,14 +51,6 @@ _PSA_OAUTH2_BACKENDS = [backend_class.name for backend_class in _load_backend_cl
_PSA_SAML_BACKENDS
=
[
backend_class
.
name
for
backend_class
in
_load_backend_classes
(
SAMLAuth
)]
_LTI_BACKENDS
=
[
backend_class
.
name
for
backend_class
in
_load_backend_classes
(
LTIAuthBackend
)]
DEFAULT_SAML_CONTACT
=
{
# Default contact information to put into the SAML metadata that gets generated by python-saml.
"givenName"
:
u"{} Support"
.
format
(
configuration_helpers
.
get_value
(
'PLATFORM_NAME'
,
settings
.
PLATFORM_NAME
),
),
"emailAddress"
:
configuration_helpers
.
get_value
(
'TECH_SUPPORT_EMAIL'
,
settings
.
TECH_SUPPORT_EMAIL
),
}
def
clean_json
(
value
,
of_type
):
""" Simple helper method to parse and clean JSON """
...
...
@@ -576,6 +568,14 @@ class SAMLConfiguration(ConfigurationModel):
def
get_setting
(
self
,
name
):
""" Get the value of a setting, or raise KeyError """
default_saml_contact
=
{
# Default contact information to put into the SAML metadata that gets generated by python-saml.
"givenName"
:
_
(
"{platform_name} Support"
)
.
format
(
platform_name
=
configuration_helpers
.
get_value
(
'PLATFORM_NAME'
,
settings
.
PLATFORM_NAME
)
),
"emailAddress"
:
configuration_helpers
.
get_value
(
'TECH_SUPPORT_EMAIL'
,
settings
.
TECH_SUPPORT_EMAIL
),
}
if
name
==
"ORG_INFO"
:
return
json
.
loads
(
self
.
org_info_str
)
if
name
==
"SP_ENTITY_ID"
:
...
...
@@ -593,8 +593,8 @@ class SAMLConfiguration(ConfigurationModel):
other_config
=
{
# These defaults can be overriden by self.other_config_str
"GET_ALL_EXTRA_DATA"
:
True
,
# Save all attribute values the IdP sends into the UserSocialAuth table
"TECHNICAL_CONTACT"
:
DEFAULT_SAML_CONTACT
,
"SUPPORT_CONTACT"
:
DEFAULT_SAML_CONTACT
,
"TECHNICAL_CONTACT"
:
default_saml_contact
,
"SUPPORT_CONTACT"
:
default_saml_contact
,
}
other_config
.
update
(
json
.
loads
(
self
.
other_config_str
))
return
other_config
[
name
]
# SECURITY_CONFIG, SP_EXTRA, or similar extra settings
...
...
common/test/acceptance/tests/studio/test_studio_help.py
View file @
d0c7a532
...
...
@@ -179,7 +179,7 @@ class HomeHelpTest(StudioCourseTest):
Scenario: Help link in sidebar links is working on 'Home'(Courses tab) page.
Given that I am on the 'Home'(Courses tab) page.
And I want help about the courses
And I click the 'Getting Started with
edX
Studio' in the sidebar links
And I click the 'Getting Started with
Your Platform
Studio' in the sidebar links
Then Help link should open.
And help url should be correct
"""
...
...
@@ -190,7 +190,7 @@ class HomeHelpTest(StudioCourseTest):
test
=
self
,
page
=
self
.
home_page
,
href
=
expected_url
,
help_text
=
'Getting Started with
edX
Studio'
,
help_text
=
'Getting Started with
Your Platform
Studio'
,
as_list_item
=
True
)
...
...
@@ -232,7 +232,7 @@ class NewCourseHelpTest(AcceptanceTest):
Scenario: Help link in sidebar links is working on 'Create a New Course' page in the dashboard.
Given that I am on the 'Create a New Course' page in the dashboard.
And I want help about the process
And I click the 'Getting Started with
edX
Studio' in the sidebar links
And I click the 'Getting Started with
Your Platform
Studio' in the sidebar links
Then Help link should open.
And help url should be correct
"""
...
...
@@ -243,7 +243,7 @@ class NewCourseHelpTest(AcceptanceTest):
test
=
self
,
page
=
self
.
dashboard_page
,
href
=
expected_url
,
help_text
=
'Getting Started with
edX
Studio'
,
help_text
=
'Getting Started with
Your Platform
Studio'
,
as_list_item
=
True
)
...
...
@@ -285,7 +285,7 @@ class NewLibraryHelpTest(AcceptanceTest):
Scenario: Help link in sidebar links is working on 'Create a New Library' page in the dashboard.
Given that I am on the 'Create a New Library' page in the dashboard.
And I want help about the process
And I click the 'Getting Started with
edX
Studio' in the sidebar links
And I click the 'Getting Started with
Your Platform
Studio' in the sidebar links
Then Help link should open.
And help url should be correct
"""
...
...
@@ -296,7 +296,7 @@ class NewLibraryHelpTest(AcceptanceTest):
test
=
self
,
page
=
self
.
dashboard_page
,
href
=
expected_url
,
help_text
=
'Getting Started with
edX
Studio'
,
help_text
=
'Getting Started with
Your Platform
Studio'
,
as_list_item
=
True
)
...
...
lms/envs/aws.py
View file @
d0c7a532
...
...
@@ -581,7 +581,7 @@ if 'DATADOG_API' in AUTH_TOKENS:
# Analytics Dashboard
ANALYTICS_DASHBOARD_URL
=
ENV_TOKENS
.
get
(
"ANALYTICS_DASHBOARD_URL"
,
ANALYTICS_DASHBOARD_URL
)
ANALYTICS_DASHBOARD_NAME
=
ENV_TOKENS
.
get
(
"ANALYTICS_DASHBOARD_NAME"
,
PLATFORM_NAME
+
" Insights"
)
ANALYTICS_DASHBOARD_NAME
=
ENV_TOKENS
.
get
(
"ANALYTICS_DASHBOARD_NAME"
,
ANALYTICS_DASHBOARD_NAME
)
# Mailchimp New User List
MAILCHIMP_NEW_USER_LIST_ID
=
ENV_TOKENS
.
get
(
"MAILCHIMP_NEW_USER_LIST_ID"
)
...
...
lms/envs/common.py
View file @
d0c7a532
...
...
@@ -45,7 +45,7 @@ from lms.djangoapps.lms_xblock.mixin import LmsBlockMixin
################################### FEATURES ###################################
# The display name of the platform to be used in templates/emails/etc.
PLATFORM_NAME
=
"Your Platform Name Here"
PLATFORM_NAME
=
_
(
'Your Platform Name Here'
)
CC_MERCHANT_NAME
=
PLATFORM_NAME
PLATFORM_FACEBOOK_ACCOUNT
=
"http://www.facebook.com/YourPlatformFacebookAccount"
...
...
@@ -2852,7 +2852,7 @@ OPENID_DOMAIN_PREFIX = 'openid:'
### Analytics Dashboard (Insights) settings
ANALYTICS_DASHBOARD_URL
=
""
ANALYTICS_DASHBOARD_NAME
=
PLATFORM_NAME
+
" Insights"
ANALYTICS_DASHBOARD_NAME
=
_
(
'Your Platform Insights'
)
# REGISTRATION CODES DISPLAY INFORMATION SUBTITUTIONS IN THE INVOICE ATTACHMENT
INVOICE_CORP_ADDRESS
=
"Please place your corporate address
\n
in this configuration"
...
...
lms/envs/devstack.py
View file @
d0c7a532
...
...
@@ -15,7 +15,6 @@ DEBUG = True
USE_I18N
=
True
DEFAULT_TEMPLATE_ENGINE
[
'OPTIONS'
][
'debug'
]
=
True
SITE_NAME
=
'localhost:8000'
PLATFORM_NAME
=
ENV_TOKENS
.
get
(
'PLATFORM_NAME'
,
'Devstack'
)
# By default don't use a worker, execute tasks as if they were local functions
CELERY_ALWAYS_EAGER
=
True
HTTPS
=
'off'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment