Files
edx-platform/cms/djangoapps/models/settings/course_faculty.py
Don Mitchell 50d7e6160e Move models from common to cms.
Add unit tests.
2012-12-03 12:20:15 -05:00

22 lines
753 B
Python

from xmodule.modulestore import Location
class CourseFaculty:
def __init__(self, location):
if not isinstance(location, Location):
location = Location(location)
# course_location is used so that updates know where to get the relevant data
self.course_location = location
self.first_name = ""
self.last_name = ""
self.photo = None
self.bio = ""
@classmethod
def fetch(cls, course_location):
"""
Fetch a list of faculty for the course
"""
if not isinstance(course_location, Location):
course_location = Location(course_location)
# Must always have at least one faculty member (possibly empty)