Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-ora2
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-ora2
Commits
42119c6a
Commit
42119c6a
authored
Mar 24, 2014
by
Brian Talbot
Committed by
Stephen Sanchez
Mar 25, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding 'time until' copy into due date UI
parent
0a357651
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
15 deletions
+20
-15
apps/openassessment/templates/openassessmentblock/peer/oa_peer_assessment.html
+6
-1
apps/openassessment/templates/openassessmentblock/self/oa_self_assessment.html
+6
-1
apps/openassessment/xblock/openassessmentblock.py
+8
-13
No files found.
apps/openassessment/templates/openassessmentblock/peer/oa_peer_assessment.html
View file @
42119c6a
...
...
@@ -12,7 +12,12 @@
<span
class=
"wrapper--copy"
>
<span
class=
"step__label"
>
Assess Peers
</span>
{% if peer_due %}
<span
class=
"step__deadline"
>
due
<span
class=
"date"
>
{{ peer_due }}
</span></span>
<span
class=
"step__deadline"
>
due
<span
class=
"date"
>
{{ peer_due }}
(in {{ peer_due|timeuntil }})
</span>
</span>
{% endif %}
</span>
</h2>
...
...
apps/openassessment/templates/openassessmentblock/self/oa_self_assessment.html
View file @
42119c6a
...
...
@@ -13,7 +13,12 @@
<span
class=
"wrapper--copy"
>
<span
class=
"step__label"
>
Assess Yourself
</span>
{% if self_due %}
<span
class=
"step__deadline"
>
due
<span
class=
"date"
>
{{ self_due }}
</span></span>
<span
class=
"step__deadline"
>
due
<span
class=
"date"
>
{{ self_due }}
(in {{ self_due|timeuntil }})
</span>
</span>
{% endif %}
</span>
</h2>
...
...
apps/openassessment/xblock/openassessmentblock.py
View file @
42119c6a
...
...
@@ -380,25 +380,20 @@ class OpenAssessmentBlock(
context
=
Context
(
context_dict
)
return
Response
(
template
.
render
(
context
),
content_type
=
'application/html'
,
charset
=
'UTF-8'
)
def
format_date_string
(
self
,
date
):
"""Takes a date string, and formats it to be a user facing date.
Format a date string to be user facing.
"""
return
dateutil
.
parser
.
parse
(
unicode
(
date
)
)
.
replace
(
tzinfo
=
pytz
.
utc
)
.
strftime
(
DATE_FORMAT
)
def
format_datetime_string
(
self
,
datetime
):
"""Takes a datetime string, and formats it to be a user facing time.
Format a datetime string to be user facing.
Args:
datetime (str): A ISO formatted Datetime String, to be converted to
a datetime object with UTC timezone.
Returns:
datetime with UTC timezone from the given string.
"""
return
dateutil
.
parser
.
parse
(
unicode
(
datetime
)
)
.
replace
(
tzinfo
=
pytz
.
utc
)
.
strftime
(
DATETIME_FORMAT
)
return
dateutil
.
parser
.
parse
(
unicode
(
datetime
))
.
replace
(
tzinfo
=
pytz
.
utc
)
def
add_xml_to_node
(
self
,
node
):
"""
...
...
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