   else
     moment(now).add(1, 'day').format(TimeHelper.ISO_DATE_FORMAT)
 
-getQueriedOpensAt = (taskPlanId, termStart) ->
+getQueriedOpensAt = (planId, dueAt, termStart) ->
   {opens_at} = Router.currentQuery() # attempt to read the open date from query params
-  isNewPlan = TaskPlanStore.isNew(taskPlanId)
+  isNewPlan = TaskPlanStore.isNew(planId)
   opensAt = if opens_at and isNewPlan then TimeHelper.getMomentPreserveDate(opens_at)
   if not opensAt
     # default open date is tomorrow
     opensAt = getOpensAtDefault(termStart)
 
-  # if there is a queried due date, make sure it's not the same as the open date
-  dueAt = getQueriedDueAt()
-
+  # if there is a current due date, make sure it's not the same as the open date
   if dueAt?
     dueAtMoment = TimeHelper.getMomentPreserveDate(dueAt)
     # there's a corner case is certain timezones where isAfter doesn't quite cut it


  opensAt

getQueriedDueAt = ->
  {due_at} = Router.currentQuery() # attempt to read the due date from query params
  TimeHelper.getMomentPreserveDate(due_at).format(TimeHelper.ISO_DATE_FORMAT) if due_at

getTaskPlanOpensAt = (planId) ->
  firstDueAt = _.first(TaskPlanStore.get(planId)?.tasking_plans)?.due_at


setPeriodDefaults = (courseId, planId, term) ->
  unless TaskingStore.hasTasking(planId)
    if TaskPlanStore.isNew(planId)
      due_date = getCurrentDueAt(planId) or getTaskPlanOpensAt(planId)
      TaskingActions.create(planId, {open_date: getQueriedOpensAt(planId, due_date, term.start), due_date})
    else
      {tasking_plans} = TaskPlanStore.get(planId)
      TaskingActions.loadTaskings(planId, tasking_plans)
