     obj = _.extend({}, @_local[planId], @_changed[planId])
 
     # iReadings should not contain exercise_ids and will cause a silent 422 on publish
-    if obj.type is PLAN_TYPE.reading
+    if obj.type is PLAN_TYPES.READING
       delete obj.settings.exercise_ids
 
     obj

    @_local[planId].settings ?= {}
    @_local[planId].settings.page_ids ?= []

    if @_local[planId]?.type is PLAN_TYPE.homework or @_changed[planId]?.type is PLAN_TYPE.homework
      @_local[planId].settings.exercise_ids ?= []
      @_local[planId].settings.exercises_count_dynamic ?= TUTOR_SELECTIONS.default



    isHomework: (id) ->
      plan = @_getPlan(id)
      plan.type is PLAN_TYPES.HOMEWORK

    isValid: (id) ->
      plan = @_getPlan(id)
