Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Commits on Sep 1, 2015
  1. @petercollingridge

    Limit places to places we have names for

    petercollingridge authored
    Summary:
    Fix problem of selecting places for which there is no name in the plural dictionary. For an email request from Cameron for JIRA issue https://khanacademy.atlassian.net/browse/AI-958915
    He said it was urgent.
    
    Reviewers: emily, eater
    
    Reviewed By: eater
    
    Differential Revision: https://phabricator.khanacademy.org/D21122
Commits on Aug 27, 2015
  1. @brownhead

    Prevent cheating with offline hints.

    brownhead authored
    Summary:
    This solves the problem posed by the [Prevent using offline hints to cheat project](https://docs.google.com/a/khanacademy.org/document/d/1gLXa3kD89mZtcms4p0SYtDrY3lgRY_nfPrNuE6SZP6E/edit?usp=sharing).
    Previously, a user could disconnect from the internet, take a hint, then
    reconnect without any penalty.
    
    Now if they try this, their browser will remember that they took a hint
    when they reconnect and click the "take a hint" button for them.
    
    Test Plan:
    Follow the test plan below for the following environments: Chrome,
    Chrome Incognito, Firefox, Firefox Private, Safari, Safari Private.
    
    1) Open an exercise on your learning dashboard that has hints.
    2) Kill your dev server
    3) Take a hint
    4) Refresh the page to show a blank page
    5) Start your dev server
    6) Refresh the page to show the exercise again
    7) Verify that it shows that you still took a hint (unless you're in
       Safari Private, in which case it should just not error).
    
    Reviewers: alex, emily
    
    Reviewed By: emily
    
    Differential Revision: https://phabricator.khanacademy.org/D20938
  2. @brownhead

    Remove ServerActionQueue from interface.js.

    brownhead authored
    Summary:
    The ServerActionQueue was added for the [hint cheating project](https://docs.google.com/a/khanacademy.org/document/d/1gLXa3kD89mZtcms4p0SYtDrY3lgRY_nfPrNuE6SZP6E/edit?usp=sharing)
    but it unfortunately caused some nasty bugs in production. After trying
    to clean things up this week I've come to the conclusion that the queue
    (in any form) is very dangerous and shouldn't be done right now.
    
    This change removes the queue and reverts all changes related to it.
    
    In a follow up diff I will solve the original objective of the hint
    cheating project by safer/simpler means.
    
    Test Plan:
    This is removing code from paths that were not being executed because
    no one was allowed to pass the gandalf bridge. So this should be a very
    safe change.
    
    Run through an exercise on your mission dashboard and ensure that
    everything behaves. Be sure to take some hints.
    
    Reviewers: alex, emily
    
    Reviewed By: emily
    
    Differential Revision: https://phabricator.khanacademy.org/D20934
Commits on Aug 25, 2015
  1. @petercollingridge

    Increase the range of questions

    petercollingridge authored
    Summary:
    For an email request from Lindsay:
    * Include digits with 3 to 7 digits
    * Include rounding to tens, hundreds, thousands, ten thousands, and hundred thousands
    * Include commas in numbers with 5 or more digits
    
    I also changed the way numbers are created in the first exercise type, so there's a greater ranges (i.e. numbers with repeated digits and 0s as digits)
    
    Reviewers: emily, eater
    
    Reviewed By: eater
    
    Differential Revision: https://phabricator.khanacademy.org/D20061
  2. @petercollingridge

    Remove questions with radians

    petercollingridge authored
    Summary: For an email request from Ben Stenhaug. I've also simplified the circumference to angle and visa versa questions so the circumference and arcs are not in terms of pi.
    
    Reviewers: emily, eater
    
    Reviewed By: eater
    
    Differential Revision: https://phabricator.khanacademy.org/D19923
Commits on Aug 24, 2015
  1. @beneater

    Don't show related videos in skill checks

    beneater authored
    Summary: For https://app.asana.com/0/27216215224639/46434474707629
    
    Test Plan:
    With this change in webapp, load a skill check with related videos and make sure the videos don't show up
    Load a non-skill-check exercise and see related videos
    
    Reviewers: emily, alex, mattdunnrankin
    
    Reviewed By: alex, mattdunnrankin
    
    Differential Revision: https://phabricator.khanacademy.org/D20838
Commits on Aug 17, 2015
  1. @xymostech

    Fix lint in build/pack.js again.

    xymostech authored
    Summary: Not sure why it passed lint before!
    
    Test plan:
     - `tools/runlint.py khan-exercises/build/pack.js` in webapp
    
    Auditors: eater
  2. @xymostech

    Add data-type="text" to points_lines_and_planes for mobile testing.

    xymostech authored
    Summary:
    The iOS app isn't able to detect that the text box in
    points_lines_and_planes is supposed to allow letters and not just
    numbers, which hopefully this should help. We can't test that this works
    for the mobile app because there's a bug with local testing, but this
    does work on webapp and shouldn't affect mobile either.
    
    Test Plan:
     - Visit
       http://exercises.ka.local/exercises/points_lines_and_planes.html?debug&problem=name-plane
     - See that the question is still answerable.
    
    Reviewers: bryan, eater
    
    Reviewed By: eater
    
    Differential Revision: https://phabricator.khanacademy.org/D20501
Commits on Aug 11, 2015
  1. @beneater

    Fix lint in interface.js

    beneater authored
    tools/runlint.py was failing in webapp because without `var` these variables were ending up as globals :(
    
    Test Plan:
    Update webapp/khan-exercises substate to include this commit
    Run `tools/runlint.py` in webapp
    
    Auditors: johnsullivan, phillip
  2. @beneater

    Lint fixes for pack.js script

    beneater authored
    No idea how this hasn't been a problem for deploys, but tools/runlint.py was failing in webapp
    
    Test Plan:
    Run `tools/runlint.py` in webapp
    
    Auditors: csilvers
Commits on Aug 6, 2015
  1. @andymatuschak

    khan-exercises should be usable without KA globals

    andymatuschak authored
    Summary:
    Changes in support of the server request queue made khan-exercises throw exceptions if `KA` or `LocalStore` were not present in the global namespace, as is the case on the iPad app.
    
    Perhaps the iPad app should adopt the k-e server request queue feature, but it already has its own server queue management machinery, and there are some significant impedance mismatches between this implementation and that one which will require some time to disentangle. Even once we do that, we may or may not export a `KA` global into the khan-exercises global namespace.
    
    This change fixes https://app.asana.com/0/15045191754662/44307908661546.
    
    Test Plan:
    Substate khan-exercises on the iPad repository.
    Load up Derivative intuition.
    Take a hint. You should see the debug yellow "pending requests" counter in the lower-left corner rise to 1, then drop to zero.
    Skip the problem.
    Solve the next problem.
    
    Substate khan-exercises on webapp.
    Opt yourself into `exercises_server_action_queue` [on Gandalf](http://localhost:8080/gandalf).
    Load up Derivative intuition.
    Disable your network connection, then take a hint.
    Reenable your network connection.
    Reload. You should see that your attempt status for the current problem is a light bulb.
    
    Reviewers: phillip, johnsullivan
    
    Reviewed By: johnsullivan
    
    Subscribers: alan, #ios
    
    Differential Revision: https://phabricator.khanacademy.org/D20239
Commits on Aug 5, 2015
  1. @petercollingridge

    Simplify question and have consistent wording of variation

    petercollingridge authored
    Summary: For an email request from Tomer.
    
    Reviewers: eater, emily
    
    Reviewed By: emily
    
    Differential Revision: https://phabricator.khanacademy.org/D20007
Commits on Aug 4, 2015
  1. @andymatuschak

    Fix "adding decimals" on iPad

    andymatuschak authored
    Summary:
    The "adding decimals" family of problems are exhibiting a bug on iPad wherein once the solution input is unfocused, it can't be refocused again. That's because a graphie used by the hints is drawing *on top of* the solution input, rather than being laid out below it.
    
    @emily tells me:
    > After digging around in khan-exercises for a couple minutes, I remembered why the dom elements are out of order; when we got rid of the answer area, we opted for putting the answer area at the bottom of the problem, but there was a funky hack for putting the answer area where we wanted it to go. (Looking back, it looks like we didn't think this was a problem for this exercise; looks like it actually is!)
    
    Herein I execute the funky hack!
    
    Part of https://app.asana.com/0/42387144279526/39703832612436.
    
    Test Plan:
    For each of these exercises:
    Load it up.
    Unfocus the solution input area.
    Tap the input area again. The handwriting keyboard should come up.
    Take a hint. You should see the hint appear as normal.
    
    Reviewers: emily, eater
    
    Reviewed By: eater
    
    Subscribers: emily, eater
    
    Differential Revision: https://phabricator.khanacademy.org/D20139
Commits on Jul 23, 2015
  1. @tomyedwab

    Fix comparing_fractions_1 freezing issue again.

    tomyedwab authored
    Summary:
    I was horribly misled! I found this bug on Monday but Ben Eater told me it was
    fixed by Marcia's commit D19680. I should have looked more closely at that
    commit, because it turns out that change didn't fix the bug =(
    
    Test Plan:
    Load the exercise /e/comparing_fractions_1
    Do a bunch of problems to satisfy myself that both problem types work now.
    
    Reviewers: marcia, eater
    
    Reviewed By: eater
    
    Differential Revision: https://phabricator.khanacademy.org/D19788
Commits on Jul 21, 2015
  1. @petercollingridge

    Fix hints

    petercollingridge authored
    Summary: The hints were using the wrong numbers, quite badly.
    
    Reviewers: emily, eater
    
    Reviewed By: eater
    
    Differential Revision: https://phabricator.khanacademy.org/D19633
  2. @petercollingridge

    Add missing plus sign to equation

    petercollingridge authored
    Summary: For https://khanacademy.atlassian.net/browse/AI-890139
    
    Reviewers: emily, eater
    
    Reviewed By: eater
    
    Differential Revision: https://phabricator.khanacademy.org/D19632
  3. @petercollingridge

    Remove redundant words (angle)

    petercollingridge authored
    Summary: I've removed the word angle, since I'm using the angle symbol.
    
    Reviewers: emily, eater
    
    Reviewed By: eater
    
    Differential Revision: https://phabricator.khanacademy.org/D19631
  4. @petercollingridge

    Fix test for point in shaded area

    petercollingridge authored
    Summary: For https://khanacademy.atlassian.net/browse/AI-838053
    
    Test Plan: Make sure exercises/graphing_systems_of_inequalities_2.html?seed=13&problem=0&debug&lang=en gives the correct answer and maybe try a few others
    
    Reviewers: emily, eater
    
    Reviewed By: eater
    
    Differential Revision: https://phabricator.khanacademy.org/D19634
  5. Avoid a denominator that imposes impossible constraints

    Marcia Lee authored
    Summary:
    After 52d35b2, which improved the hints in this exercise, we found a number of bug reports that claimed mastery challenges could not be opened. After some further investigation, it came to be known that it was a problem with this exercise.
    
    In particular, loading localhost:8000/exercises/comparing_fractions_1.html?debug&problem=same-denominator&seed=2 would not load.
    
    This is because we have these #s:
    DEN_1 = 2
    DEN_2 = 2
    NUM_1 = 1
    NUM_2 needs to be a number between 1 and 0 that isn't 0... hmmm....difficult difficult lemon difficult.
    
    Now we sidestep the DEN_2 possibility, and we hope that no more browsers hang in existential crisis in search of this impossible NUM_2.
    
    Test Plan:
    Load the aforementioned seed successfully
    Cross fingers that nothing else breaks
    Believe that everything will be completely fine since Eater was doing most of the thinking and Marcia was doing most of the typing!
    
    Reviewers: eater
    
    Reviewed By: eater
    
    Differential Revision: https://phabricator.khanacademy.org/D19680
Commits on Jul 17, 2015
  1. @brownhead

    Revert "Removing gandalf bridge"

    brownhead authored
    This reverts commit e4f1c17.
    
    Test Plan:
    Crossed fingers
    
    Auditors: jlfwong,phillip
Commits on Jul 14, 2015
  1. @lemonade512

    Removing gandalf bridge

    lemonade512 authored
    Summary:
    Removing the gandalf bridge that was created for the offline hint cheating project.
    This will be landed with D19424
    
    Test Plan:
    - Load up an exercise and do a few problems
    - See that there are no errors
    
    Reviewers: johnsullivan
    
    Reviewed By: johnsullivan
    
    Differential Revision: https://phabricator.khanacademy.org/D19420
Commits on Jul 6, 2015
  1. @akornilo

    Change topic field to reflect change in Exercises

    akornilo authored
    Reference: D19083 - depends on commit in webapp to change the Exercises model
    Test Plan:
    Loaded problem page and made sure topic field set properly in request.
    
    Auditors: tom, benkomalo
Commits on Jul 3, 2015
  1. @petercollingridge

    Update views of a function exercise

    petercollingridge authored
    Summary: For an email request from Tomer
    
    Reviewers: emily, eater
    
    Reviewed By: eater
    
    Subscribers: justin
    
    Differential Revision: https://phabricator.khanacademy.org/D16692
  2. @petercollingridge

    Improve hints for comparing fractions exercises

    petercollingridge authored
    Summary:
    For an email request from Lindsay Spears and Cameron Christensen. I've updated how the code for drawing arrows works. I don't think it should break anything and was bit confusing previously since for short paths it didn't draw the arrows but didn't raise an error. It seems also this is the only khan-exercise that uses curvyArrow.
    Improve hints
    
    Allow arrows to be drawn on short paths
    
    Update hints
    
    Test Plan: Try the hints and ensure they make sense.
    
    Reviewers: emily, eater
    
    Reviewed By: eater
    
    Differential Revision: https://phabricator.khanacademy.org/D16999
  3. @petercollingridge

    Ensure that numbers aren't signed and make hints more consistent with…

    petercollingridge authored
    … other hints
    
    Test Plan: Try some exercise and make sure there aren't any negative numbers.
    
    Reviewers: emily, eater
    
    Reviewed By: eater
    
    Differential Revision: https://phabricator.khanacademy.org/D16825
  4. @petercollingridge

    Simplify ellipse intuition exercise

    petercollingridge authored
    Summary: For an email request from Justin
    
    Reviewers: emily, eater
    
    Reviewed By: eater
    
    Differential Revision: https://phabricator.khanacademy.org/D17434
  5. @petercollingridge

    Avoid repeated inequality in answer

    petercollingridge authored
    Summary: Avoid having two an answer contain the same inequality as described at https://khanacademy.atlassian.net/browse/AI-536286
    
    Reviewers: emily, eater
    
    Reviewed By: eater
    
    Differential Revision: https://phabricator.khanacademy.org/D17662
  6. @petercollingridge
  7. @petercollingridge

    Remove exercise about area of kites

    petercollingridge authored
    Summary: For an email request from Ben Stenhaug. Cameron also asked for the exercise to be renamed Area of trapezoids.
    
    Reviewers: emily, eater
    
    Reviewed By: eater
    
    Differential Revision: https://phabricator.khanacademy.org/D19029
  8. @petercollingridge

    Adjust question to avoid answer prompt from blocking part of the clock

    petercollingridge authored
    Summary: For an email request from Priya. Ideally we could disable the prompt, but if we can't or don't want to, this should be slightly better.
    
    Reviewers: emily, eater
    
    Reviewed By: eater
    
    Differential Revision: https://phabricator.khanacademy.org/D19030
Commits on Jun 25, 2015
  1. @brownhead

    Prevent non-blocking error when taking hints.

    brownhead authored
    Summary:
    Asana task: https://app.asana.com/0/27216215224639/38544742984105
    
    If you don't pass the exercises_server_action_queue bridge, you will
    run into a JS error when taking hints on a Khan Exercises problem. This
    error will not prevent any behavior though (ie: you'll still get a hint
    and everything will be fine).
    
    Additionally, remove a variable that was set and then never accessed.
    
    Test Plan:
    1) Go to /math/trigonometry/less-basic-trigonometry/law-sines-cosines/e/law_of_sines
       while *not* passing the exercises_server_action_queue.
    2) Take a hint.
    3) See no JS errors!
    
    Reviewers: phillip, jlfwong
    
    Reviewed By: jlfwong
    
    Differential Revision: https://phabricator.khanacademy.org/D18849
Commits on Jun 20, 2015
  1. @petercollingridge

    Reduce graphie area to fit the question area

    petercollingridge authored
    Summary: For an email request from Sandy K
    
    Reviewers: emily, eater
    
    Reviewed By: eater
    
    Differential Revision: https://phabricator.khanacademy.org/D18723
Commits on Jun 19, 2015
  1. @lemonade512

    Adding new code to gandalf bridge

    lemonade512 authored
    Auditors: johnsullivan
  2. @beneater

    Fix js errors in local mode for exercise screenshotting

    beneater authored
    Summary:
    We have a nightly process that grabs screenshots of all of our exercises to use
    in various places around the site. This process uses khan-exercises in local
    mode (i.e., standalone, outside of webapp) so that it can pass in specific
    seeds and problem types in order to screenshot particular problems.
    
    For example, it does things like load the following URL and screenshot
    the contents of `div#problemarea`:
    http://sandcastle.kasandbox.org/media/castles/Khan:master/exercises/law_of_cosines.html?problem=find-side&seed=64
    
    This diff fixes some javascript errors that occur only in local mode that are
    currently preventing the screenshotter from doing its thing.
    
    Test Plan:
    1. From khan-exercises, run `python -m SimpleHTTPServer 9999`
    2. Load http://localhost:9999/exercises/law_of_cosines.html?problem=find-side&seed=64
    3. Verify there are no JS errors in the console
    4. Copy this new interface.js into webapp/khan-exercises
    5. Load http://localhost:8080/exercise/addition_1
    6. Answer questions and verify in chrome network panel that POSTs are going to /api/internal/.../attempt
    7. But mostly cross fingers this doesn't break anything in D18611 and D18675
    
    Reviewers: phillip, johnsullivan
    
    Reviewed By: phillip, johnsullivan
    
    Differential Revision: https://phabricator.khanacademy.org/D18742
  3. @petercollingridge

    Update fractions for ordering fractions

    petercollingridge authored
    Summary: Update fractions based on email request from Lindsay. Hints based on https://www.khanacademy.org/quetzalcoatl/lindsay-world/lindsayland3/e/lindsay-ideas-3/edit/xd07e73d879912d79
    
    Test Plan: Make sure the hints still make sense.
    
    Reviewers: emily, eater
    
    Reviewed By: eater
    
    Differential Revision: https://phabricator.khanacademy.org/D17070
Something went wrong with that request. Please try again.