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
7074e3ab
Commit
7074e3ab
authored
Jun 23, 2017
by
Brian Beggs
Committed by
GitHub
Jun 23, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14902 from Salomari1987/salah/copyright-year
Set COPYRIGHT_YEAR dynamically
parents
cc460bbb
b8ba64cb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
6 deletions
+13
-6
cms/envs/common.py
+1
-1
cms/templates/widgets/footer.html
+4
-1
lms/djangoapps/certificates/views/webview.py
+2
-1
lms/envs/common.py
+0
-2
themes/red-theme/lms/templates/footer.html
+6
-1
No files found.
cms/envs/common.py
View file @
7074e3ab
...
@@ -49,7 +49,7 @@ import lms.envs.common
...
@@ -49,7 +49,7 @@ import lms.envs.common
# Although this module itself may not use these imported variables, other dependent modules may.
# Although this module itself may not use these imported variables, other dependent modules may.
from
lms.envs.common
import
(
from
lms.envs.common
import
(
USE_TZ
,
TECH_SUPPORT_EMAIL
,
PLATFORM_NAME
,
BUGS_EMAIL
,
DOC_STORE_CONFIG
,
DATA_DIR
,
ALL_LANGUAGES
,
WIKI_ENABLED
,
USE_TZ
,
TECH_SUPPORT_EMAIL
,
PLATFORM_NAME
,
BUGS_EMAIL
,
DOC_STORE_CONFIG
,
DATA_DIR
,
ALL_LANGUAGES
,
WIKI_ENABLED
,
update_module_store_settings
,
ASSET_IGNORE_REGEX
,
COPYRIGHT_YEAR
,
update_module_store_settings
,
ASSET_IGNORE_REGEX
,
PARENTAL_CONSENT_AGE_LIMIT
,
COMPREHENSIVE_THEME_DIRS
,
REGISTRATION_EMAIL_PATTERNS_ALLOWED
,
PARENTAL_CONSENT_AGE_LIMIT
,
COMPREHENSIVE_THEME_DIRS
,
REGISTRATION_EMAIL_PATTERNS_ALLOWED
,
# The following PROFILE_IMAGE_* settings are included as they are
# The following PROFILE_IMAGE_* settings are included as they are
# indirectly accessed through the email opt-in API, which is
# indirectly accessed through the email opt-in API, which is
...
...
cms/templates/widgets/footer.html
View file @
7074e3ab
<
%!
<
%!
from
django
.
utils
.
translation
import
ugettext
as
_
from
django
.
utils
.
translation
import
ugettext
as
_
from
django
.
core
.
urlresolvers
import
reverse
from
django
.
core
.
urlresolvers
import
reverse
from
datetime
import
datetime
from
django
.
conf
import
settings
import
pytz
%
>
%
>
<div
class=
"wrapper-footer wrapper"
>
<div
class=
"wrapper-footer wrapper"
>
...
@@ -8,7 +11,7 @@ from django.core.urlresolvers import reverse
...
@@ -8,7 +11,7 @@ from django.core.urlresolvers import reverse
<div
class=
"footer-content-primary"
>
<div
class=
"footer-content-primary"
>
<div
class=
"colophon"
>
<div
class=
"colophon"
>
<p>
©
${
settings.COPYRIGHT_YEAR
}
<a
data-rel=
"edx.org"
href=
"${marketing_link('ROOT')}"
rel=
"external"
>
${settings.PLATFORM_NAME}
</a>
.
</p>
<p>
©
${
datetime.now(pytz.timezone(settings.TIME_ZONE)).year
}
<a
data-rel=
"edx.org"
href=
"${marketing_link('ROOT')}"
rel=
"external"
>
${settings.PLATFORM_NAME}
</a>
.
</p>
</div>
</div>
% if is_any_marketing_link_set(['TOS', 'PRIVACY']):
% if is_any_marketing_link_set(['TOS', 'PRIVACY']):
...
...
lms/djangoapps/certificates/views/webview.py
View file @
7074e3ab
...
@@ -5,6 +5,7 @@ Certificate HTML webview.
...
@@ -5,6 +5,7 @@ Certificate HTML webview.
import
logging
import
logging
import
urllib
import
urllib
from
datetime
import
datetime
from
datetime
import
datetime
import
pytz
from
uuid
import
uuid4
from
uuid
import
uuid4
from
django.conf
import
settings
from
django.conf
import
settings
...
@@ -153,7 +154,7 @@ def _update_context_with_basic_info(context, course_id, platform_name, configura
...
@@ -153,7 +154,7 @@ def _update_context_with_basic_info(context, course_id, platform_name, configura
# Translators: 'All rights reserved' is a legal term used in copyrighting to protect published content
# Translators: 'All rights reserved' is a legal term used in copyrighting to protect published content
reserved
=
_
(
"All rights reserved"
)
reserved
=
_
(
"All rights reserved"
)
context
[
'copyright_text'
]
=
u'© {year} {platform_name}. {reserved}.'
.
format
(
context
[
'copyright_text'
]
=
u'© {year} {platform_name}. {reserved}.'
.
format
(
year
=
settings
.
COPYRIGHT_YEAR
,
year
=
datetime
.
now
(
pytz
.
timezone
(
settings
.
TIME_ZONE
))
.
year
,
platform_name
=
platform_name
,
platform_name
=
platform_name
,
reserved
=
reserved
reserved
=
reserved
)
)
...
...
lms/envs/common.py
View file @
7074e3ab
...
@@ -47,8 +47,6 @@ from lms.djangoapps.lms_xblock.mixin import LmsBlockMixin
...
@@ -47,8 +47,6 @@ from lms.djangoapps.lms_xblock.mixin import LmsBlockMixin
# The display name of the platform to be used in templates/emails/etc.
# 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
CC_MERCHANT_NAME
=
PLATFORM_NAME
# Shows up in the platform footer, eg "(c) COPYRIGHT_YEAR"
COPYRIGHT_YEAR
=
"2017"
PLATFORM_FACEBOOK_ACCOUNT
=
"http://www.facebook.com/YourPlatformFacebookAccount"
PLATFORM_FACEBOOK_ACCOUNT
=
"http://www.facebook.com/YourPlatformFacebookAccount"
PLATFORM_TWITTER_ACCOUNT
=
"@YourPlatformTwitterAccount"
PLATFORM_TWITTER_ACCOUNT
=
"@YourPlatformTwitterAccount"
...
...
themes/red-theme/lms/templates/footer.html
View file @
7074e3ab
...
@@ -3,6 +3,11 @@
...
@@ -3,6 +3,11 @@
<
%!
<
%!
from
django
.
core
.
urlresolvers
import
reverse
from
django
.
core
.
urlresolvers
import
reverse
from
django
.
utils
.
translation
import
ugettext
as
_
from
django
.
utils
.
translation
import
ugettext
as
_
from
django
.
conf
import
settings
from
datetime
import
datetime
import
pytz
from
openedx
.
core
.
djangoapps
.
lang_pref
.
api
import
footer_language_selector_is_enabled
from
openedx
.
core
.
djangoapps
.
lang_pref
.
api
import
footer_language_selector_is_enabled
%
>
%
>
...
@@ -58,7 +63,7 @@ from openedx.core.djangoapps.lang_pref.api import footer_language_selector_is_en
...
@@ -58,7 +63,7 @@ from openedx.core.djangoapps.lang_pref.api import footer_language_selector_is_en
</p>
</p>
</div>
</div>
<p
class=
"copyright"
>
©
${
settings.COPYRIGHT_YEAR
} ${static.get_platform_name()}.
</p>
<p
class=
"copyright"
>
©
${
datetime.now(pytz.timezone(settings.TIME_ZONE)).year
} ${static.get_platform_name()}.
</p>
## Site operators: Please do not remove this paragraph! This attributes back to edX and makes your acknowledgement of edX's trademarks clear.
## Site operators: Please do not remove this paragraph! This attributes back to edX and makes your acknowledgement of edX's trademarks clear.
<p
class=
"copyright"
>
<p
class=
"copyright"
>
...
...
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