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
183d9bbb
Commit
183d9bbb
authored
Feb 21, 2014
by
Jason Bau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use new setting for LMS deadline display instead TIME_ZONE
parent
9986a664
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
7 deletions
+15
-7
lms/djangoapps/courseware/tests/test_views.py
+4
-4
lms/envs/aws.py
+4
-0
lms/envs/common.py
+4
-0
lms/templates/courseware/accordion.html
+2
-2
lms/templates/courseware/progress.html
+1
-1
No files found.
lms/djangoapps/courseware/tests/test_views.py
View file @
183d9bbb
...
...
@@ -255,8 +255,8 @@ class ViewsTestCase(TestCase):
response
=
self
.
client
.
get
(
url
)
self
.
assertFalse
(
'<script>'
in
response
.
content
)
# setting TIME_ZONE explicitly
@override_settings
(
MODULESTORE
=
TEST_DATA_MIXED_MODULESTORE
,
TIME_ZONE
=
"America/New_York
"
)
# setting TIME_ZONE
_DISPLAYED_FOR_DEADLINES
explicitly
@override_settings
(
MODULESTORE
=
TEST_DATA_MIXED_MODULESTORE
,
TIME_ZONE
_DISPLAYED_FOR_DEADLINES
=
"UTC
"
)
class
BaseDueDateTests
(
ModuleStoreTestCase
):
"""
Base class that verifies that due dates are rendered correctly on a page
...
...
@@ -289,8 +289,8 @@ class BaseDueDateTests(ModuleStoreTestCase):
self
.
request
=
self
.
request_factory
.
get
(
"foo"
)
self
.
request
.
user
=
self
.
user
self
.
time_with_tz
=
"due Sep 18, 2013 at
07:30 EDT
"
self
.
time_without_tz
=
"due Sep 18, 2013 at
07
:30"
self
.
time_with_tz
=
"due Sep 18, 2013 at
11:30 UTC
"
self
.
time_without_tz
=
"due Sep 18, 2013 at
11
:30"
def
test_backwards_compatability
(
self
):
# The test course being used has show_timezone = False in the policy file
...
...
lms/envs/aws.py
View file @
183d9bbb
...
...
@@ -371,3 +371,7 @@ PASSWORD_DICTIONARY = ENV_TOKENS.get("PASSWORD_DICTIONARY", [])
### INACTIVITY SETTINGS ####
SESSION_INACTIVITY_TIMEOUT_IN_SECONDS
=
AUTH_TOKENS
.
get
(
"SESSION_INACTIVITY_TIMEOUT_IN_SECONDS"
)
##### LMS DEADLINE DISPLAY TIME_ZONE #######
TIME_ZONE_DISPLAYED_FOR_DEADLINES
=
ENV_TOKENS
.
get
(
"TIME_ZONE_DISPLAYED_FOR_DEADLINES"
,
TIME_ZONE_DISPLAYED_FOR_DEADLINES
)
lms/envs/common.py
View file @
183d9bbb
...
...
@@ -1283,3 +1283,7 @@ LINKEDIN_API = {
##### ACCOUNT LOCKOUT DEFAULT PARAMETERS #####
MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED
=
5
MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS
=
15
*
60
##### LMS DEADLINE DISPLAY TIME_ZONE #######
TIME_ZONE_DISPLAYED_FOR_DEADLINES
=
'UTC'
lms/templates/courseware/accordion.html
View file @
183d9bbb
...
...
@@ -30,8 +30,8 @@
if
section
.
get
('
due
')
is
None:
due_date =
''
else:
formatted_string =
get_time_display(section['due'],
due_date_display_format
,
coerce_tz=
settings.TIME_ZONE)
due_date =
''
if
len
(
formatted_string
)==
0
else
_
('
due
{
date
}'
.
format
(
date=
formatted_string)
)
formatted_string =
get_time_display(section['due'],
due_date_display_format
,
coerce_tz=
settings.TIME_ZONE
_DISPLAYED_FOR_DEADLINES
)
due_date =
''
if
len
(
formatted_string
)==
0
else
_
('
due
{
date
}'
).
format
(
date=
formatted_string
)
%
>
<p
class=
"subtitle"
>
${section['format']} ${due_date}
</p>
</a>
...
...
lms/templates/courseware/progress.html
View file @
183d9bbb
...
...
@@ -77,7 +77,7 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph",
%if section.get('due') is not None:
<
%
formatted_string =
get_time_display(section['due'],
course
.
due_date_display_format
,
coerce_tz=
settings.TIME_ZONE)
formatted_string =
get_time_display(section['due'],
course
.
due_date_display_format
,
coerce_tz=
settings.TIME_ZONE
_DISPLAYED_FOR_DEADLINES
)
due_date =
''
if
len
(
formatted_string
)==
0
else
_
(
u
'
due
{
date
}').
format
(
date=
formatted_string)
%
>
<em>
...
...
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