Permalink
Commits on Mar 27, 2013
Commits on Mar 19, 2013
  1. Merge pull request #43433 from petercollingridge/domain-q

    petercollingridge committed Mar 19, 2013
    Students must state the domain of simplified expression where necessary.
    
    fix #43504; fix #43362;
    
    Test plan: try a few example exercises (note that 1 of the 3 types don't require a domain to be specified) http://localhost:8000/exercises/simplifying_rational_expressions_3.html
    
    Auditors: eater, alpert, cbhl
  2. Fix to actually select the correct equation

    petercollingridge committed Mar 19, 2013
    Test plan: as before - check a few example exercises
    
    Auditor: alpert
  3. Merge pull request #43528 from petercollingridge/non-neg-denom

    petercollingridge committed Mar 19, 2013
    No longer accept answers with a negative denominator
    
    fix #43485; and keep Alpert happy.
    
    Test plan: Test exercises http://localhost:8000/exercises/simplifying_rational_expressions_2.html and make sure it still accepts the correct answer whilst rejecting answers with negated denominator and numerator.
    
    Auditors: alpert
  4. Get rid of an html-style comment in javascript.

    csilvers committed Mar 19, 2013
    Summary:
    Could use //, but the comment is not adding anything new, that I can
    see, so I'm happy to just nix it.
    
    This was messing up the python javascript parser I was throwing at
    this file.
    
    Test Plan: None
    
    Reviewers: eater, alpert
    
    Reviewed By: alpert
    
    CC: alpert
    
    Differential Revision: http://phabricator.khanacademy.org/D2103
  5. Remove confusing "times older than" wording

    sophiebits committed Mar 19, 2013
    Closes #43492.
    
    Auditors: peter, eater
  6. Typo denomiators -> denominators

    petercollingridge committed Mar 19, 2013
    fix #43499;
    
    Test plan: check spelling
    
    Auditors: alpert
  7. Merge pull request #43487 from ziggyism/patch-1

    sophiebits committed Mar 19, 2013
    Refactor related-video mouse event logic
  8. Update khan-exercise.js

    ziggyism
    ziggyism committed Mar 19, 2013
    Unbloating
Commits on Mar 18, 2013
  1. Minor typo

    petercollingridge committed Mar 18, 2013
    'isoceles' to 'isosceles'
    fix #41775;
    
    Test plan: Check my spelling
    
    Auditors: beneater, alpert
Commits on Mar 17, 2013
  1. Merge pull request #43434 from petercollingridge/randvar2

    petercollingridge committed Mar 17, 2013
    fix #43236; fix #43385;
    
    Test plan: check each exercise still displays an equation
    
    Auditors: beneater, cbhl
  2. Split final hint

    petercollingridge committed Mar 17, 2013
Commits on Mar 16, 2013
  1. Prevent coefficient of g being -1

    petercollingridge committed Mar 16, 2013
    When the coefficient is -1 there is some weird formatting.
    
    fix #43391
    
    Test plan: minimal
    
    Auditors: alpert, beneater
Commits on Mar 15, 2013
  1. Only uglify javascript with a newline in it.

    csilvers committed Mar 15, 2013
    Summary:
    I added comments at the top of the file explaining why we uglify at
    all, and why uglifying is only necessary when the javascript has
    newlines.
    
    This gives a nice speedup to 'make pack:
    
       % make pack
       old: 92.293u 9.616s 1:52.15 90.8%    0+0k 16+7712io 0pf+0w
       new: 71.260u 8.792s 1:36.97 82.5%    0+0k 0+7896io 0pf+0w
    
    23% less cpu time!  Most of this is spent spawning pack.rb, so in
    streaming mode (which deploy.py uses), it's even better:
    
       % cat exercises/*.html | ruby build/pack.rb >/dev/null
       old: 28.197u 0.564s 0:31.92 90.0%    0+0k 0+0io 0pf+0w
       new: 7.604u 0.116s 0:08.49 90.8%     0+0k 0+0io 0pf+0w
    
    A whopping 75% less cpu time!
    
    Small style cleanup suggested in review.
    
    Test Plan:
    Did a diff of exercises-packed with both the old and new pack.rb.
    Diffs were as expected:
       -        <var id="INT">rand(5)&gt;0?randRange(1,9):0</var>
       -        <var id="FRAC">rand(3)&gt;0?"."+randRange(1,9):""</var>
       -        <var id="SIGN">randFromArray(["","-"])</var>
       +        <var id="INT">(rand(5) &gt; 0 ? randRange( 1, 9 ) : 0)</var>
       +        <var id="FRAC">(rand(3) &gt; 0 ? "." + randRange(1, 9) : "")</var>
       +        <var id="SIGN">(randFromArray(["", "-"]))</var>
       <etc>
    
    I also ran python -m SimpleHTTPServer and visited
       http://localhost:8000/exercises-packed/absolute_value_equations.html
       http://localhost:8000/exercises-packed/age_word_problems.html
       http://localhost:8000/exercises-packed/angles_2.html
    and verified they still render correctly.
    
    Reviewers: alpert, eater
    
    Reviewed By: alpert
    
    Differential Revision: http://phabricator.khanacademy.org/D2099
  2. Merge pull request #43381 from petercollingridge/floor_to_round

    petercollingridge committed Mar 15, 2013
    fix #41894;
    
    Test plan: Check some example exercises and ensure that the hundredths place is correctly given in the hints.
    
    Auditors: beneater, alpert
  3. Round before modulo

    petercollingridge committed Mar 15, 2013
  4. Merge branch 'lint'

    jeresig committed Mar 15, 2013
  5. Use round instead of floor

    petercollingridge committed Mar 15, 2013
    Using floor breaks when D = 29, 57 or 58. See #41894
Commits on Mar 14, 2013
  1. Fix dice_probability hint

    beneater committed Mar 14, 2013
    Test plan: Verify the right things are highlighted in the second hint: http://localhost:8000/exercises/dice_probability.html?debug&problem=d1-is-even-d2-is-x
    
    Auditors: alpert
  2. Review nit

    beneater committed Mar 14, 2013
    Test plan: none
    
    Auditors: alpert
  3. Factor out default number forms in answer-types

    beneater committed Mar 14, 2013
    Test plan: Do a few problems in degrees_to_radians
    
    Auditors: alpert
  4. Add in a new linter to catch some malformed i18n strings.

    jeresig committed Mar 14, 2013
    Summary:
    This adds a new `make lint` command for exercises to check and see if there is an unexpected element contained within a string.
    
    I had wanted to move this out into a separate program but I found that I was going to be duplicating a lot of logic from the original extractor - so it really made more sense to have the linting happen in there.
    
    I want to have this run as a part of the official Khan Academy `make lint` as well. (Or maybe this could run before the exercise packing runs? I'm open to suggestions.)
    
    The output from a failing `make lint` run will look something like this:
    
    ```
    $ make lint
    python build/extract_strings.py --lint exercises/*html
    Lint error in file: exercises/logical_arguments_deductive_reasoning.html
    Contains invalid node:
    <div>
                            Identify the <span class="hint_blue">first hypothesis</span>, the <span class="hint_green">first conclusion</span>, the <span class="hint_red">second hypothesis</span>, and the <span class="hint_purple">second conclusion</span>.
                            <div class="graphie">
                                $( "#hyp_a" ).addClass( "hint_blue" );
                                $( "#conc_a" ).addClass( "hint_green" );
                                $( "#hyp_b" ).addClass( "hint_red" );
                                $( "#conc_b" ).addClass( "hint_purple" );
                            </div>
                        </div>
    Invalid node:
    <div class="graphie">
                                $( "#hyp_a" ).addClass( "hint_blue" );
                                $( "#conc_a" ).addClass( "hint_green" );
                                $( "#hyp_b" ).addClass( "hint_red" );
                                $( "#conc_b" ).addClass( "hint_purple" );
                            </div>
    1 error detected.
    make: *** [lint] Error 1
    ```
    
    Fix lint error.
    
    Test Plan: Run `make lint` and verify that there are no errors. Then modify one of the exercises. For example I modified `exercises/logical_arguments_deductive_reasoning.html` and removed the `<p>...</p>` immediately preceding a graphie block (causing it to be included in the extraction). This generated the above error and make the linter fail.
    
    Reviewers: csilvers
    
    CC: alpert
    
    Maniphest Tasks: T1002
    
    Differential Revision: http://phabricator.khanacademy.org/D2098
  5. Happy pi day! Display a custom message when a user approximates pi in…

    beneater committed Mar 14, 2013
    … an answer
    
    Test plan: local; answer degrees_to_radians using approximations of pi
    
    Auditors: alpert, cbhl
  6. Add in a new linter to catch some malformed i18n strings.

    jeresig committed Mar 14, 2013
    Summary: This adds a new `make lint` command for exercises to check and see if there is an unexpected element contained within a string.
    
    I had wanted to move this out into a separate program but I found that I was going to be duplicating a lot of logic from the original extractor - so it really made more sense to have the linting happen in there.
    
    I want to have this run as a part of the official Khan Academy `make lint` as well. (Or maybe this could run before the exercise packing runs? I'm open to suggestions.)
    
    The output from a failing `make lint` run will look something like this:
    
    ```
    $ make lint
    python build/extract_strings.py --lint exercises/*html
    Lint error in file: exercises/logical_arguments_deductive_reasoning.html
    Contains invalid node:
    <div>
                            Identify the <span class="hint_blue">first hypothesis</span>, the <span class="hint_green">first conclusion</span>, the <span class="hint_red">second hypothesis</span>, and the <span class="hint_purple">second conclusion</span>.
                            <div class="graphie">
                                $( "#hyp_a" ).addClass( "hint_blue" );
                                $( "#conc_a" ).addClass( "hint_green" );
                                $( "#hyp_b" ).addClass( "hint_red" );
                                $( "#conc_b" ).addClass( "hint_purple" );
                            </div>
                        </div>
    Invalid node:
    <div class="graphie">
                                $( "#hyp_a" ).addClass( "hint_blue" );
                                $( "#conc_a" ).addClass( "hint_green" );
                                $( "#hyp_b" ).addClass( "hint_red" );
                                $( "#conc_b" ).addClass( "hint_purple" );
                            </div>
    1 error detected.
    make: *** [lint] Error 1
    ```
    
    Test Plan: Run `make lint` and verify that there are no errors. Then modify one of the exercises. For example I modified `exercises/logical_arguments_deductive_reasoning.html` and removed the `<p>...</p>` immediately preceding a graphie block (causing it to be included in the extraction). This generated the above error and make the linter fail.
    
    Reviewers: csilvers
    
    CC:
    
    Maniphest Tasks: T1002
  7. Add a statement to assume x != 0 for simplifying rational expressions

    beneater committed Mar 14, 2013
    fix #42324
    
    Test plan: load each exercise locally and make sure it displays properly
    
    Auditors: peter, cbhl
  8. Happy pi day! Finally add support for mixed number multples of pi

    beneater committed Mar 14, 2013
    fix #43256; fix #43249
    
    Test plan:
    http://localhost:8000/exercises/circles_and_arcs.html?debug&problem=r-angle-to-a&seed=122&activity=%5B%5B%22incorrect-activity%22%2C%22%5C%221%201%2F4%20pi%5C%22%22%2C3%5D%2C%5B%22incorrect-activity%22%2C%22%5C%224%205%2F18%20pi%5C%22%22%2C7%5D%2C%5B%22incorrect-activity%22%2C%22%5C%222%205%2F36%20tau%5C%22%22%2C80%5D%2C%5B%22correct-activity%22%2C%22%5C%2277%2F36%20tau%5C%22%22%2C14%5D%5D
    
    Auditors: alpert