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
0e529617
Commit
0e529617
authored
Aug 01, 2014
by
Clinton Blackburn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated Fake Data Generator
- Use capitalized activity types - Replace any with active
parent
dcf95bb4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
analytics_data_api/management/commands/generate_fake_course_data.py
+2
-2
No files found.
analytics_data_api/management/commands/generate_fake_course_data.py
View file @
0e529617
...
...
@@ -106,7 +106,7 @@ class Command(BaseCommand):
logger
.
info
(
"Done!"
)
def
generate_weekly_data
(
self
,
course_id
,
start_date
,
end_date
):
activity_types
=
[
'
played_video'
,
'attempted_problem'
,
'posted_forum
'
]
activity_types
=
[
'
PLAYED_VIDEO'
,
'ATTEMPTED_PROBLEM'
,
'POSTED_FORUM
'
]
start
=
start_date
models
.
CourseActivityByWeek
.
objects
.
all
()
.
delete
()
...
...
@@ -124,7 +124,7 @@ class Command(BaseCommand):
models
.
CourseActivityByWeek
.
objects
.
create
(
course_id
=
course_id
,
activity_type
=
activity_type
,
count
=
count
,
interval_start
=
start
,
interval_end
=
end
)
models
.
CourseActivityByWeek
.
objects
.
create
(
course_id
=
course_id
,
activity_type
=
'
any
'
,
count
=
active_students
,
models
.
CourseActivityByWeek
.
objects
.
create
(
course_id
=
course_id
,
activity_type
=
'
ACTIVE
'
,
count
=
active_students
,
interval_start
=
start
,
interval_end
=
end
)
start
=
end
...
...
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