

(59 intermediate revisions by 2 users not shown) 
Line 1: 
Line 1: 
−  {{Infobox plugin
 +  <div style="background:#d9edf7;color:#000000;padding:8px 20px 16px;border:1px solid #d9d9d9;borderradius:4px;"> 
−  type = Thirdparty question type
 
−  set = Author : [https://moodle.org/user/view.php?id=1069069&course=5 Hon Wai Lau]
 
−  entry = [https://moodle.org/plugins/view.php?plugin=qtype_formulas Formulas question type]
 
−  tracker = [https://tracker.moodle.org/browse/CONTRIB2312?focusedCommentId=91437&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acommenttabpanel New question type: Formulas] See also below.
 
−  discussion = See below.
 
−  maintainer = [https://moodle.org/user/view.php?id=8026&course=5 JeanMichel Védrine]
 
−  float = left
 
−  }}
 
−  {{Work in progress}}
 
   
−  {{Formulas question type}}
 +  For a complete and uptodate documentation of the Formulas question type, consult the course [https://moodleformulas.org/course/index.php?categoryid=4 '''MoodleFormulas''']. 
   
−  <div style="background:#d9edf7;color:#3a87ad;0px;padding:8px;border:1px solid #bce8f1;borderradius:4px;margin:80px 0 15px;">
 +  *To be allowed to take the quizzes (recommended), you must log in as '''student''' with password '''Moodle2018#''' 
−  <p style="margin:2px 8px;">
 
−  As there is no or little difference in the '''Formulas''' question type plugin for recent versions of Moodle (2.0 and above), the documentation for the '''Formulas''' question type has been moved to one location (the present page).
 
−  </p>
 
−  <p style="margin:5px 8px 5px;">
 
−  ''The documentation below applies to all recent versions of Moodle including the current Moodle 3.4''.
 
−  </p>
 
−  </div>
 
−   
−   
−   
−  ==Complete documentation==
 
−   
−  The documentation for the '''Formulas''' question type is based on that of [https://code.google.com/archive/p/moodlecoordinatequestion/wikis/Documentation.wiki Hon Wai Lau's original project ] (available on Google Code Archive). The content has been slightly modified and updated to match Moodle 2.0 and up.
 
−   
−  Use the navigation menu on the right in order to access the different pages of the documentation. You can also use the [[:Category:Formulas question type  categories links]].
 
−   
−  <div style="background:#d9edf7;color:#3a87ad;0px;padding:8px;border:1px solid #bce8f1;borderradius:4px;margin:0;">
 
−  <p style="margin:2px 8px;">
 
−  '''Note to the MoodleDocs administrator.''' In order to differentiate them from the other pages of MoodleDocs, the name of the pages relating to the '''Formulas''' question type is prefixed with 'Formulas:_'. Since this prefix is only part of the name of the page, it does not affect the management of the MoodleDocs pages and does not seem contraindicated.
 
−  </p>
 
−  </div>
 
−   
−  ==Examples==
 
−  <div style="backgroundcolor:#d3ffd3;
 
−  border:1px solid #abdaac;
 
−  borderradius:4px;
 
−  color:#4f691a;
 
−  padding:5px 15px 10px;
 
−  margin: 15px 0 15px;
 
−  ">
 
−  Click the '''Play it''' buttons to play the examples. You can also download the questions file (Moodle XML format) from the '''Play it''' site.
 
−  <div style="margin:15px 0 0px;">
 
−  [http://35.193.77.29/ <span style="backgroundcolor:#f98012;boxshadow: 0 5px 10px #cbcbcb;border: none;color:white;padding: 8px 16px;textalign:center;textdecoration: none;cursor:pointer;">Play it</span>] '''Play it''' site
 
−  </div>
 
−  ===='''Login info:'''====
 
−  <span style="backgroundcolor:#ffffff;"> Login as ''''''student''''' ' with password ''''''Moodle2018#''''' ' </span>
 
−   
−  <div style="margin:25px 0 10px;">
 
−  Tip:
 
−  * '''Ctrl+Shift+Click''' button to open link in a new foreground tab
 
−  You may also
 
−  * Ctrl+Click button to open link in a new background tab
 
−  * Shift+Click button to open link in a new window
 
−  </div>
 
−  </div>
 
−   
−  Also, the original examples in [https://code.google.com/archive/p/moodlecoordinatequestion/wikis/Documentation.wiki Hon Wai Lau's original project ] can be found in the file called 'sampleformulasquestions.xml' (Moodle XML format) located in the 'moodle/question/type/formulas/sample' folder. Use the '''Import questions''' option to put them into your '''Question bank''' and see how they work. For details on how to import questions, see [https://docs.moodle.org/34/en/Import_questions Import questions].
 
−   
−  ==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 builtin conversion rule.
 
−  * '''Multiple trials'''. A finite or infinite number of trials can be specified for each subquestion.
 
−   
−  ==The '''Formulas''' question type is for you!==
 
−  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 specific values such as:
 
−   
−  <pre style="fontsize:113%;">
 
−  Parameter: Possible values:
 
−  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
 
−  </pre>
 
−   
−  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:
 
−   
−  <pre style="fontsize:113%;">
 
−  Find the value of x = a*(b + c)
 
−  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
 
−  </pre>
 
−   
−  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 follows:
 
−   
−  <pre style="fontsize:113%;">
 
−  Variables
 
−  Random variables a = {1:10:2};
 
−  b = {2:11:2};
 
−  c = {1, 2, 3, 7:12};
 
−  </pre>
 
−   
−  Note that sets of numbers can be in the format <span style="fontfamily:monospace;fontsize:113%;">{start:stop:interval}</span>, for example <span style="fontfamily:monospace;fontsize:113%;">{1:10:2}</span> and <span style="fontfamily:monospace;fontsize:113%;">{2:11:2}</span>. (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 <span style="fontfamily:monospace;fontsize:113%;">{1,2,3}</span> for the set of numbers 1, 2 and 3. They can even be in a combination of the two formats, such as <span style="fontfamily:monospace;fontsize:113%;">{1, 2, 3, 7:12}</span>.
 
−   
−  When an attempt is started, <span style="fontfamily:monospace;fontsize:113%;">a</span>, <span style="fontfamily:monospace;fontsize:113%;">b</span>, and <span style="fontfamily:monospace;fontsize:113%;">c</span> 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 <span style="fontfamily:monospace;fontsize:113%;">a + 2*b</span> somewhere in your question (that is the main question, subquestions, hints and feedbacks), just define a new variable, say <span style="fontfamily:monospace;fontsize:113%;">d</span>, in the '''Global variables''' field:
 
−   
−  <pre style="fontsize:113%;">
 
−  Variables
 
−  Global variables d = a + 2*b;
 
−  </pre>
 
−   
−  Once you have defined your variables, you can display them by putting them in curly braces, i.e. <span style="fontfamily:monospace;fontsize:113%;">{a}</span>, <span style="fontfamily:monospace;fontsize:113%;">{b}</span>, <span style="fontfamily:monospace;fontsize:113%;">{c}</span>, <span style="fontfamily:monospace;fontsize:113%;">{d}</span>, anywhere in the question.
 
−   
−  Another advantage of the '''Formulas question''' type is that a Formulas question can have several subquestions, called '''parts''', that can share the same variables. The '''Formulas question''' also has a complete system of units that is quite useful for physics and engineering.
 
   
−  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, the basics can be learned quickly.
 +  *You can also log in as a guest but, by doing so, you will not be able to take the quizzes. You may also enroll yourself by creating an account; however, since this site is updated frequently, the preservation of quiz data is not guaranteed. 
   
−  <div style="backgroundcolor:#d3ffd3;
 
−  border:1px solid #abdaac;
 
−  borderradius:4px;
 
−  color:#4f691a;
 
−  padding:5px 15px 5px;
 
−  margin: 15px 0 0;
 
−  ">
 
−  Once you begin to master the '''Formulas question''' type, you will realize how easy it is to use, and how effective and complete it is.
 
 </div>   </div> 
− 
 
−  ==Acknowledgments ==
 
−  The Formulas question was 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/moodlecoordinatequestion/ 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 JeanMichel 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.
 
− 
 
−  ==Maintainer(s)==
 
−  [https://moodle.org/user/view.php?id=8026&course=5 JeanMichel Védrine] has maintained the Formulas question type plugin until 2017. He is now back in force for 2018.
 
− 
 
−  ==Installation==
 
−  The Formulas question is a Moodle plugin, so you or your Administrator must [[Installing_pluginsinstall]] it.
 
− 
 
−  Prior to installing the Formulas question though, you need to install [[Installing_pluginsinstall another plugin]], that is Tim Hunt's adaptive multipart behaviour, [https://github.com/maths/moodleqbehaviour_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.
 
− 
 
−  You can then install the Formulas question either from the Moodle Plugins directory, from GitHub or from a zip file:
 
− 
 
−  '''Installing from the Moodle Plugins directory'''
 
− 
 
−  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/moodleqtype_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/moodleqtype_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/moodleqtype_formulas from GitHub]. Unzip the file in the 'question/type' folder and then rename the new folder to 'formulas'.
 
− 
 
−  ==Moodle Tracker==
 
−  { class="nicetable"
 
−  
 
−  ! Date
 
−  ! Author
 
−  ! Title and link
 
−  
 
−   20100827
 
−   Hon Wai Lau
 
−   [https://tracker.moodle.org/browse/CONTRIB2312?focusedCommentId=91437&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acommenttabpanel New question type: Formulas]
 
−  
 
−   20151217
 
−   Tikva
 
−   [https://tracker.moodle.org/browse/CONTRIB6068?jql=text%20~%20%22Formulas%20question%20type%22 Formulas question type does not support expressions calculation]
 
−  
 
−   20160614
 
−   Renaat Debleu
 
−   [https://tracker.moodle.org/browse/CONTRIB6381 Formulas question type does not support local number formatting]
 
−  }
 
− 
 
−  ==Forum discussions==
 
− 
 
−  { class="nicetable"
 
−  
 
−  ! Date
 
−  ! Author
 
−  ! Title and link
 
−  
 
−   20100815
 
−   Hon Wai Lau
 
−   [https://moodle.org/mod/forum/discuss.php?d=155989 New question type: coordinates]
 
−  
 
−   20101130
 
−   Hon Wai Lau
 
−   [https://moodle.org/mod/forum/discuss.php?d=163345 Formulas question type]
 
−  
 
−   20110712
 
−   JeanMichel Védrine
 
−   [https://moodle.org/mod/forum/discuss.php?d=181049 Formulas question type for Moodle 2.0]
 
−  
 
−   colspan="3"  Formulas page 24
 
−  
 
−   20150531
 
−   George Franz
 
−   [https://moodle.org/mod/forum/discuss.php?d=314444 Multiple fillintheblanks graded together]
 
−  
 
−   20151126
 
−   Bernat Martinez
 
−   [https://moodle.org/mod/forum/discuss.php?d=323859 An experience on training teachers...]
 
−  
 
−   20160603
 
−   Bernat Martinez
 
−   [https://moodle.org/mod/forum/discuss.php?d=334158 A CHECK button for each part (for multipart question & adaptive behaviour)]
 
−  
 
−   20160613
 
−   Peter Halverson
 
−   [https://moodle.org/mod/forum/discuss.php?d=334654 Formulas questions errors after 2.9 to 3.1 upgrade]
 
−  
 
−   20160712
 
−   Alessandro Bucca
 
−   [https://moodle.org/mod/forum/discuss.php?d=336340 quiz Formulas plugin]
 
−  
 
−   20160714
 
−   Matthias Giger
 
−   [https://moodle.org/mod/forum/discuss.php?d=336476 Formulas: Using gcd()]
 
−  
 
−   20160727
 
−   Dominique Bauer
 
−   [https://moodle.org/mod/forum/discuss.php?d=337065 Where is the "Check" button in the code?]
 
−  
 
−   20160730
 
−   Bernat Martinez
 
−   [https://moodle.org/mod/forum/discuss.php?d=337254 Format check initialization fail]
 
−  
 
−   20160921
 
−   florian tobé
 
−   [https://moodle.org/mod/forum/discuss.php?d=340150 Create units conversion exercises]
 
−  
 
−   20161023
 
−   Jarrod McCombie
 
−   [https://moodle.org/mod/forum/discuss.php?d=341890 Lab Quiz]
 
−  
 
−   20161124
 
−   Godfrey Sovis
 
−   [https://moodle.org/mod/forum/discuss.php?d=343480 Algebra and Formulas qtypes]
 
−  
 
−   20161201
 
−   Bernat Martinez
 
−   [https://moodle.org/mod/forum/discuss.php?d=343789 PHP error in Formulas question]
 
−  
 
−   20170102
 
−   Kalyan Chatterjea
 
−   [https://moodle.org/mod/forum/discuss.php?d=345107 Formulas Question Type]
 
−  
 
−   20170105
 
−   Bernat Martinez
 
−   [https://moodle.org/mod/forum/discuss.php?d=345283 Grading criteria checkbox not displayed in Boost theme]
 
−  
 
−   20170211
 
−   Dominique Bauer
 
−   [https://moodle.org/mod/forum/discuss.php?d=347383 Suggestion to improve the input format for units]
 
−  
 
−   20170509
 
−   Miro Iliaš
 
−   [https://moodle.org/mod/forum/discuss.php?d=349063 Algebra expression validator for calculated questions]
 
−  
 
−   20170710
 
−   Jonas Ceponis
 
−   [https://moodle.org/mod/forum/discuss.php?d=355187 Text as an answer to calculated questions]
 
−  
 
−   20170726
 
−   shahin k
 
−   [https://moodle.org/mod/forum/discuss.php?d=356013 Dependent answers in twopart questions]
 
−  
 
−   20170809
 
−   lucia liljegren
 
−   [https://moodle.org/mod/forum/discuss.php?d=356627 Formulas question: size of entry box]
 
−  
 
−   20171004
 
−   Maurício Reis
 
−   [https://moodle.org/mod/forum/discuss.php?d=359539 Formulas Type Question Maintenance]
 
−  
 
−   20171211
 
−   lucia liljegren
 
−   [https://moodle.org/mod/forum/discuss.php?d=362817 Formula Question: Mixing text and numbers in answer]
 
−  
 
−   20171212
 
−   François Lizotte
 
−   [https://moodle.org/mod/forum/discuss.php?d=362854 Feedback in Formulas question type]
 
−  }
 
− 
 
−  ==Translations available==
 
−  The Formulas question plugin is available in the following langages:
 
−  * English
 
−  * French
 
−  * Spanish (Mexican)
 
− 
 
− 
 
−  [[#topBack to top of page]]
 
− 
 
−  [[Category:Contributed code]]
 
−  [[Category:Questions]]
 
−  [[Category:Mathematics]]
 
   
 [[es:Tipo de pregunta fórmulas]]   [[es:Tipo de pregunta fórmulas]] 