Your Moodle version

Question types: Algebra

Maintained by Picture of Jean-Michel Védrine Jean-Michel Védrine
Question type where the student must answer by typing an algebra formula. Correctness can be checked by three different methods.

Created by Roger Moore

Algebra based question type for Moodle.

This plugin 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.


This plugin is part of set Seeking new maintainer.


Picture of Jean-Michel Védrine
Jean-Michel Védrine (Lead maintainer)
Yorkshire Rose
Roger Moore: Original Author
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Picture of Jean-Michel Védrine
    Mon, May 20, 2013, 4:28 PM
    Hello Brian,
    I have created CONTRIB-4315 tracker issue to keep track of the problem and published a new corrected version (1.11). As I expected it was only a 1 word change.Stupid mistake and not well tested code from me. Sorry for the inconvenience.
  • Picture of Uwe Wüst
    Sat, Mar 29, 2014, 6:18 PM
    Using the "algebra question type" I noticed, that some algebraic expressions entered by the user are translated in a strange way: entering "3 * 5" and checking the input by pressing the "display response" button leads to the output "3 times 5". This is very confusing when you enter large expressions. Is there an option to replace the word "times" by the point usually used für multiplications?
    Another problem I am facing is, that you cannot enter a variable that is not used für calculating the right answer. My pupils are supposed to transform terms. Sometimes it happens, that a variable contained in the beginning term "dissapears" during the transformation. When the pupils enter this variable and press the "display response" button, an error message appears and they know, that their solution is wrong before they press "submit" and get points or not. A workaround is, to enter the variable in the solution multiplied by zero, but as the right solution is displayed in the end, this leads to confusion, too.
    Example term: 3x-4x+y+x will be transformed to: y
    Entering any expression containing x will produce an error ...
  • Picture of Jean-Michel Védrine
    Sat, Mar 29, 2014, 8:46 PM
    Hello Ulwe,
    Have you the TeX filter or MathJax activated on your Moodle website ? I guess not because you should see a properly formatted response with a nice multiply sign rather than "times". I should make clear in the instructions that the algebra question type expect that there is a way to display TeX expressions activated for the display to work properly.
    Your problem with variables would be quite complex to solve and would need huge changes in the code from the way it works now. As this question type was created by Roger Moore and I am only maintaining it so that it works with current Moodle versions, I don't expect to be able to make such changes in a foreseeable future. Sorry.
    Maybe you should have a look at more complex math questions types like Stack or formulas to see if they better suit your needs ?
  • Picture of Jean-Michel Védrine
    Sat, Mar 29, 2014, 8:55 PM
    I have edited the documentation (see ) to make clear the requisite of a way to display TeX expressions.
  • Picture of Melissa Benson
    Thu, Apr 17, 2014, 11:09 PM
    Any idea when this will be available for 2.6?
  • Picture of Jean-Michel Védrine
    Fri, Apr 18, 2014, 4:55 PM
    Hello Melissa,
    I use the current version with Moodle 2.6 and also Moodle 2.7beta and I have not seen any problem. Also nobody reported any bug so I think you are safe to use it with Moodle 2.6. If you see any bug or problem, create a tracker issue and I will work on it.
  • Picture of Melissa Benson
    Mon, Apr 21, 2014, 9:29 PM
    Jean-Michel, That's great news. We've just upgraded to Moodle 2.6.2+ (Build: 20140417). Just curious, when I select "2.6" from the drop down menu to see if this plugin can work with that version, it doesn't show a download link. What are the qualifications that need to happen to get that to show? When would it show that it is compatible?
  • Picture of Jean-Michel Védrine
    Mon, Apr 21, 2014, 11:42 PM
    This is because I forgot to mark it as compatible with Moodle 2.6 and 2.7. Thanks a lot for reporting that problem. I think it is corrected now.
  • Picture of Bernhard Piazzi
    Sat, Jun 6, 2015, 5:51 PM
    Hi Jean-Michel! Is your Question Type working with Moodle 2.9?
  • Picture of Jean-Michel Védrine
    Sat, Jun 6, 2015, 8:29 PM
    Hello Bernhard, no problem has been reported for Moodle 2.9 and my tests seems to show everything is working as expected. But to be honest I must say that my production website s not running 2.9 and that I only have a few algebra questions (I converted a lot of questions to the formulas question type). Anyway I am still actively maintaining the algebra question type so if you find something broken with Moodle 2.9, create an issue in the CONTRIB tracker and I will do my best to fix the problem.
  • Picture of Lukas Koch
    Thu, Sep 3, 2015, 9:40 PM
    Hello Jean-Michel,

    we are using the algebra question type on a Moodle 2.9 server, but we have a problem with the formula preview: We cannot make the TeX preview work with MathJax. MathJax is enabled and works everywhere else on the site, but the preview in the algebra questions remains raw TeX code. If we enable the old TeX filter, the formulas get converted to images, but it also breaks the displayed formulas in the rest of the site: All TeX is interpreted as inline math.

    Do you have any idea, what might cause this and how to fix it?
  • Picture of Lukas Koch
    Mon, Sep 14, 2015, 6:10 PM
    Hello everyone,

    I solved my problem described above. To fix the LaTeX preview of the algebra questions, I had to insert the line

    into the "Within HEAD" section in the "Site administration > Appearance > Additional HTML" settings. Now the preview uses MathJax as it should.

  • Picture of Lukas Koch
    Mon, Sep 14, 2015, 6:13 PM
    Okay, moodle seems to eat my html.

    The line should read:

    [script type="text/javascript" src=""][/script]

    Just replace the square brackets with the angular html kind.
  • Picture of Janice Love
    Tue, Nov 24, 2015, 7:08 PM
    Dear Jean-Michel,

    Similarly to Lukas we are using the algebra question type on a Moodle 2.8 server, the TeX preview does not work with MathJax. MathJax is enabled and works everywhere else on the site, but the preview in the algebra questions remains raw TeX code. The fix Lukas mentions above cannot be implemented on our server, is there any alternative way of correcting this?
    Thanking you in advance,
  • Picture of Jean-Michel Védrine
    Sun, Jan 24, 2016, 8:32 PM
    I have released a new version that should solve the problem with the display of the formula entered by the student.
    I am not quite satisfied with the way I choose to solve this problem but that's all I can do for now.
    I think it's honest to say that my teacher career will end in 5 months from now and I am not sure I will be able to maintain that plugin after that date.
1 2
Please login to post comments