   LO: ['lo', 'aplo']
   GENERIC: ['blooms', 'dok', 'length']
 
-getChapterSection = (exercise) ->
-  tag = _.find(exercise.tags, (t) ->
-    _.include(EXERCISE_TAGS.LO, t.type)
-  )
-  tag?.chapter_section.join('.')
+getChapterSection = (ecosystemId, exercise) ->
+  for tag in exercise.tags when tag.type is 'cnxmod'
+    section = TocStore.findWhere(ecosystemId, uuid: tag.data)
+    return section.chapter_section.join('.') if section?
 
 getTagName = (tag) ->
   name = _.compact([tag.name, tag.description]).join(' ')

    getPageExerciseTypes: (pageId) ->
      _.unique _.flatten _.map @_exercises[pageId], @exports.getExerciseTypes

    # poolTypes: (exercise) ->
    #   _.without( exercise.pool_types, 'all_exercises')

    allForPage: (pageId) ->
      @_exercises[pageId] or []


      else
        @_exerciseCache[exerciseId]?.is_excluded

    getChapterSectionOfExercise: (ecosystemId, exercise) ->
      getChapterSection(ecosystemId, exercise)

    groupBySectionsAndTypes: (ecosystemId, pageIds, options = {withExcluded: false}) ->
      all = @_exercises[pageIds.toString()] or []
      unless options.withExcluded is true
        all = _.filter( all, (ex) -> ex.is_excluded isnt true )
      results = {
        all:
          count: all.length
          grouped: groupBySortedSections(ecosystemId, all)
      }
      for name, pool_type of EXERCISE_TYPE_MAPPING
        exercises = filterForPoolType(all, pool_type)
        results[name] = {
          count: exercises.length
          grouped: groupBySortedSections(ecosystemId, exercises)
        }
      results

