Changed lookup logic to consider language learner-1995

This commit is contained in:
McKenzie Welter
2017-09-15 10:23:41 -04:00
committed by Michael LoTurco
parent f94558f464
commit 190b2c36fe
7 changed files with 409 additions and 73 deletions

View File

@@ -88,6 +88,16 @@ def get_course_organizations(course_id):
return organizations_api.get_course_organizations(course_id)
def get_course_organization_id(course_id):
"""
Returns organization id for course or None if the course is not linked to an org
"""
course_organization = get_course_organizations(course_id)
if course_organization:
return course_organization[0]['id']
return None
def organizations_enabled():
"""
Returns boolean indication if organizations app is enabled on not.