Permalink
Browse files

Merge branch 'master' of https://github.com/Khan/khan-exercises

  • Loading branch information...
2 parents 62f2b93 + 20e8703 commit 582e4f99b18659da7b243c73c3fa708270ed8943 @mwahl mwahl committed Jul 18, 2012
Showing with 29,502 additions and 8,360 deletions.
  1. +1 −1 build/kathjax.py
  2. +18 −2 build/pack.rb
  3. +27 −0 build/update-khan-site.sh
  4. +21 −0 css/khan-exercise-dev.css
  5. +15 −4 css/khan-exercise.css
  6. +6,968 −5,439 css/khan-site.css
  7. +1 −1 exercises/absolute_value.html
  8. +2 −2 exercises/adding_and_subtracting_decimals_word_problems.html
  9. +1 −1 exercises/{adding_decimals_3.html → adding_decimals_2.html}
  10. +19 −1 exercises/adding_fractions.html
  11. +9 −1 exercises/adding_fractions_with_common_denominators.html
  12. +58 −3 exercises/adding_subtracting_mixed_numbers_0.5.html
  13. +74 −4 exercises/adding_subtracting_mixed_numbers_1.html
  14. +0 −1 exercises/addition_rule_of_probability.html
  15. +13 −13 exercises/alternate_exterior_angles_2.html
  16. +13 −14 exercises/alternate_interior_angles_2.html
  17. +196 −0 exercises/angle_addition_postulate.html
  18. +222 −0 exercises/area_1.html
  19. +1 −163 exercises/{circles_1.html → area_of_a_circle.html}
  20. +128 −0 exercises/area_of_parallelograms.html
  21. +215 −0 exercises/area_of_squares_and_rectangles.html
  22. +120 −0 exercises/areas_of_circles_and_sectors.html
  23. +257 −0 exercises/areas_of_trapezoids_rhombi_and_kites.html
  24. +108 −0 exercises/circles_and_arcs.html
  25. +0 −51 exercises/circumradius.html
  26. +3 −2 exercises/combining_like_terms_1.html
  27. +2 −1 exercises/combining_like_terms_2.html
  28. +33 −0 exercises/common_factors_of_a_polynomial_1.html
  29. +34 −0 exercises/common_factors_of_a_polynomial_2.html
  30. +185 −0 exercises/comparing_objects.html
  31. +282 −0 exercises/conditional_statements_2.html
  32. +168 −0 exercises/conditional_statements_and_truth_value.html
  33. +1 −1 exercises/congruency_postulates.html
  34. +153 −0 exercises/congruent_angles.html
  35. +0 −15 exercises/conic_sections.html
  36. +172 −0 exercises/converse_inverse_and_contrapositive.html
  37. +14 −13 exercises/corresponding_angles_2.html
  38. +5 −4 exercises/creating_box_and_whisker_plots.html
  39. +12 −51 exercises/{square_roots_cube_roots.html → cube_roots.html}
  40. +0 −78 exercises/decimals_on_the_number_line.html
  41. +27 −26 exercises/degrees_to_radians.html
  42. +0 −53 exercises/determinants_1.html
  43. +150 −0 exercises/divisibility_intuition.html
  44. +305 −0 exercises/divisibility_tests.html
  45. +0 −52 exercises/equation_of_a_parabola.html
  46. +13 −2 exercises/equivalent_fractions.html
  47. +188 −0 exercises/exploring_angle_pairs_1.html
  48. +98 −0 exercises/factoring_difference_of_squares_3.html
  49. +53 −0 exercises/factoring_difference_of_squares_4.html
  50. +107 −0 exercises/factoring_polynomials_3.html
  51. +106 −58 exercises/factoring_polynomials_by_grouping_1.html
  52. +0 −92 exercises/factoring_polynomials_by_grouping_2.html
  53. +4 −4 exercises/fractions_cut_and_copy_1.html
  54. +6 −6 exercises/fractions_cut_and_copy_2.html
  55. +0 −132 exercises/fractions_on_the_number_line.html
  56. +4 −2 exercises/geometry_1.html
  57. +416 −0 exercises/geometry_proofs_1.html
  58. +731 −0 exercises/geometry_proofs_2.html
  59. +831 −0 exercises/geometry_proofs_intro.html
  60. +13 −5 exercises/graphing_systems_of_inequalities.html
  61. +13 −5 exercises/graphing_systems_of_inequalities_2.html
  62. +101 −0 exercises/independent_probability.html
  63. +13 −13 exercises/khan-exercise.html
  64. +44 −12 exercises/khan-site.html
  65. +1 −1 exercises/lhopitals_rule.html
  66. +4 −2 exercises/limits_2.html
  67. +143 −0 exercises/logical_arguments_deductive_reasoning.html
  68. +2 −2 exercises/measuring_angles.html
  69. +1 −0 exercises/multiplication_1.5.html
  70. +1 −0 exercises/multiplication_2.html
  71. +1 −0 exercises/multiplication_3.html
  72. +1 −0 exercises/multiplication_4.html
  73. +1 −0 exercises/multiplying_decimals.html
  74. +0 −512 exercises/multiplying_fractions_1.html
  75. +2 −2 exercises/negative_number_word_problems.html
  76. +20 −16 exercises/number_line.html
  77. +2 −2 exercises/number_line_3.html
  78. +5 −0 exercises/ordering_fractions.html
  79. +5 −0 exercises/ordering_improper_fractions_and_mixed_numbers.html
  80. +5 −0 exercises/ordering_negative_numbers.html
  81. +7 −0 exercises/ordering_numbers.html
  82. +179 −0 exercises/ordering_objects.html
  83. +6 −6 exercises/parabola_intuition_1.html
  84. +6 −6 exercises/parabola_intuition_2.html
  85. +55 −20 exercises/parabola_intuition_3.html
  86. +301 −0 exercises/perimeter_1.html
  87. +192 −0 exercises/perimeter_of_squares_and_rectangles.html
  88. +1 −1 exercises/point_slope_form.html
  89. +294 −0 exercises/points_lines_and_planes.html
  90. +0 −173 exercises/polygon_intuition.html
  91. +1 −1 exercises/quadratic_equation.html
  92. +0 −100 exercises/quadratic_inequalities_1.html
  93. +223 −0 exercises/radius_diameter_and_circumference.html
  94. +24 −24 exercises/reading_bar_charts_3.html
  95. +5 −3 exercises/reading_line_charts_1.html
  96. +35 −0 exercises/recognizing_fractions_0.5.html
  97. +0 −101 exercises/recognizing_percents.html
  98. +175 −0 exercises/shaded_areas.html
  99. +34 −0 exercises/simplifying_rational_expressions_1.html
  100. +34 −0 exercises/simplifying_rational_expressions_2.html
  101. +444 −0 exercises/solving_similar_triangles_2.html
  102. +105 −0 exercises/square_roots.html
  103. +66 −0 exercises/square_roots_2.html
  104. +0 −313 exercises/squares_and_rectangles.html
  105. +119 −67 exercises/telling_time_2.html
  106. +268 −0 exercises/the_fundamental_theorem_of_arithmetic.html
  107. +37 −3 exercises/unit_circle.html
  108. +126 −0 exercises/z_scores_2.html
  109. +313 −0 exercises/z_scores_3.html
  110. +3,337 −0 jquery.qtip.js
  111. +303 −109 khan-exercise.js
  112. +5,957 −0 utils/MathJax/1.1a/config/KAthJax-62e7a7b628ba168df6b9cd3de8feac38.js
  113. +0 −154 utils/MathJax/1.1a/config/KAthJax-a5c67e8a5046db2ff8dfc2229a228836.js
  114. +34 −15 utils/answer-types.js
  115. +664 −0 utils/congruency.js
  116. +1 −1 utils/exponents.js
  117. +86 −69 utils/factoring-expressions.js
  118. +263 −0 utils/graphie-geometry.js
  119. +21 −0 utils/graphie-helpers.js
  120. +1 −1 utils/graphie-polygon.js
  121. +15 −9 utils/graphie.js
  122. +87 −167 utils/interactive.js
  123. +6 −2 utils/math-format.js
  124. +5 −2 utils/math.js
  125. +136 −0 utils/nba.js
  126. +1 −1 utils/parabola-intuition.js
  127. +2,272 −0 utils/proofs.js
  128. +6 −5 utils/scratchpad.js
  129. +52 −52 utils/simplify.js
  130. +17 −17 utils/simplifying-expressions.js
  131. +67 −0 utils/stat.js
  132. +5 −0 utils/subhints.js
  133. +26 −0 utils/tmpl.js
  134. 0 utils/{congruence.js → triangle-congruence.js}
  135. +122 −73 utils/word-problems.js
View
@@ -88,7 +88,7 @@
# Pack KAthJax.js and copy to mjdir
os.mkdir(os.path.join(mjdir, 'config'))
-os.system('uglifyjs --overwrite --ascii KAthJax.js')
+os.system('uglifyjs --overwrite --ascii --beautify --indent 0 KAthJax.js')
kathjax_js = open('KAthJax.js', 'r')
md5 = hashlib.md5(kathjax_js.read()).hexdigest()
View
@@ -8,13 +8,27 @@
puts
puts "-" * 78
puts "Oops! Some gems are missing; please run:"
- puts " sudo gem install nokogiri uglifier therubyracer"
+ puts " sudo gem install json nokogiri uglifier therubyracer"
puts "-" * 78
puts
exit 1
end
begin
+ require 'json'
+rescue LoadError
+ puts
+ puts "-" * 78
+ puts "Warning! You don't have json installed, packing might be slow. Try:"
+ puts " sudo gem install json"
+ puts
+ puts "You can also use another json library. If you don't do anything,"
+ puts "this script will use the default, ok_json, which is ok, but slow."
+ puts "-" * 78
+ puts
+end
+
+begin
require 'v8'
rescue LoadError
puts
@@ -76,10 +90,12 @@ def uglifier_insane
FileUtils.mkdir_p("exercises-packed")
-Dir["exercises/*.html"].each do |filename|
+Dir["exercises/**/*.html"].each do |filename|
packed_filename = filename.gsub(/^exercises\//, "exercises-packed/")
next if File.exist?(packed_filename) && File.mtime(packed_filename) > File.mtime(filename)
+ FileUtils.mkdir_p(File.dirname(packed_filename))
+
puts filename
cant = 0
doc = Nokogiri::HTML::Document.parse(File.read(filename))
View
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+PACKAGES="shared exercises"
+
+BASE_DIR=".."
+DEV_CSS="css/khan-exercise-dev.css"
+OUTPUT="css/khan-site.css"
+
+for package in ${PACKAGES}; do
+ if [ ! -f ${BASE_DIR}/stylesheets/${package}-package/combined.css ]; then
+ echo "${BASE_DIR}/stylesheets/${package}-package/combined.css not found!"
+ echo "You should run the deploy script (with --dryrun)"
+ echo
+ exit 66
+ fi
+done
+
+echo > ${OUTPUT}
+
+for package in ${PACKAGES}; do
+ echo ${package}
+ sed 's|url(\(.*images.*\))|url(http://www.khanacademy.org/\1)|' ${BASE_DIR}/stylesheets/${package}-package/combined.css >> ${OUTPUT}
+done
+
+cat ${DEV_CSS} >> ${OUTPUT}
+
+echo
View
@@ -0,0 +1,21 @@
+.exercises-body {
+ /* Activate GPU rendering */
+ -webkit-transform: translatez(0);
+}
+
+#workarea {
+ width: 514px;
+}
+
+#hintsarea {
+ width: 494px;
+}
+
+body.debug #workarea,
+body.debug #hintsarea {
+ outline: 1px dashed #ddd;
+}
+
+body.debug #extras .debug-mode {
+ display: none;
+}
View
@@ -29,6 +29,20 @@ a.show-subhint {
font-style: italic;
}
+div.definition {
+ position: absolute;
+ border: 1px solid #aaaaaa;
+ background: #f9f9f9;
+ display: none;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ border-radius: 4px;
+ margin-left: 20px;
+ margin-right: 20px;
+ padding: 10px;
+ z-index: 1000;
+}
+
#workarea { margin-left: 30px; }
#hintsarea { margin-left: 50px; }
#answer_area ul { list-style: none; }
@@ -111,6 +125,7 @@ body.debug .graphie { outline: 1px dashed red; }
padding: 10px;
margin: 0 -10px;
border-bottom: 1px solid #c3c3c3;
+ overflow-x: auto;
}
#answer_area .answer-buttons {
@@ -349,10 +364,6 @@ div.timeline-total {
font-size: 16px;
}
-.lite #answercontent input.button {
- margin-top: 2px;
-}
-
.lite #answercontent #examples-show, .lite #answercontent #examples {
display: none !important;
}
Oops, something went wrong.

0 comments on commit 582e4f9

Please sign in to comment.