Fix scratchpad undo

Three undo bugs fixed:
1) Undo didn't work at all (mousedown was saving state when
   toolbar was clicked).
2) Undo was adding back in clipped lines.
3) Using the eraser added state to undo even if you didn't
   actually erase anything. (N.B. stopped using shapes.length
   here as it doesn't work: length doesn't change when things
   are .remove()'d)
Merge pull request #68397 from theinternetftw/fix-scratchpad-undo

Fix scratchpad undo
trig_addition_identities: Allow decimals

Auditors: eater
Add a test that says that 'isSingular' spans have to be at the bottom level.

Summary:
When translating, we replace a pair of 'isSingular'/'else' spans by
possibly a whole bunch of spans, one for each plural-form that a
language has.  This means that the spans must contain the actual text
to be translated.  If instead we have:

   <isSingular>
      <if foo>foo</if>
      <if bar>bar</if>
   </isSingular>
   <else>
      <if foo>foos</if>
      <if bar>bars</if>
   </else>

then we don't know how to automatically rewrite this for languages
with 5 plural forms.  Instead it needs to be
   <if foo>
      <isSingular>foo</isSingular>
      <else>foos</else>
   </if>
   <if bar>
      <isSingular>bar</isSingular>
      <else>bars</else>
   </if>
-- the 'isSingular' spans need to be distributed down.

I write a test that looks for this bad form, though I don't try to
automatically fix it (maybe possible, actually, but too much work for
now).

Fix the problematic file to distribute the isSingular spans down.

Get rid of class I started to write but ended up not using.

Allow isSingular nodes to be nested with each other.

We need to be able to support
   <isSingular(VAR_A)><isSingular(VAR_B)>text</else>text...

Test Plan:
Added a unittest case for this.

build/lint_i18n_strings.py exercises/reading_stem_and_leaf_plots.html

None

build/lint_i18n_strings_test.py

Reviewers: john

Reviewed By: john

CC: mattfaus, alpert

Differential Revision: http://phabricator.khanacademy.org/D3874
Include debug log in issues, add ex name info

Trying to debug the latest slew of mysterious issues.

Auditors: eater
Fix set answer type

More tests! Fixes #67477.

Auditors: emily

CC: eater
visualizing_derivatives: Fix #68721

Test Plan:
- doing nothing is empty
- checking no solution is correct
- moving window and checking no solution is correct
- moving window is wrong

Auditors: eater
When 'Skip the rest' is shown during pretest, make its enabled/disabled states follow those of the other buttons when answers are being submitted

Auditors: Ben Kamens, Eliana Feasley
Merge branch 'master' of http://github.com/Khan/khan-exercises
Sort numbers in order

Since I complain about this all the time for Perseus things I'll fix it here. :)

Auditors: eater
Add more loading logging

Auditors: eater
Hopefully fix multiple qtip bug

Summary:
If qtip tooltips can double up, I'm not entirely sure how this was supposed to work ever. Regardless, trying to fix this:

https://s3.amazonaws.com/uploads.hipchat.com/6574/33523/snvfcd5tutc0dri/upload.png

Reviewers: alex

Reviewed By: alex

Differential Revision: http://phabricator.khanacademy.org/D3880
Use atan2 instead of a buggy reimplementation

Test Plan:
On inscribed_angles_1.html?debug&problem=find-central-on&seed=67, dragging the yellow point to the exact left side of the circle works -- before it would jump to the right side when you were on the precise horizontal midline.

Auditors: eater
inscribed_angles_1: subsume 2 & 3

Test Plan:
Loaded each problem type sans JS errors, answered one from the old 2.

Auditors: eater
Fix processMath script for IE8, hopefully

IE8 doesn't like .text() on a script element; see http://stackoverflow.com/q/6720257/49485. Move to the same solution for setting text that we use in a couple of other places.

Test Plan:
Loaded quadrilateral_angles.html?seed=186&problem=isoscelesTrap1 without errors in Chrome.

Auditors: emily
fractions_cut_and_copy: Fix unit pluralization

Actually not 100% sure what to do with mixed numbers, but this should work for integers...

Auditors: eater
fractions_cut_and_copy_1 too

Second half of 832036c902142860468e45a0888d7ed3a15023ab.

Auditors: eater
Moar math

Auditors: eater
Fix typo

Auditors: eater
expected_value: fix #69067

Auditors: eater