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
09bcb807
Commit
09bcb807
authored
Jun 30, 2014
by
David Adams
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #62 from Stanford-Online/dcadams/metrics_problem_types
Add LTI type to metrics tab grade reports
parents
27d44eaf
24c5bbda
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
lms/djangoapps/class_dashboard/dashboard_data.py
+9
-5
No files found.
lms/djangoapps/class_dashboard/dashboard_data.py
View file @
09bcb807
...
@@ -16,6 +16,10 @@ from xmodule.modulestore import Location
...
@@ -16,6 +16,10 @@ from xmodule.modulestore import Location
# Used to limit the length of list displayed to the screen.
# Used to limit the length of list displayed to the screen.
MAX_SCREEN_LIST_LENGTH
=
250
MAX_SCREEN_LIST_LENGTH
=
250
PROB_TYPE_LIST
=
[
'problem'
,
'lti'
,
]
def
get_problem_grade_distribution
(
course_id
):
def
get_problem_grade_distribution
(
course_id
):
"""
"""
...
@@ -35,7 +39,7 @@ def get_problem_grade_distribution(course_id):
...
@@ -35,7 +39,7 @@ def get_problem_grade_distribution(course_id):
db_query
=
models
.
StudentModule
.
objects
.
filter
(
db_query
=
models
.
StudentModule
.
objects
.
filter
(
course_id__exact
=
course_id
,
course_id__exact
=
course_id
,
grade__isnull
=
False
,
grade__isnull
=
False
,
module_type__
exact
=
"problem"
,
module_type__
in
=
PROB_TYPE_LIST
,
)
.
values
(
'module_state_key'
,
'grade'
,
'max_grade'
)
.
annotate
(
count_grade
=
Count
(
'grade'
))
)
.
values
(
'module_state_key'
,
'grade'
,
'max_grade'
)
.
annotate
(
count_grade
=
Count
(
'grade'
))
prob_grade_distrib
=
{}
prob_grade_distrib
=
{}
...
@@ -108,7 +112,7 @@ def get_problem_set_grade_distrib(course_id, problem_set):
...
@@ -108,7 +112,7 @@ def get_problem_set_grade_distrib(course_id, problem_set):
db_query
=
models
.
StudentModule
.
objects
.
filter
(
db_query
=
models
.
StudentModule
.
objects
.
filter
(
course_id__exact
=
course_id
,
course_id__exact
=
course_id
,
grade__isnull
=
False
,
grade__isnull
=
False
,
module_type__
exact
=
"problem"
,
module_type__
in
=
PROB_TYPE_LIST
,
module_state_key__in
=
problem_set
,
module_state_key__in
=
problem_set
,
)
.
values
(
)
.
values
(
'module_state_key'
,
'module_state_key'
,
...
@@ -168,7 +172,7 @@ def get_d3_problem_grade_distrib(course_id):
...
@@ -168,7 +172,7 @@ def get_d3_problem_grade_distrib(course_id):
for
child
in
unit
.
get_children
():
for
child
in
unit
.
get_children
():
# Student data is at the problem level
# Student data is at the problem level
if
child
.
location
.
category
==
'problem'
:
if
child
.
location
.
category
in
PROB_TYPE_LIST
:
c_problem
+=
1
c_problem
+=
1
stack_data
=
[]
stack_data
=
[]
...
@@ -325,7 +329,7 @@ def get_d3_section_grade_distrib(course_id, section):
...
@@ -325,7 +329,7 @@ def get_d3_section_grade_distrib(course_id, section):
c_unit
+=
1
c_unit
+=
1
c_problem
=
0
c_problem
=
0
for
child
in
unit
.
get_children
():
for
child
in
unit
.
get_children
():
if
(
child
.
location
.
category
==
'problem'
)
:
if
child
.
location
.
category
in
PROB_TYPE_LIST
:
c_problem
+=
1
c_problem
+=
1
problem_set
.
append
(
child
.
location
)
problem_set
.
append
(
child
.
location
)
problem_info
[
child
.
location
]
=
{
problem_info
[
child
.
location
]
=
{
...
@@ -491,7 +495,7 @@ def get_students_problem_grades(request, csv=False):
...
@@ -491,7 +495,7 @@ def get_students_problem_grades(request, csv=False):
# Query for "problem grades" students
# Query for "problem grades" students
students
=
models
.
StudentModule
.
objects
.
select_related
(
'student'
)
.
filter
(
students
=
models
.
StudentModule
.
objects
.
select_related
(
'student'
)
.
filter
(
module_state_key
=
module_state_key
,
module_state_key
=
module_state_key
,
module_type__
exact
=
'problem'
,
module_type__
in
=
PROB_TYPE_LIST
,
grade__isnull
=
False
,
grade__isnull
=
False
,
)
.
values
(
'student__username'
,
'student__profile__name'
,
'grade'
,
'max_grade'
)
.
order_by
(
'student__profile__name'
)
)
.
values
(
'student__username'
,
'student__profile__name'
,
'grade'
,
'max_grade'
)
.
order_by
(
'student__profile__name'
)
...
...
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