'Retrieve list of all enrollment attributes.
Args:
enrollment(CourseEnrollment): \'CourseEnrollment\' for which list is to retrieve
Returns: list
Example:
>>> CourseEnrollmentAttribute.get_enrollment_attributes(CourseEnrollment)
"namespace": "credit",
"name": "provider_id",
"value": "hogwarts",'

@classmethod
def get_enrollment_attributes(cls, enrollment):

    return [{'namespace': attribute.namespace, 'name': attribute.name, 'value': attribute.value} for attribute in cls.objects.filter(enrollment=enrollment)]
