Integrating the Student Line Grapher
The student line grapher can be easily integrated into a variety of activities. All that is needed is a javascript function that connects the graph to a form element. When the Student Line Grapher is used in a web page it accepts the following variables via the FlashVars parameter.
- qid=
The name of the form element where the answer should be stored. - answer=
The equation that should be on the graph when the flash module starts. See the special equation format below.
When the student draws a line the JavaScript function flash_response(answer) is called. Answer will contain the name of the html element to store the answer and the value to store. This is delimited by a colon (:).
Equation/Inequality Format
The format of the equation is y-intercept or slope-intercept form, y = m*x + b. All elements of the equation are separated by a space. The values of the slope (m) and the y-intercept (b) is to the nearest thousandth decimal place and both can be negative numbers. Instead of using standard symbols for the equation the following were used to eliminate the need to encode and decode the < and > symbols.
Operation | Abbreviation |
Equality (=) | eq |
Greater than (>) | gt |
Less than (<) | lt |
Greater than or equal to (>=) | ge |
Less than or equal to (<=) | le |
For example the following equation y < -3x + 3 would be represented as y lt -3x + 3. The vertical line where x equals 3 would be x eq 3. The horizontal line where y equals 3 would be y eq 0x + 3.
- Login to post comments