Skip to content

Commit

Permalink
feat: add csv export support to courses and learners APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
shadinaif committed Dec 15, 2024
1 parent 94723c4 commit 35af037
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions futurex_openedx_extensions/dashboard/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def get(self, request: Any, *args: Any, **kwargs: Any) -> Response | JsonRespons
return JsonResponse(result)


class LearnersView(FXViewRoleInfoMixin, ListAPIView):
class LearnersView(ExportCSVMixin, FXViewRoleInfoMixin, ListAPIView):
"""View to get the list of learners"""
authentication_classes = default_auth_classes
permission_classes = [FXHasTenantCourseAccess]
Expand All @@ -206,7 +206,7 @@ def get_queryset(self) -> QuerySet:
)


class CoursesView(FXViewRoleInfoMixin, ListAPIView):
class CoursesView(ExportCSVMixin, FXViewRoleInfoMixin, ListAPIView):
"""View to get the list of courses"""
authentication_classes = default_auth_classes
permission_classes = [FXHasTenantCourseAccess]
Expand Down Expand Up @@ -443,7 +443,7 @@ def get_serializer_context(self) -> Dict[str, Any]:
return context


class LearnersEnrollmentView(FXViewRoleInfoMixin, ListAPIView):
class LearnersEnrollmentView(ExportCSVMixin, FXViewRoleInfoMixin, ListAPIView):
"""View to get the list of learners for a course"""
serializer_class = serializers.LearnerEnrollmentSerializer
permission_classes = [FXHasTenantCourseAccess]
Expand Down

0 comments on commit 35af037

Please sign in to comment.