Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-2308

Calculated Objects - new question type



    • Type: New Feature
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.7, 1.9.8, 1.9.9, 1.9.10, 2.0
    • Fix Version/s: None
    • Labels:
    • Environment:
      So far, tested on Moodle 1.9.7 (osx 10.6; php 5.2; mysql); browsers: Firefox 3.6, Safari 5.
      I'll test on Moodle 2 soon, when I have a copy checked out/installed.
    • Affected Branches:


      This a Moodle question type which extends the 'calculated' question type - I'd like to add it to CONTRIB, and I'd be grateful if you could take a look.

      Teachers can use it to create questions like "How much is





      • where the {wildcards}

        become M and N x images of apples and oranges respectively. Its aimed at primary-school pupils.

      Note, this question type uses the database tables of the 'calculated' question type - testing has not showed any problems with this (but I'm open to changes on this point).

      Currently supported wildcards: apple, orange, pear, pineapple, walnut, coffee, cookie (each with or without an 's', eg.



      To install:
      1. Download and unzip the archive. Copy the directory 'calculatedobjects' into the directory

      {MOODLE}/question/type/ on your server.
      2. Copy the strings from 'calculatedobjects/lang/en_utf8/quiz.part.php' to {MOODLE}

      3. Copy the help file from 'calculatedobjects/lang/en_utf8/help-quiz/calculatedobjects.html' to the directory

      4. For Moodle 1.9.x - add the calculatedobjects stylesheet to the $THEME->sheets array in {MOODLE}

      /theme/standard/config.php Eg.
      <?php ..
      $THEME->sheets = array('styles_fonts', 'styles_layout', 'styles_color'
      (Note, this relies on 'your' theme using the standard theme as its parent, which is Moodle best-practice.)
      5. Visit the administrator 'notifications' page, http://moodle.example.org/admin/ - there are no database changes for this question type.

      Please find a zip of the code, and some screenshots attached. And, the readme in the zip contains some todos, and notes. I look forward to your feedback. Many thanks,

      Nick Freear




            • Votes:
              1 Vote for this issue
              2 Start watching this issue


              • Created: