Skip to content
This repository

A framework for building exercises to work with Khan Academy.

Make sure oauth ajax requests from exercises are going to ka.org

Summary: We'd tried appending https://ka.org in $.ajax beforeStart, but since that happens after oauth is set up, authentication failed. This adds ka.org to the requested URL if the URL is missing a domain and is trying to access the API (without this change, it defaulted to the window's location protocol, which is file:// in the iOS app).

Test Plan: Logged in & did exercises in the iOS & web apps; progress posted to the server successfully!

Reviewers: mgp, ben

Reviewed By: ben

Subscribers: alpert

Differential Revision: http://phabricator.khanacademy.org/D8321
latest commit 741110c96c
Laura Savino lsavino authored April 17, 2014
Octocat-spinner-32 build Add a <span> around a text node for some reason March 19, 2014
Octocat-spinner-32 css Move css to external file and swap pink for orange April 10, 2014
Octocat-spinner-32 exercises Use PRETTY instead of POTATO April 14, 2014
Octocat-spinner-32 images Update badge images and fix clipping October 23, 2013
Octocat-spinner-32 local-only substate KAS March 31, 2014
Octocat-spinner-32 test Change tests to conform March 26, 2014
Octocat-spinner-32 third_party Use requirejs for module loading March 05, 2014
Octocat-spinner-32 tools Add tools/runlint.py, which will be automatically run by khan-linter. September 12, 2013
Octocat-spinner-32 utils log subhint usage April 16, 2014
Octocat-spinner-32 .arcconfig Set arcanist project in .arcconfig to tag reviews January 21, 2013
Octocat-spinner-32 .gitignore Add build/lxml to .gitignore April 02, 2014
Octocat-spinner-32 .gitmodules Move qunit to a more-global directory July 13, 2011
Octocat-spinner-32 .travis.yml Switch travis notifications to Exercises March 25, 2014
Octocat-spinner-32 Makefile Revamp pack.rb input handling again. I'm starting to learn ruby!, a l… October 09, 2013
Octocat-spinner-32 README.md Update readme January 29, 2014
Octocat-spinner-32 exercises-stub.js (khan-exercises) Replace top-level var declaration with explicit glob… October 31, 2013
Octocat-spinner-32 history.js Fix coach report answer correctness color March 25, 2014
Octocat-spinner-32 interface.js Make sure oauth ajax requests from exercises are going to ka.org April 17, 2014
Octocat-spinner-32 khan-exercise.js Make sure LocalStore exists before trying to access it for the scratc… April 16, 2014
Octocat-spinner-32 lint_blacklist.txt Use requirejs for module loading March 05, 2014
Octocat-spinner-32 main.js Use requirejs for module loading March 05, 2014
Octocat-spinner-32 related-videos.js Remove relatedVideosRendered event March 17, 2014
Octocat-spinner-32 requirejs.config.js Remove geometry proofs exercises March 09, 2014
Octocat-spinner-32 requirements.txt First pass at creating a new extract-strings.py script for our i18n e… January 21, 2013
README.md

Khan Academy Exercises

Copyright (c) 2013 Khan Academy

The exercise framework is MIT licensed.

The exercises are under a Creative Commons by-nc-sa license.

Exercise Framework

Khan Academy has created a generic framework for building exercises. This framework, together with the exercises themselves, can be used completely independently of the Khan Academy application.

The framework exists in two components:

  • An HTML markup for specifying exercises.
  • A jQuery plugin for generating a usable, interactive, exercise from the HTML markup.

Using the Framework Locally

You need to serve the files from some sort of a server. You can't just open the files directly in a browser. For example:

cd khan-exercises
python -m SimpleHTTPServer # or python3 -m http.server

Now if you open your browser to http://localhost:8000 (or http://127.0.0.1:8000/) you should see the contents of the khan-exercises directory. Navigate to the exercises subfolder, and an HTML file under there to see an exercise.

Exercise Development

This framework supports over 450 of our current math exercises including updated versions of many exercises Sal built for his cousins before he made his first video! New exercises on Khan Academy, however, are now written by many content experts using Perseus and stored in our datastore as individual questions.

More

If you're passionate about providing a free world-class education for anyone, anywhere and want to apply to be a full-time or intern software developer at Khan Academy, please do so.

Something went wrong with that request. Please try again.