@ -24,6 +24,12 @@ class TreeView(APIView):
return Response("Course doesn't exist", status=404)
res = CourseTreeSerializer(course).data
if request.user.is_authenticated():
res['active_id'] = False
res['extra_privilege'] = []
return res
try:
res['active_id'] = Progress.objects.get(course=course, user=request.user).active_obj.id
except Progress.DoesNotExist: