Skip to content
This repository
  • 2 commits
  • 1 file changed
  • 0 comments
  • 1 contributor

Showing 1 changed file with 2 additions and 17 deletions. Show diff stats Hide diff stats

  1. 19  khan-exercise.js
19  khan-exercise.js
@@ -2181,22 +2181,7 @@ function updateData( data ) {
2181 2181
 	var streakMaxWidth = jQuery(".streak-bar").width(),
2182 2182
 
2183 2183
 		// Streak and longest streak pixel widths
2184  
-		streakWidth = Math.min(Math.ceil(streakMaxWidth * data.progress), streakMaxWidth),
2185  
-		longestStreakWidth = Math.min(streakMaxWidth, Math.ceil((streakMaxWidth / data.required_streak) * data.longest_streak)),
2186  
-
2187  
-		// Streak icon pixel width
2188  
-		streakIconWidth = Math.min(streakMaxWidth - 2, Math.max(43, streakWidth)), // 43 is width of streak icon
2189  
-
2190  
-		// Don't show label if not enough room
2191  
-		labelWidthRequired = 20,
2192  
-
2193  
-		// Don't show accumulation stats higher than 100 to stop grinding behavior,
2194  
-		// and don't show labels if there isn't room in the bar to render them.
2195  
-		labelStreak = streakWidth < labelWidthRequired ? "" :
2196  
-						( !data.summative && data.streak > 100 ) ? "Max" : data.streak,
2197  
-
2198  
-		labelLongestStreak = ( longestStreakWidth < labelWidthRequired || (longestStreakWidth - streakWidth) < labelWidthRequired ) ? "" :
2199  
-						( !data.summative && data.longest_streak > 100 ) ? "Max" : data.longest_streak;
  2184
+		streakWidth = Math.min(Math.ceil(streakMaxWidth * data.progress), streakMaxWidth);
2200 2185
 
2201 2186
 	if ( data.summative ) {
2202 2187
 		jQuery( ".summative-help ")
@@ -2450,7 +2435,7 @@ function loadModules() {
2450 2435
 			var problems = exercises.children( ".problems" ).children();
2451 2436
 
2452 2437
 			if ( typeof userExercise !== "undefined" ) {
2453  
-				problemCount = userExercise.required_streak || 10;
  2438
+				problemCount = 10;
2454 2439
 			}
2455 2440
 
2456 2441
 			weighExercises( problems );

No commit comments for this range

Something went wrong with that request. Please try again.