Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

Commit

Permalink
Merge pull request #31 from edx/no-forum-data
Browse files Browse the repository at this point in the history
Removed forum data from activity resource
  • Loading branch information
clintonb committed Sep 26, 2014
2 parents 4cd7450 + c4ff28e commit 0d6266f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
7 changes: 3 additions & 4 deletions analytics_data_api/v0/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
9 changes: 5 additions & 4 deletions analytics_data_api/v0/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ def setUp(self):
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)
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 0d6266f

Please sign in to comment.