Skip to content
This repository has been archived by the owner on May 11, 2021. It is now read-only.

Writing Exercises: Modules

jruberg edited this page Jul 6, 2011 · 8 revisions

Modules

Depending upon the type of exercise that you're writing you'll likely need to load one or more utility modules in order to render the exercise correctly. This can be done by specifying a data-require="..." attribute on the HTML element of the page.

There are an ever-increasing number of modules (you can find them in the utils/ directory) but the ones that you'll most-likely need are:

  • math (for math-related formulas and utility methods)
  • graphie (for rendering graphs and charts)
  • word-problems (for word problems)

There are also utils for angles, calculus, exponents, kinematics, probability, etc.

<!DOCTYPE html>
<html data-require="math word-problems"> <!-- Your modules go on this line... -->
<head>
	<title>Name of Your Exercise</title>
	<script src="../khan-exercise.js"></script>
</head>

Back to Writing Exercises: Home