refactored api resource map and added total to search query

This commit is contained in:
Arthur Barrett
2013-05-08 14:09:29 -04:00
parent 894cfd1f48
commit 0f70b0aa8a
2 changed files with 83 additions and 52 deletions

View File

@@ -1,5 +1,7 @@
# TODO: make a separate policy setting to enable/disable notes.
def notes_enabled_for_course(course):
''' Returns True if notes are enabled for the course, False otherwise. '''
'''
Returns True if the notes app is enabled for the course, False otherwise.
'''
# TODO: create a separate policy setting to enable/disable notes
notes_tab_type = 'notes'
return next((True for tab in course.tabs if tab['type'] == notes_tab_type), False)