Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-analytics-data-api
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-analytics-data-api
Commits
0d6f8e42
Commit
0d6f8e42
authored
Apr 11, 2016
by
Dennis Jen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #113 from edx/dsjen/generate-data-options
Moved default load data options to make_option.
parents
05ee144f
3d5c6709
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
analytics_data_api/management/commands/generate_fake_course_data.py
+4
-4
No files found.
analytics_data_api/management/commands/generate_fake_course_data.py
View file @
0d6f8e42
...
@@ -34,9 +34,9 @@ class Command(BaseCommand):
...
@@ -34,9 +34,9 @@ class Command(BaseCommand):
make_option
(
'-n'
,
'--num-weeks'
,
action
=
'store'
,
type
=
"int"
,
dest
=
'num_weeks'
,
make_option
(
'-n'
,
'--num-weeks'
,
action
=
'store'
,
type
=
"int"
,
dest
=
'num_weeks'
,
help
=
'Number of weeks worth of data to generate.'
),
help
=
'Number of weeks worth of data to generate.'
),
make_option
(
'-c'
,
'--course_id'
,
action
=
'store'
,
type
=
'string'
,
dest
=
'course_id'
,
make_option
(
'-c'
,
'--course_id'
,
action
=
'store'
,
type
=
'string'
,
dest
=
'course_id'
,
help
=
'Course ID for which to generate fake data'
),
default
=
'edX/DemoX/Demo_Course'
,
help
=
'Course ID for which to generate fake data'
),
make_option
(
'-u'
,
'--username'
,
action
=
'store'
,
type
=
'string'
,
dest
=
'username'
,
make_option
(
'-u'
,
'--username'
,
action
=
'store'
,
type
=
'string'
,
dest
=
'username'
,
help
=
'Username for which to generate fake data'
),
default
=
'ed_xavier'
,
help
=
'Username for which to generate fake data'
),
)
)
def
generate_daily_data
(
self
,
course_id
,
start_date
,
end_date
):
def
generate_daily_data
(
self
,
course_id
,
start_date
,
end_date
):
...
@@ -226,8 +226,8 @@ class Command(BaseCommand):
...
@@ -226,8 +226,8 @@ class Command(BaseCommand):
range_type
=
'high'
,
low_value
=
high_floor
,
high_value
=
max_value
)
range_type
=
'high'
,
low_value
=
high_floor
,
high_value
=
max_value
)
def
handle
(
self
,
*
args
,
**
options
):
def
handle
(
self
,
*
args
,
**
options
):
course_id
=
options
.
get
(
'course_id'
,
'edX/DemoX/Demo_Course'
)
course_id
=
options
[
'course_id'
]
username
=
options
.
get
(
'username'
,
'ed_xavier'
)
username
=
options
[
'username'
]
video_id
=
'0fac49ba'
video_id
=
'0fac49ba'
video_module_id
=
'i4x-edX-DemoX-video-5c90cffecd9b48b188cbfea176bf7fe9'
video_module_id
=
'i4x-edX-DemoX-video-5c90cffecd9b48b188cbfea176bf7fe9'
start_date
=
datetime
.
datetime
(
year
=
2015
,
month
=
1
,
day
=
1
,
tzinfo
=
timezone
.
utc
)
start_date
=
datetime
.
datetime
(
year
=
2015
,
month
=
1
,
day
=
1
,
tzinfo
=
timezone
.
utc
)
...
...
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