     gradeId = gradeParams.id
     $scope.rawScoreUpdating = false
     $scope.hasChanges = false
-    $scope.debouncedUpdate = null
 
     $scope.froalaOptions = {
       inlineMode: false,

    this.status = grade["status"]
    this.raw_score = grade["raw_score"]
    this.feedback = grade["feedback"]

  GradePrototype.prototype = {
    change: ()->
      $scope.resetChanges()
      $scope.startDebouncedUpdate()

    startDebouncedUpdate: ()->
      $scope.debouncedUpdate = debounce((->
        self = this
        $http.put("/grades/#{self.id}/async_update", self).success(
          (data,status)->


    resetChanges: ()->
      this.hasChanges = false
      this.debouncedUpdate = null
  }

]
