Variable numeric

A calculated numeric question type with variable and expression evaluation. Random values are generated for each student attempting the quiz.
Price option: Free

Supports Moodle 2.1-5.0 See all versions
Latest release: 1 year ago
Installations: 678
Downloads (last 90 days): 115

Frankenstyle name: qtype_varnumeric
Question types
Open University

Comments

Comments are no longer open for new posts. Existing comments remain available to read.

We still use and maintain this plugin. What keeps not getting done because we are too busy is updating the copy of the code on github and publishing here. This is bad, but there are so many hours in a day.
Decimal separators are a surprisingly difficult problem. We currently have no plans to support different ones.
Hello, I used this plugin a lot to create a lot of questions
I started using Stack this year and I use it less and less, but I clearly don't have the courage to move all my numeric variable questions to Stack (more than two thousand questions...)
I have two questions regarding the future of this plugin:
I have the impression that there are no more updates, do you plan to continue to upgrade it to future versions of Moodle?
Stack recently made it possible to choose the decimal separator in the answer choice (. or , )
I really want to ensure that all my questions use the same decimal separator (this would make life easier for my students).
Do you think it is possible to do the same thing for this plugin?
Thank you so much,
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
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.
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
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.
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()
@ Simon, I'm not aware of being able to in this quiz question, but you can in STACK (https://moodle.org/plugins/qtype_stack).
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?
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.
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.
rand_int(0, 10000)/10000
I need to rand float !!!
Latest version works with Moodle 3.9.
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.