Note: You are currently viewing documentation for Moodle 3.1. Up-to-date documentation for the latest stable version of Moodle is probably available here: Algebra question type.

Algebra question type: Difference between revisions

From MoodleDocs
No edit summary
Line 1: Line 1:
{{stub}}
{{stub}}
This contributed code module is a question type for that allows for symbolic algebraic responses.
This contributed code module is a question type for that allows for symbolic algebraic responses.
This is a new question type for Moodle. It implements an algebraic question type where student responses are treated as an algebraic expression and compared to instructor provided answers using the basic rules of algebra. For example if the instructor provided response is <math>\sin 2\theta</math> then a student entiering <math>2\sin\theta\cos\theta</math> will have their answer treated as matching. The code has been tested in production use with ~230 first year physics students without problems (using the evaluate comparison method only) - mainly thanks to some excellent feedback and testing from Moodle users on the quiz forum before deployment!
Three comparison methods are provided:
* Evaluation: this is the default and best tested method. It "cheats" by evaluating both the answer and the student response for various random combinations of the variables and ensures that both match to within tolerance at all points.
* Sage: This method requires the external, open source Sage symbollic algebra system to be installed. A simple XMLRPC server script in Python is included in the package, sage_server.py, and this provides a method to symbollically compare two expressions. (NOT RECOMMENDED FOR PRODUCTION USE)
* Equivalence: this uses the internal PHP algebra parser to compare the two expressions. It was intended for use in "expand..." and "factor..." type questions where a full symbollic comparison would allow the student to enter the unexpanded (or unfactorized) expression. (NOT RECOMMENDED FOR PRODUCTION USE)


==Features==
==Features==

Revision as of 23:53, 16 July 2009

This contributed code module is a question type for that allows for symbolic algebraic responses.

This is a new question type for Moodle. It implements an algebraic question type where student responses are treated as an algebraic expression and compared to instructor provided answers using the basic rules of algebra. For example if the instructor provided response is then a student entiering will have their answer treated as matching. The code has been tested in production use with ~230 first year physics students without problems (using the evaluate comparison method only) - mainly thanks to some excellent feedback and testing from Moodle users on the quiz forum before deployment!

Three comparison methods are provided:

  • Evaluation: this is the default and best tested method. It "cheats" by evaluating both the answer and the student response for various random combinations of the variables and ensures that both match to within tolerance at all points.
  • Sage: This method requires the external, open source Sage symbollic algebra system to be installed. A simple XMLRPC server script in Python is included in the package, sage_server.py, and this provides a method to symbollically compare two expressions. (NOT RECOMMENDED FOR PRODUCTION USE)
  • Equivalence: this uses the internal PHP algebra parser to compare the two expressions. It was intended for use in "expand..." and "factor..." type questions where a full symbollic comparison would allow the student to enter the unexpanded (or unfactorized) expression. (NOT RECOMMENDED FOR PRODUCTION USE)

Features

  • The students enter responses in a text box, like calculated and numeric questions
  • The formula they entered is rendered in the box below by clicking on a button.
  • Option of three different comparison methods: SAGE, Evaluation or Equivalence
  • Core functionality works entirely within Moodle - external programs are optional
  • Works with Moodle 1.9

See also