       else
         linkContainer.html(hideLink())
 
+    isAllGradingPeriods: (currentPeriodId) ->
+      currentPeriodId == "0"
+
     # this method should be removed after a month in production
     alignCoursePreferencesWithLocalStorage: () ->
       local_storage_show_point_totals = userSettings.contextGet('show_point_totals')

        else
          return @compareAssignmentPositions(a, b)

    wrapColumnSortFn: (wrappedFn) =>
      (a, b) =>
        return -1 if b.type is 'total_grade'
        return  1 if a.type is 'total_grade'
        return -1 if b.type is 'assignment_group' and a.type isnt 'assignment_group'

          )
      , 2000)

    initPreviousGradebookExportLink: () ->
      link = $('#csv_export_options').children('li').last().children()
      link.on 'click', (event) ->
        event.preventDefault()
