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
53604648
Commit
53604648
authored
May 04, 2016
by
Douglas Hall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Check microsite configurations for PLATFORM_NAME setting before defaulting to global setting
parent
546f5f3d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
openedx/core/djangoapps/user_api/views.py
+6
-6
No files found.
openedx/core/djangoapps/user_api/views.py
View file @
53604648
...
...
@@ -20,7 +20,6 @@ from rest_framework.views import APIView
from
rest_framework.exceptions
import
ParseError
from
django_countries
import
countries
from
opaque_keys.edx.locations
import
SlashSeparatedCourseKey
from
microsite_configuration
import
microsite
from
openedx.core.lib.api.permissions
import
ApiKeyHeaderPermission
import
third_party_auth
...
...
@@ -29,6 +28,7 @@ from edxmako.shortcuts import marketing_link
from
student.forms
import
get_registration_extension_form
from
student.views
import
create_account_with_params
from
student.cookies
import
set_logged_in_cookies
from
openedx.core.djangoapps.theming.helpers
import
get_value
as
get_themed_value
from
openedx.core.lib.api.authentication
import
SessionAuthenticationAllowInactiveUser
from
util.json_request
import
JsonResponse
from
.preferences.api
import
update_email_opt_in
...
...
@@ -189,7 +189,7 @@ class RegistrationView(APIView):
# Backwards compatibility: Honor code is required by default, unless
# explicitly set to "optional" in Django settings.
self
.
_extra_fields_setting
=
copy
.
deepcopy
(
microsite
.
get
_value
(
'REGISTRATION_EXTRA_FIELDS'
))
self
.
_extra_fields_setting
=
copy
.
deepcopy
(
get_themed
_value
(
'REGISTRATION_EXTRA_FIELDS'
))
if
not
self
.
_extra_fields_setting
:
self
.
_extra_fields_setting
=
copy
.
deepcopy
(
settings
.
REGISTRATION_EXTRA_FIELDS
)
self
.
_extra_fields_setting
[
"honor_code"
]
=
self
.
_extra_fields_setting
.
get
(
"honor_code"
,
"required"
)
...
...
@@ -687,14 +687,14 @@ class RegistrationView(APIView):
# Translators: "Terms of Service" is a legal document users must agree to
# in order to register a new account.
label
=
_
(
u"I agree to the {platform_name} {terms_of_service}."
)
.
format
(
platform_name
=
settings
.
PLATFORM_NAME
,
platform_name
=
get_themed_value
(
"PLATFORM_NAME"
,
settings
.
PLATFORM_NAME
)
,
terms_of_service
=
terms_link
)
# Translators: "Terms of Service" is a legal document users must agree to
# in order to register a new account.
error_msg
=
_
(
u"You must agree to the {platform_name} {terms_of_service}."
)
.
format
(
platform_name
=
settings
.
PLATFORM_NAME
,
platform_name
=
get_themed_value
(
"PLATFORM_NAME"
,
settings
.
PLATFORM_NAME
)
,
terms_of_service
=
terms_link
)
...
...
@@ -730,14 +730,14 @@ class RegistrationView(APIView):
# Translators: "Terms of service" is a legal document users must agree to
# in order to register a new account.
label
=
_
(
u"I agree to the {platform_name} {terms_of_service}."
)
.
format
(
platform_name
=
settings
.
PLATFORM_NAME
,
platform_name
=
get_themed_value
(
"PLATFORM_NAME"
,
settings
.
PLATFORM_NAME
)
,
terms_of_service
=
terms_link
)
# Translators: "Terms of service" is a legal document users must agree to
# in order to register a new account.
error_msg
=
_
(
u"You must agree to the {platform_name} {terms_of_service}."
)
.
format
(
platform_name
=
settings
.
PLATFORM_NAME
,
platform_name
=
get_themed_value
(
"PLATFORM_NAME"
,
settings
.
PLATFORM_NAME
)
,
terms_of_service
=
terms_link
)
...
...
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