Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
9c1dc2c0
Commit
9c1dc2c0
authored
7 years ago
by
Kshitij Sobti
Browse files
Options
Downloads
Patches
Plain Diff
Include title and location in problem response sheet
parent
e322a3a7
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lms/djangoapps/instructor_task/tasks_helper/grades.py
+21
-7
21 additions, 7 deletions
lms/djangoapps/instructor_task/tasks_helper/grades.py
with
21 additions
and
7 deletions
lms/djangoapps/instructor_task/tasks_helper/grades.py
+
21
−
7
View file @
9c1dc2c0
...
...
@@ -552,6 +552,19 @@ class ProblemGradeReport(object):
class
ProblemResponses
(
object
):
@classmethod
def
_build_problem_list
(
cls
,
course_blocks
,
root
,
path
=
None
):
if
path
is
None
:
path
=
[
course_blocks
.
get_xblock_field
(
root
,
'
display_name
'
)]
for
block
in
course_blocks
.
get_children
(
root
):
display_name
=
course_blocks
.
get_xblock_field
(
block
,
'
display_name
'
)
if
block
.
block_type
==
'
problem
'
:
yield
display_name
,
path
,
block
else
:
for
result
in
ProblemResponses
.
_build_problem_list
(
course_blocks
,
block
,
path
+
[
display_name
]):
yield
result
@classmethod
def
generate
(
cls
,
_xmodule_instance_args
,
_entry_id
,
course_id
,
task_input
,
action_name
):
"""
...
...
@@ -575,16 +588,17 @@ class ProblemResponses(object):
student_data
=
[]
max_count
=
settings
.
FEATURES
.
get
(
'
MAX_PROBLEM_RESPONSES_COUNT
'
)
for
block
in
course_blocks
:
if
block
.
block_type
==
'
problem
'
:
problem_responses
=
list_problem_responses
(
course_id
,
block
,
max_count
)
student_data
+=
problem_responses
max_count
-=
len
(
problem_responses
)
for
title
,
path
,
block
in
ProblemResponses
.
_build_problem_list
(
course_blocks
,
problem_key
):
problem_responses
=
list_problem_responses
(
course_id
,
block
,
max_count
)
student_data
+=
problem_responses
for
response
in
problem_responses
:
response
[
'
title
'
]
=
title
response
[
'
location
'
]
=
'
>
'
.
join
(
path
)
max_count
-=
len
(
problem_responses
)
if
max_count
<=
0
:
break
features
=
[
'
username
'
,
'
state
'
]
features
=
[
'
username
'
,
'
title
'
,
'
location
'
,
'
state
'
]
header
,
rows
=
format_dictlist
(
student_data
,
features
)
task_progress
.
attempted
=
task_progress
.
succeeded
=
len
(
rows
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment