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
b6e41dc0
Commit
b6e41dc0
authored
Aug 17, 2012
by
ichuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix view_tracking_log to show proper timezone
parent
a6c6d0f4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletions
+8
-1
common/djangoapps/track/views.py
+7
-0
lms/templates/tracking_log.html
+1
-1
No files found.
common/djangoapps/track/views.py
View file @
b6e41dc0
import
json
import
logging
import
os
import
pytz
import
datetime
import
dateutil.parser
...
...
@@ -106,5 +107,11 @@ def view_tracking_log(request,args=''):
if
username
:
record_instances
=
record_instances
.
filter
(
username
=
username
)
record_instances
=
record_instances
[
0
:
nlen
]
# fix dtstamp
fmt
=
'
%
a
%
d-
%
b-
%
y
%
H:
%
M:
%
S'
# "%Y-%m-%d %H:%M:%S %Z%z"
for
rinst
in
record_instances
:
rinst
.
dtstr
=
rinst
.
time
.
replace
(
tzinfo
=
pytz
.
utc
)
.
astimezone
(
pytz
.
timezone
(
'US/Eastern'
))
.
strftime
(
fmt
)
return
render_to_response
(
'tracking_log.html'
,{
'records'
:
record_instances
})
lms/templates/tracking_log.html
View file @
b6e41dc0
...
...
@@ -3,7 +3,7 @@
<table
border=
"1"
><tr><th>
datetime
</th><th>
username
</th><th>
ipaddr
</th><th>
source
</th><th>
type
</th></tr>
% for rec in records:
<tr>
<td>
${rec.
time
}
</td>
<td>
${rec.
dtstr
}
</td>
<td>
${rec.username}
</td>
<td>
${rec.ip}
</td>
<td>
${rec.event_source}
</td>
...
...
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