From d2648ecbf26d35aad55121c557d0d5e8ea84bb9b Mon Sep 17 00:00:00 2001 From: Brandon Bodine Date: Thu, 12 Sep 2024 19:21:45 -0600 Subject: [PATCH 1/2] feat: remove transcript content from course-transcripts endpoint --- edxval/api.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/edxval/api.py b/edxval/api.py index 2ac564fd..9406abdc 100644 --- a/edxval/api.py +++ b/edxval/api.py @@ -735,7 +735,7 @@ def get_videos_for_course(course_id, sort_field=None, sort_dir=SortDirection.asc def get_transcript_details_for_course(course_id): """ - Gets all the transcript for a course and bundles up data. + Get all the transcripts for a course and return details. Args: course_id (String) @@ -746,7 +746,6 @@ def get_transcript_details_for_course(course_id): 'edx_video_id': { 'lang_code': { 'provider': 'What the provider is', - 'content': 'Content of the transcript', 'file_format': 'file format', 'url': 'location of the file', 'name': 'name of the file', @@ -766,7 +765,6 @@ def get_transcript_details_for_course(course_id): for video_transcript in video_transcripts: transcript_data[video_transcript.language_code] = { 'provider': video_transcript.provider, - 'content': video_transcript.transcript.file.read(), 'file_format': video_transcript.file_format, 'url': video_transcript.transcript.url, 'name': video_transcript.transcript.name, From 6df05a1d3a323633a33259634e633c6df48e326d Mon Sep 17 00:00:00 2001 From: Brandon Bodine Date: Thu, 12 Sep 2024 19:28:17 -0600 Subject: [PATCH 2/2] chore: update tests --- edxval/tests/test_api.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/edxval/tests/test_api.py b/edxval/tests/test_api.py index 5165098d..e1dfe0fe 100644 --- a/edxval/tests/test_api.py +++ b/edxval/tests/test_api.py @@ -3159,14 +3159,12 @@ def test_get_transcript_details_for_course(self): course_transcript = api.get_transcript_details_for_course(self.course_id1) self.assertEqual(course_transcript['super-soaker']['en']['provider'], TranscriptProviderType.THREE_PLAY_MEDIA) - self.assertIn('content', course_transcript['super-soaker']['en']) self.assertEqual(course_transcript['super-soaker']['en']['file_format'], utils.TranscriptFormat.SRT) self.assertIn('url', course_transcript['super-soaker']['en']) self.assertIn('name', course_transcript['super-soaker']['en']) self.assertIn('size', course_transcript['super-soaker']['en']) self.assertEqual(course_transcript['super-soaker']['fr']['provider'], TranscriptProviderType.CIELO24) - self.assertIn('content', course_transcript['super-soaker']['fr']) self.assertEqual(course_transcript['super-soaker']['en']['file_format'], utils.TranscriptFormat.SRT) self.assertIn('url', course_transcript['super-soaker']['fr']) self.assertIn('name', course_transcript['super-soaker']['fr'])