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
0d854bd5
Commit
0d854bd5
authored
May 28, 2014
by
Julia Hansbrough
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved hardcoded defaults into settings
parent
779480ba
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
11 deletions
+24
-11
cms/envs/test.py
+1
-1
lms/envs/aws.py
+6
-0
lms/envs/common.py
+6
-2
lms/envs/test.py
+3
-0
lms/templates/contact.html
+4
-4
lms/templates/courseware/course_about.html
+4
-4
No files found.
cms/envs/test.py
View file @
0d854bd5
...
...
@@ -18,7 +18,7 @@ from path import path
from
warnings
import
filterwarnings
# import settings from LMS for consistent behavior with CMS
from
lms.envs.test
import
(
WIKI_ENABLED
)
from
lms.envs.test
import
(
WIKI_ENABLED
,
PLATFORM_NAME
,
SITE_NAME
)
# Nose Test Runner
TEST_RUNNER
=
'django_nose.NoseTestSuiteRunner'
...
...
lms/envs/aws.py
View file @
0d854bd5
...
...
@@ -127,6 +127,8 @@ if STATIC_URL_BASE:
PLATFORM_NAME
=
ENV_TOKENS
.
get
(
'PLATFORM_NAME'
,
PLATFORM_NAME
)
# For displaying on the receipt. At Stanford PLATFORM_NAME != MERCHANT_NAME, but PLATFORM_NAME is a fine default
PLATFORM_TWITTER_ACCOUNT
=
ENV_TOKENS
.
get
(
'PLATFORM_TWITTER_ACCOUNT'
,
PLATFORM_TWITTER_ACCOUNT
)
PLATFORM_FACEBOOK_ACCOUNT
=
ENV_TOKENS
.
get
(
'PLATFORM_FACEBOOK_ACCOUNT'
,
PLATFORM_FACEBOOK_ACCOUNT
)
CC_MERCHANT_NAME
=
ENV_TOKENS
.
get
(
'CC_MERCHANT_NAME'
,
PLATFORM_NAME
)
EMAIL_BACKEND
=
ENV_TOKENS
.
get
(
'EMAIL_BACKEND'
,
EMAIL_BACKEND
)
EMAIL_FILE_PATH
=
ENV_TOKENS
.
get
(
'EMAIL_FILE_PATH'
,
None
)
...
...
@@ -170,6 +172,10 @@ TECH_SUPPORT_EMAIL = ENV_TOKENS.get('TECH_SUPPORT_EMAIL', TECH_SUPPORT_EMAIL)
CONTACT_EMAIL
=
ENV_TOKENS
.
get
(
'CONTACT_EMAIL'
,
CONTACT_EMAIL
)
BUGS_EMAIL
=
ENV_TOKENS
.
get
(
'BUGS_EMAIL'
,
BUGS_EMAIL
)
PAYMENT_SUPPORT_EMAIL
=
ENV_TOKENS
.
get
(
'PAYMENT_SUPPORT_EMAIL'
,
PAYMENT_SUPPORT_EMAIL
)
UNIVERSITY_EMAIL
=
ENV_TOKENS
.
get
(
'UNIVERSITY_EMAIL'
,
UNIVERSITY_EMAIL
)
PRESS_EMAIL
=
ENV_TOKENS
.
get
(
'PRESS_EMAIL'
,
PRESS_EMAIL
)
# Currency
PAID_COURSE_REGISTRATION_CURRENCY
=
ENV_TOKENS
.
get
(
'PAID_COURSE_REGISTRATION_CURRENCY'
,
PAID_COURSE_REGISTRATION_CURRENCY
)
...
...
lms/envs/common.py
View file @
0d854bd5
...
...
@@ -37,8 +37,10 @@ from lms.lib.xblock.mixin import LmsBlockMixin
################################### FEATURES ###################################
# The display name of the platform to be used in templates/emails/etc.
PLATFORM_NAME
=
"
edX
"
PLATFORM_NAME
=
"
Your Platform Name Here
"
CC_MERCHANT_NAME
=
PLATFORM_NAME
PLATFORM_TWITTER_ACCOUNT
=
"@YourPlatformTwitterAccount"
PLATFORM_FACEBOOK_ACCOUNT
=
"http://www.facebook.com/YourPlatformFacebookAccount"
COURSEWARE_ENABLED
=
True
ENABLE_JASMINE
=
False
...
...
@@ -523,7 +525,7 @@ CMS_BASE = 'localhost:8001'
# Site info
SITE_ID
=
1
SITE_NAME
=
"e
dx.org
"
SITE_NAME
=
"e
xample.com
"
HTTPS
=
'on'
ROOT_URLCONF
=
'lms.urls'
# NOTE: Please set ALLOWED_HOSTS to some sane value, as we do not allow the default '*'
...
...
@@ -536,6 +538,8 @@ SERVER_EMAIL = 'devops@example.com'
TECH_SUPPORT_EMAIL
=
'technical@example.com'
CONTACT_EMAIL
=
'info@example.com'
BUGS_EMAIL
=
'bugs@example.com'
UNIVERSITY_EMAIL
=
'university@example.com'
PRESS_EMAIL
=
'press@example.com'
ADMINS
=
()
MANAGERS
=
ADMINS
...
...
lms/envs/test.py
View file @
0d854bd5
...
...
@@ -287,6 +287,9 @@ FEATURES['CLASS_DASHBOARD'] = True
import
openid.oidutil
openid
.
oidutil
.
log
=
lambda
message
,
level
=
0
:
None
PLATFORM_NAME
=
"edX"
SITE_NAME
=
"edx.org"
# set up some testing for microsites
MICROSITE_CONFIGURATION
=
{
"test_microsite"
:
{
...
...
lms/templates/contact.html
View file @
0d854bd5
...
...
@@ -28,10 +28,10 @@
'discussion on our {fb_link_start}facebook page{fb_link_end}. Though we may '
'not have a chance to respond to every email, we take all feedback into consideration.').format(
platform_name=settings.PLATFORM_NAME,
contact_email=u'
<a
href=
"mailto:{
0}"
>
{0}
</a>
'.format(
settings.CONTACT_EMAIL),
contact_email=u'
<a
href=
"mailto:{
email}"
>
{email}
</a>
'.format(email=
settings.CONTACT_EMAIL),
faq_link_start=u'
<a
href=
"{url}"
>
'.format(url=reverse('faq_edx')),
faq_link_end='
</a>
',
fb_link_start='
<a
href=
"
http://www.facebook.com/EdxOnline"
>
'
,
fb_link_start='
<a
href=
"
{url}"
>
'.format(url=settings.PLATFORM_FACEBOOK_ACCOUNT)
,
fb_link_end='
</a>
'
)}
</p>
...
...
@@ -54,13 +54,13 @@
<p>
${_('Please visit our {link_start}media/press page{link_end} for more information. For any media or press inquiries, please email {email}.').format(
link_start=u'
<a
href=
"{url}"
>
'.format(url=reverse('faq_edx')),
link_end='
</a>
',
email=u'
<a
href=
"mailto:
press@edx.org"
>
press@edx.org
</a>
'
,
email=u'
<a
href=
"mailto:
{email}"
>
{email}/a>'.format(email=settings.PRESS_EMAIL)
,
)}
</p>
<h2>
${_("Universities")}
</h2>
<p>
${_('If you are a university wishing to collaborate with or if you have questions about {platform_name}, please email {email}.').format(
email=u'
<a
href=
"mailto:
university@edx.org"
>
university@edx.org
</a>
'
,
email=u'
<a
href=
"mailto:
{url}"
>
{url}
</a>
'.format(url=settings.UNIVERSITY_EMAIL)
,
platform_name=settings.PLATFORM_NAME
)}
</p>
...
...
lms/templates/courseware/course_about.html
View file @
0d854bd5
...
...
@@ -238,15 +238,15 @@
</a>
% else:
<
%
site_domain =
microsite.get_value('site_domain',
'
www
.
edx
.
org
'
)
platform_name =
microsite.get_value('platform_name',
'
edX
'
)
site_domain =
microsite.get_value('site_domain',
settings
.
SITE_NAME
)
platform_name =
microsite.get_value('platform_name',
settings
.
PLATFORM_NAME
)
#
Translators:
This
text
will
be
automatically
posted
to
the
student
'
s
#
Twitter
account
.
{
url
}
should
appear
at
the
end
of
the
text
.
tweet_text =
_("I
just
registered
for
{
number
}
{
title
}
through
{
account
}
:
{
url
}").
format
(
number=
course.number,
title=
get_course_about_section(course,
'
title
'),
account=
microsite.get_value('course_about_twitter_account',
'@
edxonline
'
),
account=
microsite.get_value('course_about_twitter_account',
settings
.
PLATFORM_TWITTER_ACCOUNT
),
url=
u"http://{domain}{path}".format(
domain=
site_domain,
path=
reverse('about_course',
args=
[course.id.to_deprecated_string()])
...
...
@@ -254,7 +254,7 @@
).
replace
(
u
"
",
u
"+")
tweet_action =
u"http://twitter.com/intent/tweet?text={tweet_text}".format(tweet_text=tweet_text)
facebook_link =
microsite.get_value('course_about_facebook_link',
'
http:
//
www
.
facebook
.
com
/
EdxOnline
'
)
facebook_link =
microsite.get_value('course_about_facebook_link',
settings
.
PLATFORM_FACEBOOK_ACCOUNT
)
email_subject =
u"mailto:?subject={subject}&body={body}".format(
subject=
_("Take
a
course
with
{
platform
}
online
").
format
(
platform=
platform_name),
...
...
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