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
11525556
Commit
11525556
authored
Sep 17, 2014
by
Sarina Canelake
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5253 from mitocw/bdero/fix-psychometrics-opaque-keys
Fixed problems with psychometrics (Opaque Keys)
parents
1cd2d550
efa44003
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
lms/djangoapps/psychometrics/management/commands/init_psychometrics.py
+2
-2
lms/djangoapps/psychometrics/psychoanalyze.py
+12
-2
No files found.
lms/djangoapps/psychometrics/management/commands/init_psychometrics.py
View file @
11525556
...
...
@@ -52,9 +52,9 @@ class Command(BaseCommand):
# get attempt times from tracking log
uname
=
sm
.
student
.
username
tset
=
TrackingLog
.
objects
.
using
(
db
)
.
filter
(
username
=
uname
,
event_type__contains
=
'
save_
problem_check'
)
tset
=
TrackingLog
.
objects
.
using
(
db
)
.
filter
(
username
=
uname
,
event_type__contains
=
'problem_check'
)
tset
=
tset
.
filter
(
event_source
=
'server'
)
tset
=
tset
.
filter
(
event__contains
=
"'
%
s'"
%
u
rl
)
tset
=
tset
.
filter
(
event__contains
=
"'
%
s'"
%
u
sage_key
)
checktimes
=
[
x
.
dtcreated
for
x
in
tset
]
pmd
.
checktimes
=
checktimes
if
not
len
(
checktimes
)
==
pmd
.
attempts
:
...
...
lms/djangoapps/psychometrics/psychoanalyze.py
View file @
11525556
...
...
@@ -10,6 +10,7 @@ import logging
import
json
import
math
import
numpy
as
np
from
opaque_keys.edx.locator
import
BlockUsageLocator
from
scipy.optimize
import
curve_fit
from
django.conf
import
settings
...
...
@@ -129,7 +130,14 @@ def problems_with_psychometric_data(course_id):
'''
pmdset
=
PsychometricData
.
objects
.
using
(
db
)
.
filter
(
studentmodule__course_id
=
course_id
)
plist
=
[
p
[
'studentmodule__module_state_key'
]
for
p
in
pmdset
.
values
(
'studentmodule__module_state_key'
)
.
distinct
()]
problems
=
dict
((
p
,
pmdset
.
filter
(
studentmodule__module_state_key
=
p
)
.
count
())
for
p
in
plist
)
problems
=
dict
(
(
p
,
pmdset
.
filter
(
studentmodule__module_state_key
=
BlockUsageLocator
.
from_string
(
p
)
)
.
count
()
)
for
p
in
plist
)
return
problems
...
...
@@ -138,7 +146,9 @@ def problems_with_psychometric_data(course_id):
def
generate_plots_for_problem
(
problem
):
pmdset
=
PsychometricData
.
objects
.
using
(
db
)
.
filter
(
studentmodule__module_state_key
=
problem
)
pmdset
=
PsychometricData
.
objects
.
using
(
db
)
.
filter
(
studentmodule__module_state_key
=
BlockUsageLocator
.
from_string
(
problem
)
)
nstudents
=
pmdset
.
count
()
msg
=
""
plots
=
[]
...
...
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