-

Note: You are currently viewing documentation for Moodle 3.10. 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
No edit summary
mNo edit summary
 
(83 intermediate revisions by 4 users 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
|entry = https://moodle.org/plugins/qtype_formulas
|tracker = https://tracker.moodle.org/browse/CONTRIB/component/14833/?selectedTab=com.atlassian.jira.jira-projects-plugin:component-summary-panel
|tracker = https://github.com/dbauer-ets/moodle-qtype_formulas
|discussion = https://moodle.org/mod/forum/discuss.php?d=181049
|discussion = [https://moodle.org/mod/forum/view.php?id=737 Moodle quiz forum]
|maintainer = [[user:Jean-Michel Védrine|Jean-Michel Védrine]]
|maintainer = [https://moodle.org/user/view.php?id=1822259&course=5 Dominique Bauer]
|float = left
|float = right
}}
}}
==Usage==
{{Note|For complete, up-to-date documentation on the Formulas question type, please see [https://dynamiccourseware.org/ '''DynamicCourseware.org'''].}}
You would enter your 'sets' (called 'lists' in formulas questions) in the 'Random variables' field when creating question as:
{{Questions}}
 
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==
[https://moodle.org/user/view.php?id=1069069&course=5 Hon Wai Lau]
 
==Updates, maintenance and revisions==
[https://moodle.org/user/view.php?id=8026&course=5 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 [[Installing_plugins|install]] it (or your administrator must do it).
* The formulas question type plugin is now available in the Moodle plugins Directory
* You can download and install it directly from [https://moodle.org/plugins/view.php?plugin=qtype_formulas the Moodle plugins database], or You can also download it from [https://github.com/jmvedrine/moodle-qtype_formulas the author's Github repository].
* And you must [[Installing_plugins|install another plugin]] (Tim Hunt's [https://github.com/maths/moodle-qbehaviour_adaptivemultipart adaptive multipart behaviour]) so that it works.
 
==Examples==
* After you install the plugin, there is a sample-formulas-questions.xml file, with several examples of formulas questions in the 'moodle/question/type/formulas/sample' folder. You can use the [[Import questions]] option (Moodle XML) to put them into your [[Question bank]], in order to see how they work.
 
==Drawbacks==
 
*  Mastering formulas questions is difficult, there is a learning curve
 
* [https://code.google.com/p/moodle-coordinate-question/wiki/Documentation 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 [https://github.com/jmvedrine/moodle-qtype_formulas the author's Github repository]. And you must install another plugin (Tim Hunt's [https://github.com/maths/moodle-qbehaviour_adaptivemultipart 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
 
==FAQ==
===Is there a way to indicate the number of significant figures in a formulas question?===
[https://moodle.org/mod/forum/discuss.php?d=274975#p1181946 Dominique Bauer] has worked around the fact that sigfig is not (yet) implemented in the Formulas question type by coming up with the following very short variable assignment which works with any real number:
xr=x==0?x:round(x*pow(10,nsf-1-floor(log10(abs(x)))),0)*pow(10,-nsf+1+floor(log10(abs(x))));
where nsf is the number of significant figures. See https://moodle.org/mod/forum/discuss.php?d=274975#p1181946
 
==See also==
* [https://moodle.org/mod/forum/discuss.php?d=181049#p1188102 this forum thread].
* Github documentation for the Formulas question type at [https://github.com/jmvedrine/moodle-qtype_formulas https://github.com/jmvedrine/moodle-qtype_formulas]


[[Category:Contributed code]]
[[Category:Contributed code]]

Latest revision as of 01:27, 15 October 2022