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
229f3522
Commit
229f3522
authored
Feb 14, 2014
by
Ned Batchelder
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move date_utils to common/djangoapps/util
parent
7fd9d442
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
13 additions
and
11 deletions
+13
-11
cms/djangoapps/contentstore/views/assets.py
+1
-1
cms/djangoapps/contentstore/views/component.py
+1
-1
cms/templates/edit_subsection.html
+1
-1
cms/templates/overview.html
+2
-2
common/djangoapps/util/date_utils.py
+0
-0
common/djangoapps/util/tests/test_date_utils.py
+5
-3
lms/templates/courseware/accordion.html
+1
-1
lms/templates/courseware/progress.html
+1
-1
lms/templates/folditbasic.html
+1
-1
No files found.
cms/djangoapps/contentstore/views/assets.py
View file @
229f3522
...
@@ -16,13 +16,13 @@ from xmodule.contentstore.django import contentstore
...
@@ -16,13 +16,13 @@ from xmodule.contentstore.django import contentstore
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore
import
Location
from
xmodule.modulestore
import
Location
from
xmodule.contentstore.content
import
StaticContent
from
xmodule.contentstore.content
import
StaticContent
from
xmodule.util.date_utils
import
get_default_time_display
from
xmodule.modulestore
import
InvalidLocationError
from
xmodule.modulestore
import
InvalidLocationError
from
xmodule.exceptions
import
NotFoundError
from
xmodule.exceptions
import
NotFoundError
from
django.core.exceptions
import
PermissionDenied
from
django.core.exceptions
import
PermissionDenied
from
xmodule.modulestore.django
import
loc_mapper
from
xmodule.modulestore.django
import
loc_mapper
from
xmodule.modulestore.locator
import
BlockUsageLocator
from
xmodule.modulestore.locator
import
BlockUsageLocator
from
util.date_utils
import
get_default_time_display
from
util.json_request
import
JsonResponse
from
util.json_request
import
JsonResponse
from
django.http
import
HttpResponseNotFound
from
django.http
import
HttpResponseNotFound
from
django.utils.translation
import
ugettext
as
_
from
django.utils.translation
import
ugettext
as
_
...
...
cms/djangoapps/contentstore/views/component.py
View file @
229f3522
...
@@ -10,8 +10,8 @@ from django.conf import settings
...
@@ -10,8 +10,8 @@ from django.conf import settings
from
xmodule.modulestore.exceptions
import
ItemNotFoundError
from
xmodule.modulestore.exceptions
import
ItemNotFoundError
from
edxmako.shortcuts
import
render_to_response
from
edxmako.shortcuts
import
render_to_response
from
util.date_utils
import
get_default_time_display
from
xmodule.modulestore.django
import
modulestore
from
xmodule.modulestore.django
import
modulestore
from
xmodule.util.date_utils
import
get_default_time_display
from
xmodule.modulestore.django
import
loc_mapper
from
xmodule.modulestore.django
import
loc_mapper
from
xmodule.modulestore.locator
import
BlockUsageLocator
from
xmodule.modulestore.locator
import
BlockUsageLocator
...
...
cms/templates/edit_subsection.html
View file @
229f3522
<
%
inherit
file=
"base.html"
/>
<
%
inherit
file=
"base.html"
/>
<
%!
<
%!
import
logging
import
logging
from
xmodule
.
util
.
date_utils
import
get_default_time_display
,
almost_same_datetime
from
util
.
date_utils
import
get_default_time_display
,
almost_same_datetime
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
%
>
%
>
...
...
cms/templates/overview.html
View file @
229f3522
<
%
inherit
file=
"base.html"
/>
<
%
inherit
file=
"base.html"
/>
<
%!
<
%!
import
logging
import
logging
from
xmodule
.
util
import
date_utils
from
util
.
date_utils
import
get_default_time_display
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
xmodule
.
modulestore
.
django
import
loc_mapper
from
xmodule
.
modulestore
.
django
import
loc_mapper
...
@@ -188,7 +188,7 @@ require(["domReady!", "jquery", "js/models/location", "js/models/section", "js/v
...
@@ -188,7 +188,7 @@ require(["domReady!", "jquery", "js/models/location", "js/models/section", "js/v
<a
href=
"#"
class=
"edit-release-date action"
data-date=
""
data-time=
""
data-locator=
"${section_locator}"
><i
class=
"icon-time"
></i>
<span
class=
"sr"
>
${_("Schedule")}
</span></a>
<a
href=
"#"
class=
"edit-release-date action"
data-date=
""
data-time=
""
data-locator=
"${section_locator}"
><i
class=
"icon-time"
></i>
<span
class=
"sr"
>
${_("Schedule")}
</span></a>
%else:
%else:
<span
class=
"published-status"
><strong>
${_("Release date:")}
</strong>
<span
class=
"published-status"
><strong>
${_("Release date:")}
</strong>
${
date_utils.
get_default_time_display(section.start)}
</span>
${get_default_time_display(section.start)}
</span>
<a
href=
"#"
class=
"edit-release-date action"
data-date=
"${start_date_str}"
data-time=
"${start_time_str}"
data-locator=
"${section_locator}"
><i
class=
"icon-time"
></i>
<span
class=
"sr"
>
${_("Edit section release date")}
</span></a>
<a
href=
"#"
class=
"edit-release-date action"
data-date=
"${start_date_str}"
data-time=
"${start_time_str}"
data-locator=
"${section_locator}"
><i
class=
"icon-time"
></i>
<span
class=
"sr"
>
${_("Edit section release date")}
</span></a>
%endif
%endif
</div>
</div>
...
...
common/
lib/xmodule/xmodule
/util/date_utils.py
→
common/
djangoapps
/util/date_utils.py
View file @
229f3522
File moved
common/
lib/xmodule/xmodule
/tests/test_date_utils.py
→
common/
djangoapps/util
/tests/test_date_utils.py
View file @
229f3522
"""Tests for
xmodule.
util.date_utils"""
"""Tests for util.date_utils"""
from
nose.tools
import
assert_equals
,
assert_false
# pylint: disable=E0611
from
xmodule.util.date_utils
import
get_default_time_display
,
get_time_display
,
almost_same_datetime
from
datetime
import
datetime
,
timedelta
,
tzinfo
from
datetime
import
datetime
,
timedelta
,
tzinfo
from
nose.tools
import
assert_equals
,
assert_false
# pylint: disable=E0611
from
pytz
import
UTC
,
timezone
from
pytz
import
UTC
,
timezone
from
util.date_utils
import
get_default_time_display
,
get_time_display
,
almost_same_datetime
def
test_get_default_time_display
():
def
test_get_default_time_display
():
assert_equals
(
""
,
get_default_time_display
(
None
))
assert_equals
(
""
,
get_default_time_display
(
None
))
...
...
lms/templates/courseware/accordion.html
View file @
229f3522
<
%!
<
%!
from
django
.
core
.
urlresolvers
import
reverse
from
django
.
core
.
urlresolvers
import
reverse
from
xmodule
.
util
.
date_utils
import
get_time_display
from
util
.
date_utils
import
get_time_display
from
django
.
utils
.
translation
import
ugettext
as
_
from
django
.
utils
.
translation
import
ugettext
as
_
from
django
.
conf
import
settings
from
django
.
conf
import
settings
%
>
%
>
...
...
lms/templates/courseware/progress.html
View file @
229f3522
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
%
>
%
>
<
%!
<
%!
from
xmodule
.
util
.
date_utils
import
get_time_display
from
util
.
date_utils
import
get_time_display
from
django
.
conf
import
settings
from
django
.
conf
import
settings
%
>
%
>
...
...
lms/templates/folditbasic.html
View file @
229f3522
<
%!
from
django
.
utils
.
translation
import
ugettext
as
_
%
>
<
%!
from
django
.
utils
.
translation
import
ugettext
as
_
%
>
<
%!
<
%!
from
xmodule
.
util
.
date_utils
import
get_default_time_display
from
util
.
date_utils
import
get_default_time_display
%
>
%
>
<div
class=
"folditbasic"
>
<div
class=
"folditbasic"
>
<p><strong>
${_("Due:")}
</strong>
${get_default_time_display(due)}
<p><strong>
${_("Due:")}
</strong>
${get_default_time_display(due)}
...
...
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