Note: You are currently viewing documentation for Moodle 3.6. Up-to-date documentation for the latest stable version of Moodle is likely available here: Calculated Objects question type.

Calculated Objects question type: Difference between revisions

From MoodleDocs
No edit summary
(Added ==Use==)
 
(21 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Calculated Objects question type ==
{{Infobox plugin
|type = question type
|entry = https://moodle.org/plugins/pluginversions.php?plugin=qtype_calculatedobjects
|tracker = https://moodle.org/plugins/pluginversions.php?plugin=qtype_calculatedobjects
|discussion = https://moodle.org/plugins/qtype_calculatedobjects
|maintainer = [[user:Nick Freear|Nick Freear]]
|float = right
}}
This a contributed Moodle question type which extends the [[Calculated question type|Calculated]] question type.


This a Moodle question type which extends the [[Calculated question type|Calculated]] question type.
== Versions available==
This plugin is available for Moodle 1.9 to 2.3
 
== Wild cards ==
Teachers can create questions like,  
Teachers can create questions like,  
   How much is {apples} + {oranges}?
   How much is {apples} + {oranges}?


- where the {wildcards} become M and N x images of apples and oranges respectively. It is aimed at pre/primary-school students (approximately age 3-9).
- where the {wildcards} become M and N × images of apples and oranges respectively. It is aimed at pre/primary-school students (approximately age 3-10).
<p align="center" style="border:1px solid #ddd;">http://moodle.org/file.php/1/moddata/data/13/48/4143/mdl-q-calcobjects-5a-sub-green.png</p>
 
Currently supported wildcards:  apple, orange, pear, pineapple, walnut, cookie (each with or without an 's', eg. {cookies} and with an optional differentiator). For example,
  {apples_1} - {apples_2}


Tested with Moodle 1.9.7.
Tested with Moodle 1.9.7.
Line 11: Line 26:
(Author N.D.Freear, 14 August 2010.)
(Author N.D.Freear, 14 August 2010.)


Currently supported wildcardsapple, orange, pear, pineapple, walnut, coffee, cookie (each with or without an 's', eg. {cookies} and with an optional differentiator). For example,
== Installation ==
  {apples_1} + {apples_2}
# Download from [https://moodle.org/plugins/view/qtype_calculatedobjects the Moodle plugins database] and unzip the archive. Copy the directory 'calculatedobjects' into the directory {MOODLE}/question/type/ on your server.
# Visit the administrator 'notifications' page, <nowiki>http://my.school/moodle/admin/</nowiki> - there are no database changes for this question type.
 
==Use==
* Note, this question type uses the database tables of the 'calculated' question type.
* You must make some standard calculated type questions in order to have some data sets with the proper ranges of numbers using the variables you will need BEFORE you can use the calculated objects question type.
** Eg, make some {apples} data sets with a reasonable range (1 to 10).
 
==Example use==
* Add one question in the [[Question bank]]
* Write the question text
[[File:Calculated objects question text.png|400px]]
* Write the answer formula
[[File:Calculated objects answer formula.png|400px]]
* Populate the sets for the objects with reasonable values (1 to 10 in this case)
[[File:Calculated objects apples set.png|400px]]
 
[[File:Calculated objects oranges set.png|400px]]
* Save the question and test it
[[File:Calculated objects question at work.png|400px]]
== Change log ==
 
* 2 September 2010/ Pre-"release" - [http://tracker.moodle.org/browse/CONTRIB-2308#action_91778 CONTRIB-2308].
* 8 September 2010 - Added new clip art ('greenapple', 'tomato', 'cake', 'pencil', 'car'). Aliases: 'apple'=>'greenapple'. And, added all objects to language pack - CONTRIB-2334.
 
== Acknowledgements ==
 
Thank you to:
* [http://commons.wikimedia.org/wiki/Main_Page Wikimedia Commons] and [http://commons.wikimedia.org/w/index.php?title=Special%3ASearch&redirs=0&search=fruit+icon contributors] for clip art/images.
* [http://www.openclipart.org/ Open Clip Art Library] and contributors for clip art/images.
* [http://moodle.org/mod/forum/discuss.php?d=156605 Quiz forum] contributors and [http://tracker.moodle.org/browse/CONTRIB-2308 developers] on Moodle.org, for valuable feedback.
 
==ISSUES (August 2017)==
*No English language strings in AMOS. See [https://tracker.moodle.org/browse/CONTRIB-4735?jql=project%20%3D%20CONTRIB%20AND%20component%20%3D%20%22Question%20type%3A%20Calculated%20Objects%22 Moodle tracker issue]
 
* missing 'pluginnamesummary' string . See [https://github.com/nfreear/moodle-qtype_calculatedobjects/compare/MOODLE_21_STABLE...rboyatt:contrib-5257-add-pluginnamesummary GitHub solution]
** [[File:Pluginnamesummary_error.png]]
** Will use $string['pluginnamesummary'] = 'A version of calculated questions which extends the built-in 'calculated' question type. Teachers can create questions like, How much is {apples} + {oranges}.';
** This fixes this error
[[File:Pluginnamesummary_error_corrected.png]]


* Initial discussion: [http://moodle.org/mod/forum/discuss.php?d=156605 Using Moodle, Quiz forum]
 
* Initial issue: CONTRIB-2308
* When I installed the [https://moodle.org/plugins/pluginversions.php?plugin=local_codechecker additional code checker plugin] I could see many problems and locally fixed many of them.
[[File:394 errors and 80 warnings.png|400px]]
 
** [https://docs.moodle.org/dev/Coding_style Moodle coding style] must be used.
** After checking the files with the Code checker, it was easy to fix many (but not all) of the errors:
[[File:new2 with 12 errors and 30 warnings.png|400px]]
 
**But now it will need a real PHP programmer to fix the remaining errors and submit it to the Moodle plugins database :)
 
 
==New Moodle 3.3 version for beta testing==
** New files for Moodle 3.3.x hosted in [https://github.com/germanvaleroelizondo/moodle-qtype_calculatedobjects/tree/MOODLE_33_STABLE GitHub]
 
== See also ==
 
* [http://moodle.org/mod/data/view.php?d=13&rid=4143 Calculated objects for Moodle 1.9, in the plugins database]
* [http://moodle.org/mod/forum/discuss.php?d=156605 Initial discussion, in the Quiz forum] (Using Moodle)
* [http://tracker.moodle.org/browse/CONTRIB/component/10720 Report bugs &amp; make suggestions]
* (Initial bug/issue: CONTRIB-2308)


[[Category:Contributed code]]
[[Category:Contributed code]]
[[Category:Questions]]
[[Category:Questions]]
[[Category:Mathematics]]
[[es:Tipo de pregunta objetos calculados]]

Latest revision as of 18:42, 8 August 2017

This a contributed Moodle question type which extends the Calculated question type.

Versions available

This plugin is available for Moodle 1.9 to 2.3

Wild cards

Teachers can create questions like,

  How much is {apples} + {oranges}?

- where the {wildcards} become M and N × images of apples and oranges respectively. It is aimed at pre/primary-school students (approximately age 3-10).

http://moodle.org/file.php/1/moddata/data/13/48/4143/mdl-q-calcobjects-5a-sub-green.png

Currently supported wildcards: apple, orange, pear, pineapple, walnut, cookie (each with or without an 's', eg. {cookies} and with an optional differentiator). For example,

  {apples_1} - {apples_2}

Tested with Moodle 1.9.7.

(Author N.D.Freear, 14 August 2010.)

Installation

  1. Download from the Moodle plugins database and unzip the archive. Copy the directory 'calculatedobjects' into the directory {MOODLE}/question/type/ on your server.
  2. Visit the administrator 'notifications' page, http://my.school/moodle/admin/ - there are no database changes for this question type.

Use

  • Note, this question type uses the database tables of the 'calculated' question type.
  • You must make some standard calculated type questions in order to have some data sets with the proper ranges of numbers using the variables you will need BEFORE you can use the calculated objects question type.
    • Eg, make some {apples} data sets with a reasonable range (1 to 10).

Example use

Calculated objects question text.png

  • Write the answer formula

Calculated objects answer formula.png

  • Populate the sets for the objects with reasonable values (1 to 10 in this case)

Calculated objects apples set.png

Calculated objects oranges set.png

  • Save the question and test it

Calculated objects question at work.png

Change log

Acknowledgements

Thank you to:

ISSUES (August 2017)

  • missing 'pluginnamesummary' string . See GitHub solution
    • Pluginnamesummary error.png
    • Will use $string['pluginnamesummary'] = 'A version of calculated questions which extends the built-in 'calculated' question type. Teachers can create questions like, How much is {apples} + {oranges}.';
    • This fixes this error

Pluginnamesummary error corrected.png


394 errors and 80 warnings.png

    • Moodle coding style must be used.
    • After checking the files with the Code checker, it was easy to fix many (but not all) of the errors:

new2 with 12 errors and 30 warnings.png

    • But now it will need a real PHP programmer to fix the remaining errors and submit it to the Moodle plugins database :)


New Moodle 3.3 version for beta testing

    • New files for Moodle 3.3.x hosted in GitHub

See also