Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Mar 27, 2013
  1. @tzjames
Commits on Mar 19, 2013
  1. @petercollingridge

    Merge pull request #43433 from petercollingridge/domain-q

    petercollingridge authored
    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. @petercollingridge

    Fix to actually select the correct equation

    petercollingridge authored
    Test plan: as before - check a few example exercises
    
    Auditor: alpert
  3. @petercollingridge

    Merge pull request #43528 from petercollingridge/non-neg-denom

    petercollingridge authored
    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. @petercollingridge
  5. @csilvers

    Get rid of an html-style comment in javascript.

    csilvers authored
    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
  6. @spicyj

    Remove confusing "times older than" wording

    spicyj authored
    Closes #43492.
    
    Auditors: peter, eater
  7. @petercollingridge

    Typo denomiators -> denominators

    petercollingridge authored
    fix #43499;
    
    Test plan: check spelling
    
    Auditors: alpert
  8. @spicyj

    Merge pull request #43487 from ziggyism/patch-1

    spicyj authored
    Refactor related-video mouse event logic
  9. Update khan-exercise.js

    ziggyism authored
    Unbloating
  10. @csilvers
Commits on Mar 18, 2013
  1. @petercollingridge

    Minor typo

    petercollingridge authored
    'isoceles' to 'isosceles'
    fix #41775;
    
    Test plan: Check my spelling
    
    Auditors: beneater, alpert
Commits on Mar 17, 2013
  1. @petercollingridge

    Merge pull request #43434 from petercollingridge/randvar2

    petercollingridge authored
    fix #43236; fix #43385;
    
    Test plan: check each exercise still displays an equation
    
    Auditors: beneater, cbhl
  2. @petercollingridge
  3. @petercollingridge
  4. @petercollingridge

    Split final hint

    petercollingridge authored
  5. @petercollingridge
  6. @petercollingridge
Commits on Mar 16, 2013
  1. @petercollingridge

    Prevent coefficient of g being -1

    petercollingridge authored
    When the coefficient is -1 there is some weird formatting.
    
    fix #43391
    
    Test plan: minimal
    
    Auditors: alpert, beneater
Commits on Mar 15, 2013
  1. @csilvers

    Only uglify javascript with a newline in it.

    csilvers authored
    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. @petercollingridge

    Merge pull request #43381 from petercollingridge/floor_to_round

    petercollingridge authored
    fix #41894;
    
    Test plan: Check some example exercises and ensure that the hundredths place is correctly given in the hints.
    
    Auditors: beneater, alpert
  3. @petercollingridge

    Round before modulo

    petercollingridge authored
  4. @petercollingridge
  5. @jeresig

    Merge branch 'lint'

    jeresig authored
  6. @jeresig

    Remove un-needed if statement.

    jeresig authored
  7. @jeresig
  8. @petercollingridge

    Use round instead of floor

    petercollingridge authored
    Using floor breaks when D = 29, 57 or 58. See #41894
Commits on Mar 14, 2013
  1. @beneater

    Fix dice_probability hint

    beneater authored
    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. @beneater

    Review nit

    beneater authored
    Test plan: none
    
    Auditors: alpert
  3. @beneater

    Factor out default number forms in answer-types

    beneater authored
    Test plan: Do a few problems in degrees_to_radians
    
    Auditors: alpert
  4. @jeresig

    Add in a new linter to catch some malformed i18n strings.

    jeresig authored
    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. @beneater

    Happy pi day! Display a custom message when a user approximates pi in…

    beneater authored
    … an answer
    
    Test plan: local; answer degrees_to_radians using approximations of pi
    
    Auditors: alpert, cbhl
  6. @jeresig

    Add in a new linter to catch some malformed i18n strings.

    jeresig authored
    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. @beneater

    Add a statement to assume x != 0 for simplifying rational expressions

    beneater authored
    fix #42324
    
    Test plan: load each exercise locally and make sure it displays properly
    
    Auditors: peter, cbhl
  8. @beneater

    Happy pi day! Finally add support for mixed number multples of pi

    beneater authored
    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
Something went wrong with that request. Please try again.