Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Nov 21, 2013
  1. @beneater

    Remove many unused exercise files

    beneater authored
    There are still a few unused ones waiting to be deployed (or waiting for me to double check w/ elizabeth about)
    
    Test Plan:
    Run this:
    ```
    from contextlib import closing
    import glob
    import json
    import urllib2
    
    files = set([f.split('/')[1] for f in glob.glob("exercises/*.html")])
    required = set()
    
    with closing(urllib2.urlopen("https://www.khanacademy.org/api/v1/exercises")) as exercise_data:
        exercises = json.loads(exercise_data.read().decode('utf-8'))
        for exercise in exercises:
            if exercise['live'] and not exercise['uses_assessment_items'] and not exercise['deleted']:
                required.add(exercise['file_name'])
    
    print required - files
    ```
    Verify it outputs `set([])`
    Also, manually verify the alternate files required by `exercises/file_experiments.py` and `exercises/handler_raw.py` are still there.
    
    Auditors: alex
Commits on Sep 9, 2013
  1. @csilvers

    Fix up some exercises by running the linter.

    csilvers authored
    Summary:
    I ran
       build/lint_i18n_strings.py --fix exercises/*.html
    This is the result.
    
    The changes fall into a few categories:
    1) \text{xxx} where xxx needs to be marked for translation
    2) lxml changes to make things more 'proper' html (get rid of />, add
       ="" to some attributes, etc).
    3) An upgrade to the new isSingular syntax.
    
    I removed the following files from this changeset because I'm not sure
    whether 'moles' should be translated or not, so I didn't want to
    modify the files before I confirmed:
       exercises/ideal_stoichiometry.html
       exercises/limiting_reagent_stoichiometry.html
    
    I also reverted exercises/inequalities_on_a_number_line.html which is
    fine, but a bug in the linter wants to rewrite it anyway.
    
    Fix dividing_fractions_word_problems to use plurals better.
    
    I'm still not 100% sure it's always right, but it's better than
    before, and any count-matching errors were there before as well.
    
    Fix i18n-plural for degrees.
    
    There are two degree problems, each of which can have a '1 degree'
    number in one of the three vars (x, y, and z).  I fixed them up to use
    the plural_form var.
    
    Test Plan:
    I ran
       python -mSimpleHTTPServer
    and visited
       localhost:8000/exercises
    and clicked on each exercise in this commit, and then clicked to see
    all the hints, and read them to make sure there was no problem.  I
    didn't check any foreign languages, but for English at least it all
    looked ok.
    
    Ran
       python -mSimpleHTTPServer
    and visited
       http://localhost:8000/exercises/dividing_fractions_word_problems.html
    and reloaded until I got a 'paint' problem.  I read the problem and
    all the things and verified they were grammatical.
    
    Then I repeated this by reloading until I got a 'swim team' question.
    
    Ran python -mSimpleHTTPServer and visited
       http://localhost:8000/exercises/negative_number_word_problems.html
    and reloaded until I got each of the two temperature problems.  For
    each one, I clicked on the hints, and made sure everything read
    grammatically.
    
    Reviewers: eater, alpert
    
    Reviewed By: alpert
    
    Differential Revision: http://phabricator.khanacademy.org/D3902
Commits on Jul 26, 2013
  1. @spicyj

    Remove 'dollar' answer type

    spicyj authored
    Auditors: eater
Commits on Jul 6, 2013
  1. @mauk81

    fix plural in problem text, fix #47643

    mauk81 authored
    *isSingular(randRange( 1, 8 ))* and *<var>randRange( 1, 8 )</var> hour/s* are different numbers. i added a new variable *sleddingHours* and use it as *<var>sleddingHours</var> <var>plural("hour", sleddingHours)</var>*
Commits on Jun 12, 2013
  1. @xymostech

    Don't use $._ inside of <var>s

    xymostech authored
    Summary:
    Take every use of $._ inside of normal <var>s and move them into <div
    class="vars"> instead. Also, add some tests to the linter to throw errors when
    $._ is used in <var>s.
    
    Test Plan:
    Run linter (not with --fix) on the exercises, see that there are no
    errors related to $._ in <var>s. Visit a bunch of changed exercises locally,
    make sure that there are no errors in the javascript console.
    
    Reviewers: john, csilvers, eater
    
    Reviewed By: csilvers
    
    CC: alpert
    
    Differential Revision: http://phabricator.khanacademy.org/D2628
Commits on May 29, 2013
  1. @xymostech

    Fix up most instance of \text{} using the linter

    xymostech authored
    Summary:
    There are a couple cases that had to be fixed up manually, and a lot of
    instances that incorrectly tried to wrap $._ around things that shouldn't be
    translated (mostly the chemistry exercises). There are a couple instances that
    I wasn't sure about (like the "R" in remainder) that I didn't include.
    
    Test Plan:
    Visit the changed exercises, make sure that the exercise renders and
    there were no errors. Take all the hints, and make sure that instances of text
    in mathjax render correctly.
    
    Reviewers: john
    
    Reviewed By: john
    
    CC: alpert, eater
    
    Differential Revision: http://phabricator.khanacademy.org/D2445
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
  3. @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
  3. @cbhl
Commits on Apr 16, 2013
  1. @cbhl
  2. @jeresig
  3. @jeresig
  4. @jeresig
  5. @jeresig
Commits on Apr 15, 2013
  1. @jeresig

    Revert recent fixes.

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

    Add in a tool for automatically fixing some i18n issues in exercises.…

    jeresig authored
    … Right now it just fixes pronoun usage.
    
    Summary:
    There are some methods that are used in exercises that need to be banned in order to make our translation efforts sane. Some of these methods can be fixed programmatically - which is what I'm attempting to do here.
    
    To start I'm targeting these four methods: `he(NUM)/He(NUM)/his(NUM)/His(NUM)`
    
    I go through all the extracted strings in an exercise and look for `var` elements that contain one of those four methods. If it exists then I make sure that every usage of one of those methods has the same `NUM` specified. If different `NUM`s are used then the file will have to be fixed manually (at the moment only 3 strings in 3 files suffer from this problem).
    
    Assuming the `NUM`s are all the same we then then convert the existing string like so:
    
        <p><var>He(1)</var> threw a ball!</p>
    
    Becomes:
    
        <p data-if="isMale(1)">He threw a ball!</p><p data-else>She threw a ball!</p>
    
    (This is using the built-in data-if/data-else scheme used in exercises and makes use of a new method I've introduced: `isMale`.)
    
    This makes it so that each sentence only has a single gender being used and it's being displayed inline (making translation super-simple).
    
    Test Plan: Run `python build/extract_strings.py --fix exercises/*.html`. At the moment it should say that there are four errors (this is correct). If you were to reset all of the exercises back to their original state you woulud see that the script also modifies the files.
    
    Reviewers: csilvers, eater
    
    CC: alpert
    
    Differential Revision: http://phabricator.khanacademy.org/D2124
Commits on Apr 12, 2012
  1. @beneater

    Merge branch 'patch-1' of https://github.com/wohanley/khan-exercises

    beneater authored
    Conflicts:
    	exercises/negative_number_word_problems.html
    
    close #10991 fix #6901
Commits on Apr 10, 2012
  1. @beneater
Commits on Jan 15, 2012
  1. @spicyj

    Run JSHint

    spicyj authored
    ... for questionable benefit.
Commits on Jan 12, 2012
  1. @wohanley

    Fixes #6091, I think - as long as he's renting rather than buying equ…

    wohanley authored
    …ipment, it won't affect his net worth.
Commits on Jan 4, 2012
  1. @spicyj
Commits on Oct 4, 2011
  1. @jpulgarin
Something went wrong with that request. Please try again.