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
29d01257
Commit
29d01257
authored
Jun 29, 2016
by
muzaffaryousaf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Management command to fetch courses that are using NumPy, pyplot in CAPA problems.
parent
4064d03c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
lms/djangoapps/courseware/management/commands/problems_using_numpy.py
+31
-0
No files found.
lms/djangoapps/courseware/management/commands/problems_using_numpy.py
0 → 100644
View file @
29d01257
# pylint: disable=missing-docstring
from
django.core.management.base
import
BaseCommand
from
request_cache.middleware
import
RequestCache
from
xmodule.modulestore.django
import
modulestore
class
Command
(
BaseCommand
):
"""
Command to fetch courses that are using NumPy or matplotlib.pyplot in CAPA problems.
"""
def
handle
(
self
,
*
args
,
**
options
):
store
=
modulestore
()
courses_list
=
[]
course_ids
=
[
course_summary
.
id
for
course_summary
in
store
.
get_course_summaries
()]
for
course_id
in
course_ids
:
problems
=
store
.
get_items
(
course_id
,
qualifiers
=
{
'category'
:
'problem'
})
for
problem
in
problems
:
if
"numpy"
in
problem
.
data
or
"pyplot"
in
problem
.
data
:
if
course_id
not
in
courses_list
:
courses_list
.
append
(
course_id
)
RequestCache
.
clear_request_cache
()
import
sys
print
>>
sys
.
stderr
,
courses_list
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