         points = points * $scope.weights.default_weight
     points
 
+  # FIX THIS ONE
   $scope.assignmentTypeMaxPossiblePoints = (assignmentType)->
     total = $scope.weightedPoints(assignmentType.total_points,assignmentType)
+    if assignmentType.is_capped
+      total = if total > assignmentType.total_points then assignmentType.total_points else total
+    total
 
   # Total points predicted for all assignments by assignments type
   # caps the total points at the assignment type max points

    )
    total

  $scope.weightedPoints = (points,assignmentType)->
    if assignmentType.student_weightable
      if assignmentType.student_weight > 0

    )
    return scoreLevels[closest]

  # Used to avoid rendering an assignment type if it contains no assignments
  $scope.hasAssignments = (assignmentType)->
    $scope.assignmentsForAssignmentType($scope.assignments,assignmentType.id).length > 0

