Variable numeric

Question types ::: qtype_varnumeric
Maintained by TimTim Hunt, at the OU (Perry building)Mahmoud Kassaei
Part of set Open University.
A calculated numeric question type with variable and expression evaluation. Random values are generated for each student attempting the quiz.
Latest release:
686 sites
418 downloads
25 fans
Current versions available: 8

There are working examples in eAssessment with Moodle on our OpenLearn site.

The documentation is in How to create questions in Moodle on that site.

Screenshots

Screenshot #0
Screenshot #1

Contributors

Tim
Tim Hunt (Lead maintainer)
at the OU (Perry building)
Mahmoud Kassaei: Developer
Jamie Pratt: Developer
Phil Butcher: Question type designer
Colin Chambers: Developer
Chris Nelson: Product owner
Please login to view contributors details and/or to contact them

Comments RSS

Show comments
  • Sebastian H.
    Mon, 23 Apr 2018, 8:04 PM
    Hello,

    will there be a 3.4 Version of this Plugin?

    Best regards
    Sebastian
  • Suzana de Andrade Ferreira
    Wed, 4 Mar 2020, 4:49 AM
    Hi,

    How can I change the decimal separator from a point to a comma?

  • Andreu Martí
    Thu, 23 Apr 2020, 7:23 PM
    I'd also like to know this, because like other languages in spanish and in catalan the coma is the decimal separator. In moodle core, the numerical question has it resolved. Does anybody know how to fix this? thank you in advance.
  • Tim
    Thu, 11 Jun 2020, 5:37 AM
    Latest version works with Moodle 3.9.
  • Mohammed Setiha
    Thu, 24 Sep 2020, 9:16 PM
    I need to rand float !!!
  • Tim
    Thu, 24 Sep 2020, 10:00 PM
    rand_int(0, 10000)/10000
  • Eva Koperdakova
    Fri, 19 Aug 2022, 4:32 PM
    Hello, It says "Release 2.0 for Moodle 3.11+
    Moodle 3.9, 3.10, 3.11, 4.0", but no success updating on 3.9 latest today Aug 19th 2022.
    It requires 3.11 at least.
  • Tim
    Fri, 19 Aug 2022, 5:11 PM
    I'm sorry. You are right, it should be 3.11+. I have updated the information in this plugins DB entry. Thank you for pionting out the error.
  • Simon CHARBIT
    Wed, 15 Mar 2023, 6:35 PM
    Thank you very much for this plugin, I use it a lot. I am a French physics teacher.
    I would very much like to be able to generate graphs using the random data from the questions.
    Do you know if there is a way to do something like this?
  • Chris Nelson
    Wed, 15 Mar 2023, 7:09 PM
    @ Simon, I'm not aware of being able to in this quiz question, but you can in STACK (https://moodle.org/plugins/qtype_stack).
  • Simon CHARBIT
    Tue, 20 Jun 2023, 3:39 PM
    Hello, i try to go from Moodle 3.8 to moodle 4.0
    I use a lot this type of question and most of them are ok but some of them are corrupt (i dont know why and i cant open them correct something.

    here the code of error :

    line 372 of /question/type/varnumericset/questionbase.php: DivisionByZeroError thrown
    line 412 of /question/type/varnumericset/questionbase.php: call to qtype_varnumeric_question_base::round_to()
    line 272 of /question/type/varnumericset/questionbase.php: call to qtype_varnumeric_question_base::has_too_many_sig_figs()
    line 212 of /question/type/varnumericset/questionbase.php: call to qtype_varnumeric_question_base->compare_num_as_string_with_answer()
    line 145 of /question/type/varnumericset/questionbase.php: call to qtype_varnumeric_question_base->compare_response_with_answer()
    line 558 of /question/type/varnumericset/questionbase.php: call to qtype_varnumeric_question_base->get_matching_answer()
    line 331 of /question/behaviour/behaviourbase.php: call to qtype_varnumeric_question_base->classify_response()
    line 1582 of /question/engine/questionattempt.php: call to question_behaviour->classify_response()
    line 132 of /question/classes/statistics/responses/analyser.php: call to question_attempt->classify_response()
    line 753 of /mod/quiz/report/statistics/report.php: call to core_question\statistics\responses\analyser->calculate()
    line 722 of /mod/quiz/report/statistics/report.php: call to quiz_statistics_report->analyse_responses_for_questions()
    line 675 of /mod/quiz/report/statistics/report.php: call to quiz_statistics_report->analyse_responses_for_all_questions_and_subquestions()
    line 950 of /mod/quiz/report/statistics/report.php: call to quiz_statistics_report->get_all_stats_and_analysis()
    line 2492 of /mod/quiz/lib.php: call to quiz_statistics_report->calculate_questions_stats_for_question_bank()
    line 8053 of /lib/moodlelib.php: call to mod_quiz_calculate_question_stats()
    line 140 of /question/classes/local/statistics/statistics_bulk_loader.php: call to component_callback()
    line 56 of /question/classes/local/statistics/statistics_bulk_loader.php: call to core_question\local\statistics\statistics_bulk_loader::load_statistics_for_place()
    line 1037 of /question/classes/local/bank/view.php: call to core_question\local\statistics\statistics_bulk_loader::load_aggregate_statistics()
    line 984 of /question/classes/local/bank/view.php: call to core_question\local\bank\view->load_required_statistics()
    line 768 of /question/classes/local/bank/view.php: call to core_question\local\bank\view->display_question_list()
    line 59 of /question/edit.php: call to core_question\local\bank\view->display()
  • Tim
    Tue, 20 Jun 2023, 4:16 PM
    I suspect that error is not caused by any chagnes in Moodle or this plugin.

    More likely, as part of upgrading everything else, you have also upgraded to PHP 8.0 or 8.1, and that error looks like the type of thing that now causes problems in recent PHP versions.

    Anyway, it is a problem and it needs to be fixed. (Odd that you can get to a divide by zero in the round_to code.) Please can you describe one of the quetions which is broken (or export it as XML, and send it to us to look at. Thanks.
  • Simon CHARBIT
    Fri, 23 Jun 2023, 5:57 PM
    I was not capable of identifying which question was guilty.
    When I import the same question from a backup, it was working...
    I can send you the questions which were in the category (7 questions) but I can’t post them here.
    I imagine the problem could be because one of the questions has a really small result like 1x10^-30
    I already have some trouble with some questions which are given some results which was really low like 1x10-50 but it was not the same problem Moodle was not good to say if the answer was good or not he did not prevent me from accessing the question bank.
    Thank you very much
  • Bruce Currell
    Sat, 2 Sep 2023, 7:17 AM
    Are there any issues with this plug-in in the newest version of moodle 4.2.2 ? (no mentions of 4.1, 4.2 in description)

    2.0 for Moodle 3.11+ (2022042500)
    Moodle 3.11, 4.0
    Released: Thursday, 5 May 2022, 1:00 PM

    This plug-in I use HUGELY in my physics courses.
  • Simon CHARBIT
    Sat, 28 Oct 2023, 9:47 PM
    I am agree with Bruce i use a lot this plug-in in my physics courses and i am waiting a version who are stable on moodle 4.2 or 3 before updating moodle smile
1 2 3
Please login to post comments