Code coverage report for src/flux/teacher-task-plan.coffee

Statements: 100% (15 / 15)      Branches: 50% (1 / 2)      Functions: 100% (3 / 3)      Lines: 100% (15 / 15)      Ignored: none     

All files » src/flux/ » teacher-task-plan.coffee
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35           14× 14× 14×       40× 40× 40× 360×                        
var CrudConfig, TaskPlanStore, TeacherTaskPlanConfig, _, actions, extendConfig, makeSimpleStore, ref, ref1, store;
 
_ = require('underscore');
 
ref = require('./helpers'), CrudConfig = ref.CrudConfig, makeSimpleStore = ref.makeSimpleStore, extendConfig = ref.extendConfig;
 
TaskPlanStore = require('./task-plan').TaskPlanStore;
 
TeacherTaskPlanConfig = {
  _loaded: function(obj, id) {
    var plans;
    plans = obj.plans;
    return this._local[id] = plans;
  },
  exports: {
    getActiveCoursePlans: function(id) {
      var plans;
      plans = this._local[id] || [];
      return _.filter(plans, function(plan) {
        return !TaskPlanStore.isDeleteRequested(plan.id);
      });
    }
  }
};
 
extendConfig(TeacherTaskPlanConfig, new CrudConfig());
 
ref1 = makeSimpleStore(TeacherTaskPlanConfig), actions = ref1.actions, store = ref1.store;
 
module.exports = {
  TeacherTaskPlanActions: actions,
  TeacherTaskPlanStore: store
};