GithubHelp home page GithubHelp logo

moodleou / moodle-qtype_varnumeric Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 10.0 191 KB

A new question type for Moodle - for numeric questions with variable and expression evaluation

PHP 77.70% CSS 3.62% Gherkin 13.00% HTML 1.15% JavaScript 4.54%

moodle-qtype_varnumeric's Introduction

Variable numeric question type

https://moodle.org/plugins/qtype_varnumeric

A numerical question type for Moodle where one question can have several variants with different numerical values. These variants are generated completely randomly when teh question is started.

If the Superscript/subscript editor is installed then it can be used to let students enter their answer in scientific notation, which can be checked in the grading. However, this is optional.

Acknowledgements

The question type was created by Jamie Pratt (http://jamiep.org/) for the Open University (http://www.open.ac.uk/).

Installation and set-up

This plugin requires that the Variable numeric set question type is also installed.

Install from the plugins database

Install from the Moodle plugins database

Install using git

Or you can install using git. Type this commands in the root of your Moodle install

git clone https://github.com/moodleou/moodle-qtype_varnumericset.git question/type/varnumericset
echo /question/type/varnumericset/ >> .git/info/exclude
git clone https://github.com/moodleou/moodle-qtype_varnumeric.git question/type/varnumeric
echo /question/type/varnumeric/ >> .git/info/exclude
git clone https://github.com/moodleou/moodle-editor_ousupsub.git lib/editor/ousupsub
echo /lib/editor/ousupsub/ >> .git/info/exclude

Then run the moodle update process Site administration > Notifications

moodle-qtype_varnumeric's People

Contributors

alanfez avatar beedell avatar danghieu1407 avatar dpalou avatar jamiepratt avatar jason-platts avatar mkassaei avatar sammarshallou avatar timhunt avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

moodle-qtype_varnumeric's Issues

Moodle 3.2 - PHPUnit error

Moodle: latest MOODLE_32_STABLE
Plugin: latest master
DB: both pgsql & mysqli

https://travis-ci.org/aspark21/moodle/jobs/211384020#L1728

  1. qtype_varnumeric_statistics_from_steps_testcase::test_walkthrough_from_csv with data set #0 (array('00', 'deferredfeedback'), array(PHPUnit_Extensions_Database_DataSet_DefaultTable Object (...), PHPUnit_Extensions_Database_DataSet_DefaultTable Object (...)))
    Argument 4 passed to quiz_statistics_report::get_all_stats_and_analysis() must be an instance of core\dml\sql_join, array given, called in /home/travis/build/aspark21/moodle/question/type/varnumeric/tests/stats_from_steps_walkthrough_test.php on line 79 and defined
    /home/travis/build/aspark21/moodle/mod/quiz/report/statistics/report.php:609
    /home/travis/build/aspark21/moodle/question/type/varnumeric/tests/stats_from_steps_walkthrough_test.php:79
    /home/travis/build/aspark21/moodle/lib/phpunit/classes/advanced_testcase.php:80
    To re-run:
    vendor/bin/phpunit qtype_varnumeric_statistics_from_steps_testcase question/type/varnumeric/tests/stats_from_steps_walkthrough_test.php

fatal error test failure in 3.11 after core change

Started having the following errors in MOODLE_311_STABLE against main branch of this plugin in the last week.

 PHP Fatal error:  Uncaught Error: Class 'mod_quiz_attempt_walkthrough_from_csv_testcase' not found in /var/www/html/question/type/varnumeric/tests/stats_from_steps_walkthrough_test.php:44
    Stack trace:
    #0 /var/www/html/vendor/phpunit/phpunit/src/Util/FileLoader.php(65): include_once()
    #1 /var/www/html/vendor/phpunit/phpunit/src/Util/FileLoader.php(49): PHPUnit\Util\FileLoader::load('/var/www/html/q...')
    #2 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php(401): PHPUnit\Util\FileLoader::checkAndLoad('/var/www/html/q...')
    #3 /var/www/html/vendor/phpunit/phpunit/src/Framework/TestSuite.php(529): PHPUnit\Framework\TestSuite->addTestFile('/var/www/html/q...')
    #4 /var/www/html/vendor/phpunit/phpunit/src/TextUI/TestSuiteMapper.php(67): PHPUnit\Framework\TestSuite->addTestFiles(Array)
    #5 /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php(390): PHPUnit\TextUI\TestSuiteMapper->map(Object(PHPUnit\TextUI\XmlConfiguration\TestSuiteCollection), '')
    #6 /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php(111): P in /var/www/html/vendor/phpunit/phpunit/src/TextUI/Command.php on line 98

Timing didn't seem to relate to changes within this plugin but found this change in core Moodle that will be the cause:

moodle/moodle@65c8839#diff-c47499725b252b6e8bc56f93f82205e49df4014e2c06c508accf2937e2ab0e5cR39

Seems there's a collection of them:
MDL-75716
MDL-75777
MDL-66902

supported Moodle version

Hi,

We have the plugin qtype_varnumeric (2019110900) on Moodle v3.9.14 running and just wanted to upgrade to v2.0 (2022042500).

qtype_varnumeric v2.0 requires:

  • Moodle 2020061500 (v3.9)
  • qtype_varnumericset (2022041100)

And qtype_varnumericset (2022041100) which is v2.1 requires:

  • Moodle 2021051700 (v3.11)

Does it mean that qtype_varnumeric v2.0 does not support Moodle v3.9 any more? Or can we just ignore the Moodle version inconsistency hier?

I am not sure though if the Moodle 3.9 would allow the update in this case.

4.0 - PHPUnit Fatal Error

Moodle 4.0 (Build: 20220419), 4b004fde721b462a36a4af600fab5ad91d5488d2
Php: 7.4.27, mysqli: 5.7.31, OS: Linux 3.10.0-1160.62.1.el7.x86_64 x86_64

Fatal error: Declaration of qtype_varnumeric_statistics_from_steps_testcase::get_full_path_of_csv_file($setname, $test) must be compatible with mod_quiz_attempt_walkthrough_from_csv_testcase::get_full_path_of_csv_file(string $setname, string $test): string in /var/www/html/question/type/varnumeric/tests/stats_from_steps_walkthrough_test.php on line 51

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.