'Check the status of the specified task'

def get(self, request, course_id):

    courselike_key = CourseKey.from_string(course_id)
    if (not has_course_author_access(request.user, courselike_key)):
        return self.make_error_response(status_code=status.HTTP_403_FORBIDDEN, developer_message='The    user    requested    does    not    have    the    required    permissions.', error_code='user_mismatch')
    try:
        task_id = request.GET['task_id']
        filename = request.GET['filename']
        args = {u'course_key_string': course_id, u'archive_name': filename}
        name = CourseImportTask.generate_name(args)
        task_status = UserTaskStatus.objects.filter(name=name, task_id=task_id).first()
        return Response({'state': task_status.state})
    except Exception as e:
        return self.make_error_response(status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, developer_message=str(e), error_code='internal_error')
