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

  max: 4
  min: 2

PLAN_TYPE =
  homework: 'homework'
  reading: 'reading'

TaskPlanConfig =


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

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

