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
0d6266f0
Commit
0d6266f0
authored
Sep 26, 2014
by
Clinton Blackburn
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #31 from edx/no-forum-data
Removed forum data from activity resource
parents
4cd74507
c4ff28e7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
analytics_data_api/v0/serializers.py
+3
-4
analytics_data_api/v0/tests/test_views.py
+5
-4
No files found.
analytics_data_api/v0/serializers.py
View file @
0d6266f0
...
...
@@ -122,11 +122,10 @@ class CourseActivityWeeklySerializer(serializers.ModelSerializer):
any
=
serializers
.
IntegerField
(
required
=
False
)
attempted_problem
=
serializers
.
IntegerField
(
required
=
False
)
played_video
=
serializers
.
IntegerField
(
required
=
False
)
posted_forum
=
serializers
.
IntegerField
(
required
=
False
)
#
posted_forum = serializers.IntegerField(required=False)
created
=
serializers
.
DateTimeField
(
format
=
settings
.
DATETIME_FORMAT
)
class
Meta
(
object
):
model
=
CourseActivityWeekly
fields
=
(
'interval_start'
,
'interval_end'
,
'course_id'
,
'any'
,
'attempted_problem'
,
'played_video'
,
'posted_forum'
,
'created'
)
# TODO: Add 'posted_forum' here to restore forum data
fields
=
(
'interval_start'
,
'interval_end'
,
'course_id'
,
'any'
,
'attempted_problem'
,
'played_video'
,
'created'
)
analytics_data_api/v0/tests/test_views.py
View file @
0d6266f0
...
...
@@ -135,9 +135,9 @@ class CourseActivityLastWeekTest(TestCaseWithAuthentication):
self
.
course_id
=
'edX/DemoX/Demo_Course'
interval_start
=
datetime
.
datetime
(
2014
,
1
,
1
,
tzinfo
=
pytz
.
utc
)
interval_end
=
interval_start
+
datetime
.
timedelta
(
weeks
=
1
)
G
(
models
.
CourseActivityWeekly
,
course_id
=
self
.
course_id
,
interval_start
=
interval_start
,
interval_end
=
interval_end
,
activity_type
=
'POSTED_FORUM'
,
count
=
100
)
#
G(models.CourseActivityWeekly, course_id=self.course_id, interval_start=interval_start,
#
interval_end=interval_end,
#
activity_type='POSTED_FORUM', count=100)
G
(
models
.
CourseActivityWeekly
,
course_id
=
self
.
course_id
,
interval_start
=
interval_start
,
interval_end
=
interval_end
,
activity_type
=
'ATTEMPTED_PROBLEM'
,
count
=
200
)
...
...
@@ -367,7 +367,8 @@ class CourseActivityWeeklyViewTests(CourseViewTestCaseMixin, TestCaseWithAuthent
path
=
'/activity/'
default_order_by
=
'interval_end'
model
=
CourseActivityWeekly
activity_types
=
[
'ACTIVE'
,
'ATTEMPTED_PROBLEM'
,
'PLAYED_VIDEO'
,
'POSTED_FORUM'
]
# activity_types = ['ACTIVE', 'ATTEMPTED_PROBLEM', 'PLAYED_VIDEO', 'POSTED_FORUM']
activity_types
=
[
'ACTIVE'
,
'ATTEMPTED_PROBLEM'
,
'PLAYED_VIDEO'
]
def
setUp
(
self
):
super
(
CourseActivityWeeklyViewTests
,
self
)
.
setUp
()
...
...
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