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
131e3120
Commit
131e3120
authored
Mar 13, 2013
by
Calen Pennington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Try to make psychometrics work with new storage model code
parent
a9c5a638
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
lms/djangoapps/courseware/module_render.py
+2
-2
lms/djangoapps/psychometrics/psychoanalyze.py
+8
-2
No files found.
lms/djangoapps/courseware/module_render.py
View file @
131e3120
...
...
@@ -297,9 +297,9 @@ def get_module_for_descriptor(user, request, descriptor, model_data_cache, cours
# pass position specified in URL to module through ModuleSystem
system
.
set
(
'position'
,
position
)
system
.
set
(
'DEBUG'
,
settings
.
DEBUG
)
if
settings
.
MITX_FEATURES
.
get
(
'ENABLE_PSYCHOMETRICS'
)
and
instance_module
is
not
None
:
if
settings
.
MITX_FEATURES
.
get
(
'ENABLE_PSYCHOMETRICS'
):
system
.
set
(
'psychometrics_handler'
,
# set callback for updating PsychometricsData
make_psychometrics_data_update_handler
(
instance_module
))
make_psychometrics_data_update_handler
(
course_id
,
user
,
descriptor
.
location
.
url
()
))
try
:
module
=
descriptor
.
xmodule
(
system
)
...
...
lms/djangoapps/psychometrics/psychoanalyze.py
View file @
131e3120
...
...
@@ -297,12 +297,18 @@ def generate_plots_for_problem(problem):
#-----------------------------------------------------------------------------
def
make_psychometrics_data_update_handler
(
studentmodule
):
def
make_psychometrics_data_update_handler
(
course_id
,
user
,
module_state_key
):
"""
Construct and return a procedure which may be called to update
the PsychometricsData instance for the given StudentModule instance.
"""
sm
=
studentmodule
sm
=
studentmodule
.
objects
.
get_or_create
(
course_id
=
course_id
,
student
=
user
,
module_state_key
=
module_state_key
,
defaults
=
{
'state'
:
'{}'
,
'module_type'
:
'problem'
},
)
try
:
pmd
=
PsychometricData
.
objects
.
using
(
db
)
.
get
(
studentmodule
=
sm
)
except
PsychometricData
.
DoesNotExist
:
...
...
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