Note: You are currently viewing documentation for Moodle 2.9. Up-to-date documentation for the latest stable version of Moodle may be available here: Formulas question type.

Formulas question type: Difference between revisions

From MoodleDocs
Formulas question type
Type question type
Set N/A
Downloads Formulas question type
Issues Tracker issues
Discussion See below.
Maintainer(s) Jean-Michel VĂ©drine
mNo edit summary
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{stub}}
{{Infobox plugin
{{Infobox plugin
|type = question type
|type = question type
|entry = https://moodle.org/plugins/view.php?plugin=qtype_formulas
|set = N/A
|tracker = https://tracker.moodle.org/browse/CONTRIB/component/14833/?selectedTab=com.atlassian.jira.jira-projects-plugin:component-summary-panel
|entry = [https://moodle.org/plugins/view.php?plugin=qtype_formulas Formulas question type]
|discussion = https://moodle.org/mod/forum/discuss.php?d=181049
|tracker = [https://tracker.moodle.org/issues/?jql=project%20%3D%20CONTRIB%20AND%20component%20%3D%20%22Question%20type%3A%20Formulas%22 Tracker issues]
|maintainer = [[user:Jean-Michel Védrine|Jean-Michel Védrine]]
|discussion = See below.
|maintainer = [https://moodle.org/user/view.php?id=8026&course=5 Jean-Michel Védrine]
|float = left
|float = left
}}
}}


==Is this really the question type for you?==
<div style="background:#d9edf7;color:#000000;padding:8px 20px 16px;border:1px solid #d9d9d9;border-radius:4px;">
The Formulas question type is a plugin for Moodle with random values and multiple answer fields. The answer fields can be placed anywhere in the question so that you can create questions involving various answer structures such as coordinate, polynomial, matrix, etc. Other features such as unit checking and multiple subquestions are also available. These functionalities can simplify the creation of questions in many fields related to mathematics, numbers and units, such as physics and engineering.


If you are dealing with problems such as those described below, then the Formulas question type is for you! Take, for example, a problem in structural engineering that may involve several parameters with a number of possible fixed and known values, such as:
For complete, up-to-date documentation on the Formulas question type, please see [https://moodleformulas.org/ '''MoodleFormulas.org'''].


Parameter:                      Possible values:
</div>
Bolt diameter (mm)              16, 20, 22, 24, 27, 30, 36
Plate thickness (mm)            16, 20, 25, 35, 40, 50
Steel strength (MPa)            300, 345, 350, 380
Concrete strength (MPa)        20, 25, 30
Reinforcing bar diameter (mm)  9.5, 12.7, 15.9, 19.1, 22.2, 25.4


A question that involves the five parameters, each with their possible values, has 7 x 6 x 4 x 3 x 6 = 3024 permutations (assuming here that they are all valid), much more than the limit of 100 in the Calculated question.


Even a simple question in basic mathematics can have a large number of permutations. The following one has 5 x 5 x 8 = 200 permutations:
==Usage==


Find the value of ''x'' = ''a''*(''b'' + ''c'')
You would enter your 'sets' (called 'lists' in formulas questions) in the 'Random variables' field when creating question as:
where
  • ''a'' is an odd number between and including 1 and 9
  • ''b'' is an even number between and including 2 and 10
  • ''c'' is an integer value between and including 1 to 3 or 7 to 11


This kind of question can be easily created using the Formulas question. To create the question, you would enter the sets of numbers in the 'Random variables' field as:
a = {100, 125, 150, 175, 200};
b = {1, 2, 3, 4, 5};
c = {10, 12, 14, 16, 18};


Variables
When an attempt is started a, b, and c will take a value drawn from the corresponding list at random.
  Random variables    a = {1:10:2};
                      b = {2:11:2};
                      c = {1, 2, 3, 7:12};


Note that sets of numbers can be in the format {start:stop:interval}, for example {1:10:2} and {2:11:2}. (The stop value is not included in the set and the interval is set to 1 when not specified). Sets of numbers can also be in the format of a list such as {1,2,3} for the set of numbers 1, 2 and 3. They can even be in a combination of the two formats, such as {1, 2, 3, 7:12}.
You can then define other variables depending of these ones in the 'Global variables' field if you want. For instance if you need the value of a+2*b somewhere in your question text or Combined or general feedback, just define


When an attempt is started, ''a'', ''b'', and ''c'' will take a value drawn from the corresponding set at random. If you want, you can define other variables as a function of the random ones in the 'Global variables' field. For instance, if you need the value of ''a''&nbsp;+ 2*''b'' somewhere in your question (that is the main question, subquestions, hints and feedbacks), just define a new variable, say ''d'', in the 'Global variables' field:
d=a+2*b; in 'Global variables'


Variables
Once you have defined your variables, you can use them in all the question's texts putting them in curly braces (for instance {a}, {b} or {d}). This is true not only for the Question text but also for all feedbacks and hints when you use interactive behaviour (The author thinks that the fact that variables can't be used in calculated question's feedback is a serious problem to give students an appropriate feedback using the values they saw in their attempt)
  Global variables   d = a + 2*b;


Once you have defined your variables, you can display them by putting them in curly braces, i.e. {a}, {b}, {c}, {d}, anywhere in the question.
==Other advantages==
*Another big advantage of formulas questions is that a question can have several 'parts' and all parts using the same variables; and even more, the answer to each part can not only be a number but a vector if you want.
*Last thing, formulas questions has a complete unit system that is quite useful for engineering


Another advantage of the Formulas question is that a question can have several subquestions, called ‘parts’, that can share the same variables. The Formulas question also has a complete unit system that is quite useful for physics and engineering.
==Author==
[https://moodle.org/user/view.php?id=8026&course=5 Jean-Michel Védrine]


The Formulas question type is very powerful and permits the making of a wide range of questions. Although mastering all its possibilities require some practice, learning the basics of the Formulas question is very easy. Once you start to master a bit this question type, you will realize how simple it is to use, and how efficient and comprehensive it is.
==Moodle versions==
 
2012062500 (Moodle 2.3) or newer
==Acknowledgments ==
The Formulas question was originally written by [https://moodle.org/user/view.php?id=1069069&course=5 Hon Wai Lau] in about one year during 2009 and 2010, after his Master studies in Physics at the [http://www.ust.hk/ Hong Kong University of Science and Technology]. [http://www.ucalgary.ca/complexity/people/students/honwai In 2012,Hon Wai Lau was invited by the Complexity Science Group], Department of Physics and Astronomy, University of Calgary, Alberta, Canada. [http://www.iqst.ca/people/ He is currently completing his Ph.D. studies at the Institute for Quantum Science and Technology], University of Calgary.
 
Hon Wai Lau's Formulas question original project can be found on [https://code.google.com/archive/p/moodle-coordinate-question/ Google Code Archive]. Note that the initial name 'Coordinate question ' was later changed to 'Formulas question'. Hon Wai Lau's original Formulas question is compatible with Moodle 1.9 and 2.0.
 
The Formulas question was upgraded to the new question engine, introduced in Moodle 2.1, by [https://moodle.org/user/view.php?id=8026&course=5 Jean-Michel Védrine], professor of Statistics and Computing at  the Institut Universitaire de Technologie in Saint-Étienne, France. The upgraded version of the Formulas question is compatible with Moodle 2.3 and later versions, currently up to Moodle 3.3.
 
The current Formulas question project can be found [https://github.com/jmvedrine/moodle-qtype_formulas on GitHub].
 
==Features==
 
* '''Random values'''. Each student can receive questions with unique values and wording.
* '''Multiple subquestions'''. Multiple subquestions can be made to share the same set of random variables.
* '''Multiple answers'''. Multiple answer boxes can be used for one subquestion.
* '''Different answer types'''. Both numerical answers with units and algebraic answers can be used.
* '''Grading criterion'''. In addition to simple absolute error, responses from students can be graded using any formula.
* '''Units'''. Supports units and SI unit conversions. SI units with different SI prefixes are accepted using a built-in conversion rule.
* '''Multiple trials'''. A finite or infinite number of trials can be specified for each subquestion.
 
==Documentation==
 
<div style="background:#faffbd;color:#000000;0px;padding:8px;border:1px solid #d9d9d9;border-radius:4px;">
<p style="margin:0px 8px;">Since there is little or no change in the Formulas plugin between Moodle versions 2.9 and later, the documentation is placed under the latest release (Moodle 3.3).</p></div>


==Translations available==
==Translations available==
The Formulas question plugin is available in the following langages:
This plugin is also available in Mexican Spanish
* English
* French
* Spanish (Mexican)


==Installation==
==Installation==
The Formulas question is a Moodle plugin, so you or your Administrator must [[Installing_plugins|install]] it.
*It's a Moodle plugin, so you must install it (or your administrator must do it).
*Currently formulas question type plugin is not available in the Moodle plugins Directory
*You must download it from the author's Github repository.
*And you must install another plugin (Tim Hunt's adaptive multipart behaviour) so that it works.


Prior to installing the Formulas question though, you need to install [[Installing_plugins|install another plugin]], that is Tim Hunt's adaptive multipart behaviour, [https://github.com/maths/moodle-qbehaviour_adaptivemultipart  available from GitHub] or [https://moodle.org/plugins/view.php?plugin=qbehaviour_adaptivemultipart from the Moodle Plugins directory]. Note that you need version 3.3 or newer of this behaviour, because the Formulas question will not work with previous versions.
==Drawbacks==
 
*Mastering formulas questions is difficult, there is a learning curve
You can then install the Formulas question either from the Moodle Plugins directory, from GitHub or from a zip file:
*Documentation is not very good, it was written by Hon Wai Lo (original author of the formulas questions for Moodle 1.9 and 2.0, Jean-Michel Védrine upgraded it for Moodle 2.3 to 2.8), unfortunately Jean-Michel Védrine never had time to improve it
 
*It's a Moodle plugin, so you must install it (or your administrator must do it). Currently formulas question type plugin is not available in the Moodle plugins Directory, you must download it from the author's Github repository. And you must install another plugin (Tim Hunt's adaptive multipart behaviour) so that it works.
'''Installing from the Moodle Plugins directory'''
*As any addon, you will be dependent in the future of the maintainer to upgrade it when a new Moodle version is released
 
The Formulas question is available from [https://moodle.org/plugins/view.php?plugin=qtype_formulas the Moodle Plugins drectory]. Install the Formulas question as any other Moodle question type plugin.
 
'''Installing from GitHub'''
 
The Formulas question is available at [https://github.com/jmvedrine/moodle-qtype_formulas the author's Github repository]. To install the question, type the following commands in the root of your Moodle install:
  git clone git://github.com/jmvedrine/moodle-qtype_formulas.git question/type/formulas echo '/question/type/formulas/' >> .git/info/exclude
 
'''Installing from a zip file'''
 
Download the zip file [https://github.com/jmvedrine/moodle-qtype_formulas from GitHub]. Unzip the file in the 'question/type' folder and then rename the new folder to 'formulas'.


==See also==
==See also==
Forum discussions:
*this forum thread.
* [https://moodle.org/mod/forum/discuss.php?d=163345 Formulas question type]
*Github documentation for the Formulas question type at https://github.com/jmvedrine/moodle-qtype_formulas
* [https://moodle.org/mod/forum/discuss.php?d=181049 Formulas question type for Moodle 2.0]
 


[[Category:Plugin]]
[[Category:Stubs]]
[[Category:Contributed code]]
[[Category:Contributed code]]
[[Category:Questions]]
[[Category:Questions]]
[[Category:Mathematics]]
[[Category:Mathematics]]
[[es:Tipo de pregunta fórmulas]]

Latest revision as of 16:49, 3 January 2019

For complete, up-to-date documentation on the Formulas question type, please see MoodleFormulas.org.


Usage

You would enter your 'sets' (called 'lists' in formulas questions) in the 'Random variables' field when creating question as:

a = {100, 125, 150, 175, 200};
b = {1, 2, 3, 4, 5};
c = {10, 12, 14, 16, 18};

When an attempt is started a, b, and c will take a value drawn from the corresponding list at random.

You can then define other variables depending of these ones in the 'Global variables' field if you want. For instance if you need the value of a+2*b somewhere in your question text or Combined or general feedback, just define

d=a+2*b; in 'Global variables'

Once you have defined your variables, you can use them in all the question's texts putting them in curly braces (for instance {a}, {b} or {d}). This is true not only for the Question text but also for all feedbacks and hints when you use interactive behaviour (The author thinks that the fact that variables can't be used in calculated question's feedback is a serious problem to give students an appropriate feedback using the values they saw in their attempt)

Other advantages

  • Another big advantage of formulas questions is that a question can have several 'parts' and all parts using the same variables; and even more, the answer to each part can not only be a number but a vector if you want.
  • Last thing, formulas questions has a complete unit system that is quite useful for engineering

Author

Jean-Michel Védrine

Moodle versions

2012062500 (Moodle 2.3) or newer

Translations available

This plugin is also available in Mexican Spanish

Installation

  • It's a Moodle plugin, so you must install it (or your administrator must do it).
  • Currently formulas question type plugin is not available in the Moodle plugins Directory
  • You must download it from the author's Github repository.
  • And you must install another plugin (Tim Hunt's adaptive multipart behaviour) so that it works.

Drawbacks

  • Mastering formulas questions is difficult, there is a learning curve
  • Documentation is not very good, it was written by Hon Wai Lo (original author of the formulas questions for Moodle 1.9 and 2.0, Jean-Michel Védrine upgraded it for Moodle 2.3 to 2.8), unfortunately Jean-Michel Védrine never had time to improve it
  • It's a Moodle plugin, so you must install it (or your administrator must do it). Currently formulas question type plugin is not available in the Moodle plugins Directory, you must download it from the author's Github repository. And you must install another plugin (Tim Hunt's adaptive multipart behaviour) so that it works.
  • As any addon, you will be dependent in the future of the maintainer to upgrade it when a new Moodle version is released

See also