Commit a620cc00 by Jay Zoldak

Merge branch 'release'

Conflicts:
	lms/templates/courseware/accordion.html
parents 9b54e44b 12fe2701
...@@ -255,8 +255,8 @@ class ViewsTestCase(TestCase): ...@@ -255,8 +255,8 @@ class ViewsTestCase(TestCase):
response = self.client.get(url) response = self.client.get(url)
self.assertFalse('<script>' in response.content) self.assertFalse('<script>' in response.content)
# setting TIME_ZONE explicitly # setting TIME_ZONE_DISPLAYED_FOR_DEADLINES explicitly
@override_settings(MODULESTORE=TEST_DATA_MIXED_MODULESTORE, TIME_ZONE="America/New_York") @override_settings(MODULESTORE=TEST_DATA_MIXED_MODULESTORE, TIME_ZONE_DISPLAYED_FOR_DEADLINES="UTC")
class BaseDueDateTests(ModuleStoreTestCase): class BaseDueDateTests(ModuleStoreTestCase):
""" """
Base class that verifies that due dates are rendered correctly on a page Base class that verifies that due dates are rendered correctly on a page
...@@ -289,8 +289,8 @@ class BaseDueDateTests(ModuleStoreTestCase): ...@@ -289,8 +289,8 @@ class BaseDueDateTests(ModuleStoreTestCase):
self.request = self.request_factory.get("foo") self.request = self.request_factory.get("foo")
self.request.user = self.user self.request.user = self.user
self.time_with_tz = "due Sep 18, 2013 at 07:30 EDT" self.time_with_tz = "due Sep 18, 2013 at 11:30 UTC"
self.time_without_tz = "due Sep 18, 2013 at 07:30" self.time_without_tz = "due Sep 18, 2013 at 11:30"
def test_backwards_compatability(self): def test_backwards_compatability(self):
# The test course being used has show_timezone = False in the policy file # The test course being used has show_timezone = False in the policy file
......
...@@ -374,3 +374,7 @@ PASSWORD_DICTIONARY = ENV_TOKENS.get("PASSWORD_DICTIONARY", []) ...@@ -374,3 +374,7 @@ PASSWORD_DICTIONARY = ENV_TOKENS.get("PASSWORD_DICTIONARY", [])
### INACTIVITY SETTINGS #### ### INACTIVITY SETTINGS ####
SESSION_INACTIVITY_TIMEOUT_IN_SECONDS = AUTH_TOKENS.get("SESSION_INACTIVITY_TIMEOUT_IN_SECONDS") 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)
...@@ -1283,3 +1283,7 @@ LINKEDIN_API = { ...@@ -1283,3 +1283,7 @@ LINKEDIN_API = {
##### ACCOUNT LOCKOUT DEFAULT PARAMETERS ##### ##### ACCOUNT LOCKOUT DEFAULT PARAMETERS #####
MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED = 5 MAX_FAILED_LOGIN_ATTEMPTS_ALLOWED = 5
MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS = 15 * 60 MAX_FAILED_LOGIN_ATTEMPTS_LOCKOUT_PERIOD_SECS = 15 * 60
##### LMS DEADLINE DISPLAY TIME_ZONE #######
TIME_ZONE_DISPLAYED_FOR_DEADLINES = 'UTC'
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
if section.get('due') is None: if section.get('due') is None:
due_date = '' due_date = ''
else: else:
formatted_string = get_time_display(section['due'], due_date_display_format, coerce_tz=settings.TIME_ZONE) 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) due_date = '' if len(formatted_string)==0 else _('due {date}').format(date=formatted_string)
%> %>
<p class="subtitle">${section['format']} ${due_date}</p> <p class="subtitle">${section['format']} ${due_date}</p>
......
...@@ -77,7 +77,7 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph", ...@@ -77,7 +77,7 @@ ${progress_graph.body(grade_summary, course.grade_cutoffs, "grade-detail-graph",
%if section.get('due') is not None: %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) due_date = '' if len(formatted_string)==0 else _(u'due {date}').format(date=formatted_string)
%> %>
<em> <em>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment