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
4216eaf5
Commit
4216eaf5
authored
Nov 05, 2015
by
Chris Dodge
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change 'routing' for some reports which go to potentially backlogged queues
parent
222bdd98
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
lms/djangoapps/instructor_task/tasks.py
+4
-4
lms/djangoapps/instructor_task/tasks_helper.py
+7
-5
No files found.
lms/djangoapps/instructor_task/tasks.py
View file @
4216eaf5
...
...
@@ -204,7 +204,7 @@ def calculate_students_features_csv(entry_id, xmodule_instance_args):
return
run_main_task
(
entry_id
,
task_fn
,
action_name
)
@task
(
base
=
BaseInstructorTask
,
routing_key
=
settings
.
GRADES_DOWNLOAD_ROUTING_KEY
)
# pylint: disable=not-callable
@task
(
base
=
BaseInstructorTask
)
# pylint: disable=not-callable
def
enrollment_report_features_csv
(
entry_id
,
xmodule_instance_args
):
"""
Compute student profile information for a course and upload the
...
...
@@ -216,7 +216,7 @@ def enrollment_report_features_csv(entry_id, xmodule_instance_args):
return
run_main_task
(
entry_id
,
task_fn
,
action_name
)
@task
(
base
=
BaseInstructorTask
,
routing_key
=
settings
.
GRADES_DOWNLOAD_ROUTING_KEY
)
# pylint: disable=not-callable
@task
(
base
=
BaseInstructorTask
)
# pylint: disable=not-callable
def
exec_summary_report_csv
(
entry_id
,
xmodule_instance_args
):
"""
Compute executive summary report for a course and upload the
...
...
@@ -228,7 +228,7 @@ def exec_summary_report_csv(entry_id, xmodule_instance_args):
return
run_main_task
(
entry_id
,
task_fn
,
action_name
)
@task
(
base
=
BaseInstructorTask
,
routing_key
=
settings
.
GRADES_DOWNLOAD_ROUTING_KEY
)
# pylint: disable=not-callable
@task
(
base
=
BaseInstructorTask
)
# pylint: disable=not-callable
def
course_survey_report_csv
(
entry_id
,
xmodule_instance_args
):
"""
Compute the survey report for a course and upload the
...
...
@@ -240,7 +240,7 @@ def course_survey_report_csv(entry_id, xmodule_instance_args):
return
run_main_task
(
entry_id
,
task_fn
,
action_name
)
@task
(
base
=
BaseInstructorTask
,
routing_key
=
settings
.
GRADES_DOWNLOAD_ROUTING_KEY
)
# pylint: disable=not-callable
@task
(
base
=
BaseInstructorTask
)
# pylint: disable=not-callable
def
proctored_exam_results_csv
(
entry_id
,
xmodule_instance_args
):
"""
Compute proctored exam results report for a course and upload the
...
...
lms/djangoapps/instructor_task/tasks_helper.py
View file @
4216eaf5
...
...
@@ -1327,12 +1327,15 @@ def upload_course_survey_report(_xmodule_instance_args, _entry_id, course_id, _t
survey_fields
.
sort
()
user_survey_answers
=
OrderedDict
()
survey_answers_for_course
=
SurveyAnswer
.
objects
.
filter
(
course_key
=
course_id
)
survey_answers_for_course
=
SurveyAnswer
.
objects
.
filter
(
course_key
=
course_id
)
.
select_related
(
'user'
)
for
survey_field_record
in
survey_answers_for_course
:
user_id
=
survey_field_record
.
user
.
id
if
user_id
not
in
user_survey_answers
.
keys
():
user_survey_answers
[
user_id
]
=
{}
user_survey_answers
[
user_id
]
=
{
'username'
:
survey_field_record
.
user
.
username
,
'email'
:
survey_field_record
.
user
.
email
}
user_survey_answers
[
user_id
][
survey_field_record
.
field_name
]
=
survey_field_record
.
field_value
...
...
@@ -1343,9 +1346,8 @@ def upload_course_survey_report(_xmodule_instance_args, _entry_id, course_id, _t
for
user_id
in
user_survey_answers
.
keys
():
row
=
[]
row
.
append
(
user_id
)
user_obj
=
User
.
objects
.
get
(
id
=
user_id
)
row
.
append
(
user_obj
.
username
)
row
.
append
(
user_obj
.
email
)
row
.
append
(
user_survey_answers
[
user_id
]
.
get
(
'username'
,
''
))
row
.
append
(
user_survey_answers
[
user_id
]
.
get
(
'email'
,
''
))
for
survey_field
in
survey_fields
:
row
.
append
(
user_survey_answers
[
user_id
]
.
get
(
survey_field
,
''
))
csv_rows
.
append
(
row
)
...
...
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