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
8c0503d3
Commit
8c0503d3
authored
Apr 10, 2012
by
Piotr Mitros
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added comments
parent
c06c6104
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletions
+9
-1
djangoapps/courseware/module_render.py
+9
-1
No files found.
djangoapps/courseware/module_render.py
View file @
8c0503d3
...
...
@@ -41,6 +41,12 @@ def object_cache(cache, user, module_type, module_id):
return
None
def
make_track_function
(
request
):
''' We want the capa problem (and other modules) to be able to
track/log what happens inside them without adding dependencies on
Django or the rest of the codebase. We do this by passing a
tracking function to them. This generates a closure for each request
that gives a clean interface on both sides.
'''
def
f
(
event_type
,
event
):
return
track
.
views
.
server_track
(
request
,
event_type
,
event
,
page
=
'x_module'
)
return
f
...
...
@@ -88,7 +94,9 @@ def modx_dispatch(request, module=None, dispatch=None, id=None):
return
HttpResponse
(
ajax_return
)
def
grade_histogram
(
module_id
):
print
module_id
''' Print out a histogram of grades on a given problem.
Part of staff member debug info.
'''
from
django.db
import
connection
,
transaction
cursor
=
connection
.
cursor
()
...
...
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