Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Jan 9, 2015
  1. @crm416

    Use mouseTarget.getMouseTarget() where applicable

    crm416 authored
    Summary:
    A lot of the highlight effects were failing due to use of mouseTarget[0] that
    should have been changed to mouseTarget.getMouseTarget(). This changes all the necessary
    calls in khan-exercises.
    
    I also snuck in a line to remove arrowheads from lines when `remove` is called as I noticed
    that they were lingering in the transformer.
    
    Test Plan:
    - Run khan-exercises
        - Run [Inscribing and Circumscribing Circles on a Triangle](http://localhost:8000/exercises/inscribing_and_circumscribing_circles_on_a_triangle.html).
        - Add a compass
            - Verify that the whole circle highlights when you mouseover the center
        - Add a straightedge
            - Verify that the whole line (including the points, but not the arrowheads) highlights when you mouseover the line
    - Run Perseus
        - Create a [transformer](http://localhost:9000/test.html#content=%7B%22question%22%3A%7B%22content%22%3A%22%2A%2AMove%20the%20line%20using%20a%20translation%20of%20%24-2%24%20in%20the%20%24x%24-direction%20and%20%24%2B4%24%20in%20the%20%24y%24-direction.%2A%2A%5Cn%5Cn%5B%5B%E2%98%83%20transformer%201%5D%5D%5Cn%5CnWhen%20a%20line%20is%20translated%2C%20the%20image%20created%20is%20a%20%5B%5B%E2%98%83%20dropdown%201%5D%5D.%5Cn%5CnWe%20know%20this%20is%20true%2C%20because%20the%20translated%20image%20has%20%5B%5B%E2%98%83%20dropdown%202%5D%5D%20endpoints.%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%22transformer%201%22%3A%7B%22type%22%3A%22transformer%22%2C%22graded%22%3Atrue%2C%22options%22%3A%7B%22starting%22%3A%7B%22shape%22%3A%7B%22type%22%3A%5B%22line%22%5D%2C%22coords%22%3A%5B%5B-5%2C-7%5D%2C%5B7%2C-3%5D%5D%7D%2C%22transformations%22%3A%5B%5D%7D%2C%22graphMode%22%3A%22interactive%22%2C%22listMode%22%3A%22dynamic%22%2C%22tools%22%3A%7B%22translation%22%3A%7B%22enabled%22%3Atrue%2C%22constraints%22%3A%7B%7D%7D%2C%22rotation%22%3A%7B%22enabled%22%3Atrue%2C%22constraints%22%3A%7B%22fixed%22%3Afalse%7D%2C%22coord%22%3A%5B0%2C0%5D%7D%2C%22reflection%22%3A%7B%22enabled%22%3Atrue%2C%22constraints%22%3A%7B%22fixed%22%3Afalse%7D%2C%22coords%22%3A%5B%5B1%2C1%5D%2C%5B3%2C3%5D%5D%7D%2C%22dilation%22%3A%7B%22enabled%22%3Atrue%2C%22constraints%22%3A%7B%22fixed%22%3Afalse%7D%2C%22coord%22%3A%5B6%2C6%5D%7D%7D%2C%22drawSolutionShape%22%3Afalse%2C%22gradeEmpty%22%3Afalse%2C%22graph%22%3A%7B%22range%22%3A%5B%5B-10%2C10%5D%2C%5B-10%2C10%5D%5D%2C%22step%22%3A%5B1%2C1%5D%2C%22markings%22%3A%22graph%22%2C%22labels%22%3A%5B%22x%22%2C%22y%22%5D%2C%22backgroundImage%22%3A%7B%22url%22%3Anull%2C%22scale%22%3A1%2C%22bottom%22%3A0%2C%22left%22%3A0%7D%2C%22showProtractor%22%3Afalse%2C%22showRuler%22%3Afalse%2C%22rulerLabel%22%3A%22%22%2C%22rulerTicks%22%3A10%2C%22gridStep%22%3A%5B1%2C1%5D%2C%22snapStep%22%3A%5B0.5%2C0.5%5D%7D%2C%22version%22%3A1.2%2C%22correct%22%3A%7B%22transformations%22%3A%5B%7B%22type%22%3A%22translation%22%2C%22vector%22%3A%5B-2%2C4%5D%7D%5D%2C%22shape%22%3A%7B%22type%22%3A%5B%22line%22%5D%2C%22coords%22%3A%5B%5B-7%2C-3%5D%2C%5B5%2C1%5D%5D%2C%22options%22%3A%5B%7B%7D%5D%7D%7D%7D%2C%22version%22%3A%7B%22major%22%3A0%2C%22minor%22%3A0%7D%7D%2C%22dropdown%201%22%3A%7B%22type%22%3A%22dropdown%22%2C%22graded%22%3Atrue%2C%22options%22%3A%7B%22choices%22%3A%5B%7B%22content%22%3A%22ray%22%2C%22correct%22%3Afalse%7D%2C%7B%22content%22%3A%22line%22%2C%22correct%22%3Atrue%7D%2C%7B%22content%22%3A%22segment%22%2C%22correct%22%3Afalse%7D%5D%2C%22placeholder%22%3A%22%22%7D%2C%22version%22%3A%7B%22major%22%3A0%2C%22minor%22%3A0%7D%7D%2C%22dropdown%202%22%3A%7B%22type%22%3A%22dropdown%22%2C%22graded%22%3Atrue%2C%22options%22%3A%7B%22choices%22%3A%5B%7B%22content%22%3A%220%22%2C%22correct%22%3Atrue%7D%2C%7B%22content%22%3A%223%22%2C%22correct%22%3Afalse%7D%2C%7B%22content%22%3A%221%22%2C%22correct%22%3Afalse%7D%5D%2C%22placeholder%22%3A%22%22%7D%2C%22version%22%3A%7B%22major%22%3A0%2C%22minor%22%3A0%7D%7D%7D%7D%2C%22answerArea%22%3A%7B%22type%22%3A%22multiple%22%2C%22options%22%3A%7B%22content%22%3A%22%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%7D%7D%2C%22calculator%22%3Afalse%7D%2C%22itemDataVersion%22%3A%7B%22major%22%3A0%2C%22minor%22%3A1%7D%2C%22hints%22%3A%5B%7B%22content%22%3A%22Here%27s%20how%20to%20translate%20the%20%24%5C%5Cblue%5C%5Ctext%7Bblue%20line%7D%24%3A%20%20%5Cn%24%5C%5Cbullet%24%20Click%20the%20%5C%22Translate%5C%22%20button.%20%20%5Cn%24%5C%5Cbullet%24%20Drag%20any%20orange%20point%20%242%24%20units%20to%20the%20%2Aleft%2A%20and%20%244%24%20units%20%2Aup%2A.%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%7D%7D%2C%7B%22content%22%3A%22When%20a%20line%20is%20translated%2C%20it%20remains%20a%20line.%20%20It%20still%20goes%20on%20forever%20in%20both%20directions.%20%20The%20new%20line%20has%20no%20endpoints%2C%20just%20like%20the%20original%20line.%5Cn%5CnThe%20translated%20line%20should%20look%20like%20this%3A%5Cn%21%5B%5D%28https%3A%2F%2Fka-perseus-graphie.s3.amazonaws.com%2Fb13b453e5ea64dec3e0a0d97110cf81c85424986.png%29%22%2C%22images%22%3A%7B%22https%3A%2F%2Fka-perseus-graphie.s3.amazonaws.com%2Fb13b453e5ea64dec3e0a0d97110cf81c85424986.png%22%3A%7B%22width%22%3A425%2C%22height%22%3A425%7D%7D%2C%22widgets%22%3A%7B%7D%7D%5D%7D).
        - Switch to 'reflect' and then to 'dilate'.
        - Verify that the arrowheads are gone.
    
    Reviewers: emily
    
    Reviewed By: emily
    
    Differential Revision: https://phabricator.khanacademy.org/D15635
Commits on Nov 20, 2014
  1. @xymostech @alopatin

    Rearrange answer area content within some exercises

    xymostech authored alopatin committed
    See https://docs.google.com/a/khanacademy.org/spreadsheets/d/1wCONrsK1ujRCLal7bcxS0cVkfpfKiPzapt3SsMJ_zqI/edit#gid=0
    
    Color: Green
    
    Test Plan:
    Take all hints and succesfully answer a question within each problem
    type for all modified exercises.
    
    Auditors: alex
Commits on Sep 22, 2014
  1. @petercollingridge
Commits on Mar 5, 2014
  1. @spicyj

    Use requirejs for module loading

    spicyj authored
    Summary: Also did some misc cleanup in khan-exercise.js, mostly related to module-y things ("151 ++----"). I combined local jquery-ui into one file to make it easier to load.
    
    Test Plan:
    Opened addition_1, deriviative_intuition, graphing_points_2 locally, and all looked fine.
    
    In webapp/khan-exercises/, ran:
    
    ```
    npm install -g requirejs
    r.js -o requirejs.config.js
    ```
    
    then saw that /exercises/addition_1 looked right.
    
    Reviewers: eater, jack
    
    Reviewed By: jack
    
    CC: alex
    
    Differential Revision: http://phabricator.khanacademy.org/D7095
Commits on May 31, 2013
  1. @csilvers

    Resolve some I18N todos, and simplify toSentence.

    csilvers authored
    Summary:
    Most of the todos I just removed as being to-done.
    
    For toSentence(), I got rid of the 'conjunction' argument, which was
    always either 'and' or the empty string.  When it was the empty
    string, I just replaced it by join(', '), which is what the
    exercise-author wanted to do in the first place.
    
    Some more i18n todo-ing -- get rid of some unused functions.
    
    Verified via
       fgrep -iw -e 'he(' -e 'an(' -e 'his(' -r exercises
    
    Put back an() and he() -- they're used after all.
    
    My grep was wrong.  It needs to be
    
       % grep -i -e '\<he(' -e '\<an(' -e '\<his(' -r exercises
       exercises/logical_arguments_deductive_reasoning.html:                        [[person(1)+" misses the bus", he(1)+" will be late for school",
       exercises/conditional_statements_2.html:                <var id="SOLUTION">["If", [an(CATEGORY), 1], ["is", 1], [an(TYPE), 1], "then", ["it", 2], [VERB_S+" "+CONCLUSION_S, 2]]</var>
    
    But
       % grep -i '\<his(' -r exercises
    still shows no hits.
    
    Get rid of the capital-case version of some functions, which are unused.
    
    Capitalize is ok -- javascript will do the right thing.
    
    Fix a typo: left in toSentence().
    
    Test Plan:
    In khan-exercises root, ran
       python -mSimpleHTTPServer
    and visited
       http://localhost:8000/exercises/divisibility_intuition.html
    and clicked on all the hints, until the last one said:
       The factors of 16 are 1, 2, 4, 8, and 16
    which is correct serialization.  Then I visited
       http://localhost:8000/exercises/reading_bar_charts_3.html
    and did problems until I got to a median problem, and clicked on all
    the hints until it listed all the scores, properly separated by just
    commas.  I did the exercise on www.khanacademy.org as well, to make
    sure the current behavior matches.
    
    Fingers crossed
    
    Fingers crossed.
    
    No results for:
       % grep -e '\<Him *(' -e '\<He *(' -e '\<An *(' -r exercises
    
    None
    
    Ran
       python -mSimpleHTTPServer
    and visited
       http://localhost:8000/exercises/reading_bar_charts_3.html
    and did questions until I got to a 'median' question involving the
    blue bars, and displayed all the hints, and saw they were rendered
    properly.
    
    Reviewers: emily, eater, john
    
    Reviewed By: emily
    
    CC: alpert
    
    Differential Revision: http://phabricator.khanacademy.org/D2497
Commits on May 7, 2013
  1. @jeresig
  2. @jeresig

    Revert linting changes.

    jeresig authored
Commits on Apr 25, 2013
  1. @jeresig

    Re-run the linter on the exercises, fixing data-if usage and replacin…

    jeresig authored
    …g entities with characters in data-if attributes.
  2. @jeresig

    Back out latest lint fix.

    jeresig authored
Commits on Apr 24, 2013
  1. @jeresig
  2. @jeresig
Commits on Apr 23, 2013
  1. @jeresig
  2. @jeresig

    Merging in from stable.

    jeresig authored
Commits on Apr 22, 2013
  1. @jeresig

    Clean up the newly-changed HTML exercises and also fix up the constan…

    jeresig authored
    …tly-expanding whitespace problem in the cleaner.
Commits on Apr 17, 2013
  1. @jeresig
  2. @cbhl
Commits on Apr 16, 2013
  1. @cbhl
  2. @jeresig
  3. @jeresig
  4. @jeresig
Commits on Apr 15, 2013
  1. @jeresig

    Revert recent fixes.

    jeresig authored
  2. @jeresig
  3. @jeresig
Commits on Apr 10, 2013
  1. @jeresig
  2. @jeresig

    Rewrote a number of exercises to better handle pluralization (reducin…

    jeresig authored
    …g the number of pluralization terms to only one per extracted string).
Commits on Jan 17, 2013
  1. @cbhl

    Use type=number on exercises with multiple inputs.

    cbhl authored
    Test Plan:
    local, Chrome/OS X with local hack to bypass touch detection in
    utils/answer-types.js
    
    Reviewers: tom, eater
    
    Reviewed By: eater
    
    CC: stephanie, alpert
    
    Differential Revision: http://phabricator.khanacademy.org/D1027
Commits on Jan 15, 2013
  1. @cbhl

    Add integer parameter to Divisibility Intuition

    cbhl authored
    Summary: Numeric keyboards on mobile.
    
    Test Plan:
    Visited exercise in Mobile Safari/iPad. Verified numeric keyboard appeared when
    touching an input box.  Visited exercise in Chrome/Mac OS X. Verified exercise
    still works.
    
    Reviewers: tom
    
    Reviewed By: tom
    
    CC: eater
    
    Differential Revision: http://phabricator.khanacademy.org/D1020
Commits on Jun 29, 2012
  1. @beneater

    Revert to Raphael 1.5.2

    beneater authored
    Reverts the following commits:
    
    807fb8b Use the newest version of raphael
    c347773 Fix rotation in derivative intuition
    1b63c14 Fix bar scaling in creating bar charts
    de985b8 Fix bugs with mean/median/stddev
    009aa9f Fix drawing lines with interactive
    765c97b Fix divisibility intuition
    7d24651 Make protractor work
    c6ead2b Fix weird fixed-point bug in telling time 2
    2f15f1f Refactor movable points to make more sense
    b2a5173 Remove a stray quote
    3c7c513 Re-draw the bar instead of scaling
    83483d9 Actually fix it by double-buffering
    72cbc21 Fix up styling and methods
Commits on Jun 19, 2012
  1. @xymostech

    Fix divisibility intuition

    xymostech authored
Commits on Jun 9, 2012
  1. @joshzimmerman

    Clarify answer format

    joshzimmerman authored
Commits on May 26, 2012
  1. @beneater

    Add exercise: Divisibility intuition

    beneater authored
    Reviewers: emily
    
    Differential Revision: http://phabricator.khanacademy.org/D99
Something went wrong with that request. Please try again.