question/type/algebra: Difference between revisions

From MoodleDocs
(Created page with "The algebra question type allows algebraic expressions for student answers which are evaluated by instructor provided answers using the basic rules of algebra. It was created by...")
 
m (added link to spanish translation of page)
Line 34: Line 34:


[[Category:Contributed code]]
[[Category:Contributed code]]
[[es:question/type/algebra]]

Revision as of 01:08, 30 September 2014

The algebra question type allows algebraic expressions for student answers which are evaluated by instructor provided answers using the basic rules of algebra. It was created by Roger Moore and first offered as contributed code in July 2009. It is currently maintained by Jean-Michel Védrine

Overview

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 entering 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 values combinations of the variables and ensures that both match to within tolerance at all points.
  • Sage: This method requires the external, open source Sage symbolic 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 symbolically 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)

Current 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 the "Display response" button.
  • Option of three different comparison methods: SAGE, Evaluation or Equivalence.
  • Support for multiple answers so partial credit or assistance can be provided to students.
  • Core functionality works entirely within Moodle - external programs are optional
  • Works with Moodle 2.3 and 2.4

Installation

  • Unzip the zip file into the <moodle root>/question/type directory. You should end up with a directory named <moodle root>/question/type/algebra.
  • Login as an administrator and visit the Site Administration page (http://<my moodle>/admin). Then follow the usual procedure to install a Moodle plugin.
  • Go to a course, click on question and select the new Algebra question type to add.

NB: If you wish to test the current Sage functionality you will also need to install Sage as well as run the python sevrer code with the command "sage - python sage_server.py". You will also need to go to Site Administration Plugins Question Types Algebra and enter the url to the server machine and port. This is not for the faint of heart and should not be used in a production system. The full functionality is available without Sage though: just use the evaluation method.

Troubleshooting

  • Failed to load question options from the table question_algebra for questionid <n>: this usually occurs because you have entered an algebra question into Moodle without having visited the site administration page (http://<my moodle>/admin) to install the plugin first. To fix it go to the Site Administration page while logged in as an administrator to install the plugin. Any existing algebra questions that were added (via editing or import) before this will need to be deleted since they are missing important information.

See also