Git Product home page Git Product logo

moodle-qtype_pmatch's Introduction

Pattern match question type

Students can enter a response of up to 20 words, which is then graded by matching it against various model answers expressed using a sophisticated patten matching algorithm. See http://docs.moodle.org/dev/The_OU_PMatch_algorithm

Acknowledgements

This question type was created by Jamie Pratt, working for the Open University (http://www.open.ac.uk/) and has since had many enhancements by OU staff.

Installation and set-up

You may also wish to install the associated superscript/subscript editor plugin. This makes the superscript and subscript options in the question editing form. If the editor is not installed the question type can still be used but these options will not be available.

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_pmatch.git question/type/pmatch
echo /question/type/pmatch/ >> .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_pmatch's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

moodle-qtype_pmatch's Issues

Delete Answers

Hello,

I can't seem to delete the answers on a question when I go and edit the question. If i remove the answer, feedback and set the grade to none, then save the question, the question doesn't save that information.

This is within Moodle 2.6

Thanks for your help

Failed behat tests

Behat test - Test the try rule feature.Test the pmatch try rule feature
/var/www/html/question/type/pmatch/tests/behat/try_rule.feature:35

And I choose "Edit question" action for "My first pattern match question" in the question bank: debugging() message/s found:
String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation
line 394 of /lib/classes/string_manager_standard.php: call to debugging()
line 7278 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 298 of /question/type/pmatch/edit_pmatch_form.php: call to get_string()
line 407 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->get_per_answer_fields()
line 89 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->add_per_answer_fields()
line 73 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 217 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 214 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 60 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 202 of /question/question.php: call to question_type->create_editing_form()

String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation
line 394 of /lib/classes/string_manager_standard.php: call to debugging()
line 7278 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 209 of /question/type/pmatch/edit_pmatch_form.php: call to get_string()
line 110 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_other_answer_fields()
line 73 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 217 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 214 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 60 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 202 of /question/question.php: call to question_type->create_editing_form()
(Exception)

Behat test - Test the try rule feature.Test the pmatch rules response feature
/var/www/html/question/type/pmatch/tests/behat/try_rule.feature:78

When I add a "Pattern match" question filling the form with:: debugging() message/s found:
String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation
line 394 of /lib/classes/string_manager_standard.php: call to debugging()
line 7278 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 298 of /question/type/pmatch/edit_pmatch_form.php: call to get_string()
line 407 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->get_per_answer_fields()
line 89 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->add_per_answer_fields()
line 73 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 217 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 214 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 60 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 202 of /question/question.php: call to question_type->create_editing_form()

String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation
line 394 of /lib/classes/string_manager_standard.php: call to debugging()
line 7278 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 209 of /question/type/pmatch/edit_pmatch_form.php: call to get_string()
line 110 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_other_answer_fields()
line 73 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 217 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 214 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 60 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 202 of /question/question.php: call to question_type->create_editing_form()
(Exception)

Behat test - Test all the basic functionality of pmatch question type.Create, edit then preview a pattern match question.
/var/www/html/question/type/pmatch/tests/behat/basic_test.feature:21

And I add a "Pattern match" question filling the form with:: debugging() message/s found:
String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation
line 394 of /lib/classes/string_manager_standard.php: call to debugging()
line 7278 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 298 of /question/type/pmatch/edit_pmatch_form.php: call to get_string()
line 407 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->get_per_answer_fields()
line 89 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->add_per_answer_fields()
line 73 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 217 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 214 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 60 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 202 of /question/question.php: call to question_type->create_editing_form()

String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation
line 394 of /lib/classes/string_manager_standard.php: call to debugging()
line 7278 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 209 of /question/type/pmatch/edit_pmatch_form.php: call to get_string()
line 110 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_other_answer_fields()
line 73 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 217 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 214 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 60 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 202 of /question/question.php: call to question_type->create_editing_form()
(Exception)

Behat test - Test backup and restore of a pmatch question with responses and matches.Test backup and restore with testquestion data.
/var/www/html/question/type/pmatch/tests/behat/testquestion_backup.feature:20

And I choose "Edit question" action for "My first pattern match question" in the question bank: debugging() message/s found:
String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation
line 394 of /lib/classes/string_manager_standard.php: call to debugging()
line 7278 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 298 of /question/type/pmatch/edit_pmatch_form.php: call to get_string()
line 407 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->get_per_answer_fields()
line 89 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->add_per_answer_fields()
line 73 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 217 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 214 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 60 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 202 of /question/question.php: call to question_type->create_editing_form()

String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation
line 394 of /lib/classes/string_manager_standard.php: call to debugging()
line 7278 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 209 of /question/type/pmatch/edit_pmatch_form.php: call to get_string()
line 110 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_other_answer_fields()
line 73 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 217 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 214 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 60 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 202 of /question/question.php: call to question_type->create_editing_form()
(Exception)

Behat test - Create new a response for a pattern match question.Create an existing test response for a pattern match question.
/var/www/html/question/type/pmatch/tests/behat/testquestion_create_response.feature:23

And I press key "27" in the field "Correct": Key Down / Up events only make sense for modifier keys. (InvalidArgumentException)

Behat test - Test answer accuracy and response coverage.Get standard responses graded against current answer rules.
/var/www/html/question/type/pmatch/tests/behat/testquestion_edit.feature:29

When I choose "Edit question" action for "My first pattern match question" in the question bank: debugging() message/s found:
String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation
line 394 of /lib/classes/string_manager_standard.php: call to debugging()
line 7278 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 298 of /question/type/pmatch/edit_pmatch_form.php: call to get_string()
line 407 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->get_per_answer_fields()
line 89 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->add_per_answer_fields()
line 73 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 217 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 214 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 60 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 202 of /question/question.php: call to question_type->create_editing_form()

String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation
line 394 of /lib/classes/string_manager_standard.php: call to debugging()
line 7278 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 209 of /question/type/pmatch/edit_pmatch_form.php: call to get_string()
line 110 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_other_answer_fields()
line 73 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 217 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 214 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 60 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 202 of /question/question.php: call to question_type->create_editing_form()
(Exception)

Behat test - Test the model answer functionality of pmatch question type.Validation of the model answer
/var/www/html/question/type/pmatch/tests/behat/modelanswer_test.feature:38

When I choose "Edit question" action for "Frog but not toad" in the question bank: debugging() message/s found:
String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation
line 394 of /lib/classes/string_manager_standard.php: call to debugging()
line 7278 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 298 of /question/type/pmatch/edit_pmatch_form.php: call to get_string()
line 407 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->get_per_answer_fields()
line 89 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->add_per_answer_fields()
line 73 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 217 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 214 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 60 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 202 of /question/question.php: call to question_type->create_editing_form()

String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation
line 394 of /lib/classes/string_manager_standard.php: call to debugging()
line 7278 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 209 of /question/type/pmatch/edit_pmatch_form.php: call to get_string()
line 110 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_other_answer_fields()
line 73 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 217 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 214 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 60 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 202 of /question/question.php: call to question_type->create_editing_form()
(Exception)

Behat test - Test the model answer functionality of pmatch question type.Validation of the model answer with non-standard options
/var/www/html/question/type/pmatch/tests/behat/modelanswer_test.feature:59

When I choose "Edit question" action for "Spanish question" in the question bank: debugging() message/s found:
String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation
line 394 of /lib/classes/string_manager_standard.php: call to debugging()
line 7278 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 298 of /question/type/pmatch/edit_pmatch_form.php: call to get_string()
line 407 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->get_per_answer_fields()
line 89 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->add_per_answer_fields()
line 73 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 217 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 214 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 60 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 202 of /question/question.php: call to question_type->create_editing_form()

String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation
line 394 of /lib/classes/string_manager_standard.php: call to debugging()
line 7278 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 209 of /question/type/pmatch/edit_pmatch_form.php: call to get_string()
line 110 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_other_answer_fields()
line 73 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 217 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 214 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 60 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 202 of /question/question.php: call to question_type->create_editing_form()
(Exception)

Behat test - Test all the basic functionality of testquestion question type.Test edit response.
/var/www/html/question/type/pmatch/tests/behat/testquestion_basic_test.feature:43

And I press key "13" in the field "Edit response": Key Down / Up events only make sense for modifier keys. (InvalidArgumentException)

Behat test - Test spelling check of a pmatch question.Spell checking with Spell checking library is set to No spell checking available
/var/www/html/question/type/pmatch/tests/behat/spellcheck_test.feature:19

When I choose "Edit question" action for "My first pattern match question" in the question bank: debugging() message/s found:
String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation
line 394 of /lib/classes/string_manager_standard.php: call to debugging()
line 7278 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 298 of /question/type/pmatch/edit_pmatch_form.php: call to get_string()
line 407 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->get_per_answer_fields()
line 89 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->add_per_answer_fields()
line 73 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 217 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 214 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 60 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 202 of /question/question.php: call to question_type->create_editing_form()

String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation
line 394 of /lib/classes/string_manager_standard.php: call to debugging()
line 7278 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 209 of /question/type/pmatch/edit_pmatch_form.php: call to get_string()
line 110 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_other_answer_fields()
line 73 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 217 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 214 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 60 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 202 of /question/question.php: call to question_type->create_editing_form()
(Exception)

Behat test - Test the rule creation assistant.Using the rule creation assistant.
/var/www/html/question/type/pmatch/tests/behat/rule_creation_assistant.feature:22

And I click on ".submitbutton" "css_element": debugging() message/s found:
String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation
line 394 of /lib/classes/string_manager_standard.php: call to debugging()
line 7278 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 298 of /question/type/pmatch/edit_pmatch_form.php: call to get_string()
line 407 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->get_per_answer_fields()
line 89 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->add_per_answer_fields()
line 73 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 217 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 214 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 60 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 202 of /question/question.php: call to question_type->create_editing_form()

String [grade,core] is deprecated. Either you should no longer be using that string, or the string has been incorrectly deprecated, in which case you should report this as a bug. Please refer to https://docs.moodle.org/dev/String_deprecation
line 394 of /lib/classes/string_manager_standard.php: call to debugging()
line 7278 of /lib/moodlelib.php: call to core_string_manager_standard->get_string()
line 209 of /question/type/pmatch/edit_pmatch_form.php: call to get_string()
line 110 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_other_answer_fields()
line 73 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 217 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 214 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 60 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 202 of /question/question.php: call to question_type->create_editing_form()
(Exception)

Upgradesettings

Hello,
When upgrading to version 20190712, the upgradesettings.php show an empty list of new settings.
The only BAD way I found to overpass this is to comment the 3 last lines in settings.php concerning \qtype_pmatch\admin\qtype_pmatch_admin_setting_spell_check_languages .
We try on a quite empty instance of 3.7dev (20190418), the same in 3.7.1+ (20190725) and another on Moodle 3.6.3+ (Build: 20190418) and the same occurs. We were using pmatch version 2019021986

CopieMiseAjour-qtype_pmath-2019071200_from_2019021986

Thanks for any help.

Fatal error during plugin installation

I tried to install qtype_pmatch and got this error message after the installation seemed to be finished.

Fatal error: Declaration of qtype_pmatchjme::delete_question($questionid, $contextid) must be compatible with qtype_pmatch::delete_question($questionid, $contextid)

Now the entire admin area of the Moodle is no longer accessible. Does anyone know of this error or a solution to prevent this during installation?
I thought I'd ask - before I start looking for the problem in the code.

Improvement: please replace language string constants with variables

Hi,

This improved version is great, but it would be even greater if you replaced the English language constants in the file 'edit_pmatch_form.php' with string variables declared in /lang/ed/qtype_pmatch.php .And they would be available for all AMOS translators.

Thanks in advance

PHP 7.4 Deprecated syntax used

PHP Deprecated: Array and string offset access syntax with curly braces is deprecated in /question/type/pmatch/tests/examples_test.php on line 98

Matching numbers

Hi Tim,

I found one more bug, and it's how the code matches 0.

In the pmatch_matcher_number class in the match word function, you normalize the number and then check for a tolerance. If the word to match is 0, the tolerance can't validate as 0 < 0 will always be false. so changing it to 0 <= 0 fixes the problem.

Upgrading from V1.9 to V2.0

I have a question about upgrading v1.9 -> v2.0 - I'm trying to upgrade a prior installation which has version 2015101200 with tag v1.9 to tag v2.0 which has version 2016080400 but requires version 2015111600. After looking at the different version tags, I don't see a database upgrade path from 2015101200 to 2015111600. What's the intended upgrade path?

Only variables should be passed by reference

When I follow "Edit" # question/type/pmatch/tests/behat/testquestion_backup.feature:41 Moodle exception: Exception - Notice: Only variables should be passed by reference in [dirroot]/question/type/pmatch/edit_pmatch_form.php on line 180

Error code: generalexceptionmessage

Stack trace:
line 158 of /lib/behat/lib.php: Exception thrown
line 180 of /question/type/pmatch/edit_pmatch_form.php: call to behat_error_handler()
line 104 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_answer_accuracy_fields()
line 70 of /question/type/pmatch/edit_pmatch_form.php: call to qtype_pmatch_edit_form->add_per_answer_fields()
line 202 of /question/type/edit_question_form.php: call to qtype_pmatch_edit_form->definition_inner()
line 201 of /lib/formslib.php: call to question_edit_form->definition()
line 113 of /question/type/edit_question_form.php: call to moodleform->__construct()
line 57 of /question/type/pmatch/edit_pmatch_form.php: call to question_edit_form->__construct()
line 217 of /question/type/questiontypebase.php: call to qtype_pmatch_edit_form->__construct()
line 193 of /question/question.php: call to question_type->create_editing_form()

Same error:
And I click on "Edit" "link" in the "My first pattern match question" "table_row" # question/type/pmatch/tests/behat/testquestion_edit.feature:51
And I click on "Edit" "link" in the "My first pattern match question" "table_row" # question/type/pmatch/tests/behat/try_rule.feature:42

Moodle 3.1
PHP 7.0.8

Error message when a word starts with a number followed by a letter.

When trying to match 2Cl-(aq) , I have a part that I wanted to read 2Cl(sup)-(/sup)_aq but when entering it gave the error "Non recognized sub content in code fragment "match_all ( mat"." I ended up with 2_Cl(sup)-(/sup)_aq instead and that works.

Please note that in this version ( and ) have been added as characters to treat as spaces.

I've changed all the < in the text to ( so Github will stop changing my text...

Installed on 3.4.6 site which has now crashed.

I installed this plugin on my Moodle 3.4.6 site and it has now crashed. I got several error messages when I went to update the database. Now I just get a white screen at โ€ฆ.../admin/index.php.
The error starts off:
Exception - syntax error, unexpected 'const' (T_CONST), expecting variable (T_VARIABLE).
There is several more lines of error but I can't seem to get the image to upload to this post.

How can I uninstall this to get my site up and running again? Please help.

Error: Return value of qtype...null returned

Hello, i just updated moodle from 3.x (2018 version) to latest, and since then i have the error from qtype_pmatch plugin:

"Return value of qtype_pmatch\local\spell\qtype_pmatch_spell_checker::get_display_name_for_language_code() must be of the type string, null returned"

This appeared, when i f.e. use the searchbox in administrationarea, or install new plugins. I already de- and reinstall it, error stays, i have 2 languages, de and en, php is 7.2.26

  • the update was not possible with copy new version over old, so i install fresh, switched to old db and reinstall all plugins with latest, everything runs fine exept that error mentioned above, someone a idea what could trigger that? It is under development here: http://moodle.timug.net

Thx

Testing table does not return full information about which rules match

I'm using the testing table to generate my rules (test-driven question authoring).

However, if the testing table "Showing the responses for the selected question:" the "Rules" column is blank if the computed mark is "zero". This makes it very difficult to see which rules are operating, and gives the misleading suggestion the match is falling all the way to the end.

Is this a design decision?

Minor typo in an English language string

Hi,
While I was translating the qtype_pmatch plugin language strings in AMOS I saw a tiny typo in the ie_nofullstop string:

Full stop characters are not allowed in pmatch expressions. (Decimal points in the middle of nubmers are OK.)

'nubmers' should be 'numbers' (I think).

Thanks in advance for your help.

Escaped round bracket followed by a space does not allow matches after the space

From an email discussion with Tim and Phil:

Round brackets can be escaped so the correct syntax is

match(Pb2+(aq) + 2Cl-(aq) = PbCl2(s))

but it seems that the algorithm cannot cope with ')' being followed by space (which is a word terminator as defined in pattern match where a word is a sequence of characters between spaces). So match(Pb2+(aq)) works but as soon as you go beyond this you hit the bug.

PHP8.0 issue in interpret_subcontents - with a particular question

[11-Apr-2022 08:13:54 Pacific/Auckland] PHP Warning: foreach() argument must be of type array|object, null given in /d1/srv/moodle/otagounifom/moodle/question/type/pmatch/pmatch/interpreter.php on
line 178
[11-Apr-2022 08:13:54 Pacific/Auckland] Database transaction aborted automatically in /d1/srv/moodle/otagounifom/moodle/mod/quiz/processattempt.php
[11-Apr-2022 08:13:54 Pacific/Auckland] Default exception handler: An error occurred while processing your responses (Coding error detected, it must be fixed by a programmer: Oops. You called matches for an expression that is not valid. You should call is_valid first. Interpreter error :Non recognized sub content in code fragment "match_mw (less*|smal".). Click continue to return to the page you were on and try again. Debug:
Error code: errorprocessingresponses

  • line 2479 of /mod/quiz/attemptlib.php: moodle_exception thrown
  • line 89 of /mod/quiz/processattempt.php: call to quiz_attempt->process_attempt()

Not currently clear what has caused this - maybe an invalid match expression?

4.4 Fatal error

Fatal error: Declaration of qtype_pmatch\testquestion_test_base::assert_same_xml(string $expectedxml, string $xml) must be compatible with question_testcase::assert_same_xml($expectedxml, $xml) in /var/www/html/question/type/pmatch/tests/testquestion_test_base.php on line 235

MOODLE_404_STABLE
PHP8.1
this must be a recent change in core 4.4 as we didn't encounter this in the scoping for 4.4 we did when it was released

Superscript issue

Hi guys - I've been spear-heading this amazing question type at our institution since last year. I do not know where to report bugs, but something weird is happening. I have a question that needs superscripts for correct input (i.e. a formula). Last year we used it in the exam with 100% success (really truly amazing as there were over 800 unique answers). Now the same question is broken? I have tracked the issue to the following. The text I am looking for is programmed in as follows:

match_w (2n)

this will not work, but if I tell pmatch to remove '<' and '>' and convert to space, then the following

match_w (2 sup n /sup)

now works. It is a very bizarre thing. Note also that the subscript version does work, so ... weird. Is there any reason for this? I have attached the question type as it originally stood. The XML file is renamed as TXT

--Gareth
pmatch Q with superscript issue.txt

match_at_least_N() function

I would like to have a function that could match at least N responses, something between match_any() and match_all(). For example:

match_at_least_2(
match_mow(...)
match_mow(...)
match_mow(...)
)

Or is there any way of doing this with the current functions?

Box Spout update

Moodle 4.2
PHP8.0
MySQL8
qtype_pmatch main

qtype_pmatch.testquestion_responses_test/test_grade_response
qtype_pmatch\testquestion_responses_test::test_grade_response
Error: Class "Box\Spout\Reader\Common\Creator\ReaderEntityFactory" not found

/var/www/html/question/type/pmatch/classes/testquestion_import_helper.php:248
/var/www/html/question/type/pmatch/classes/testquestion_import_helper.php:66
/var/www/html/question/type/pmatch/classes/testquestion_responses.php:737
/var/www/html/question/type/pmatch/tests/testquestion_test_base.php:74
/var/www/html/question/type/pmatch/tests/testquestion_test_base.php:103
/var/www/html/question/type/pmatch/tests/testquestion_responses_test.php:278
/var/www/html/lib/phpunit/classes/advanced_testcase.php:94

Proper nouns spell checking

if you include proper correctly spelt proper nouns (e.g Greek) in your input, the spell checker still throws them out, even though they are in the aspell / ispell dictionary. This happens regardless of the case sensitivity option. The code seems to lowercase everything it sends to the spell checker does not use the --ignore-case option.

Box\Spout\Reader\Common\Creator\ReaderEntityFactory not found

pmatch: latest master
Moodle: 3.7.7

  1. qtype_pmatch_testquestion_testcase::test_currentquestion
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:248
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:66
/path/to/moodle/question/type/pmatch/classes/testquestion_responses.php:737
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:84
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:111
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:69
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_testcase" question/type/pmatch/tests/testquestion_testcase.php

  1. qtype_pmatch_testquestion_amati_rule_suggestion::test_find_pmatch_equivalents_to_amati_commands
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:248
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:66
/path/to/moodle/question/type/pmatch/classes/testquestion_responses.php:737
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:84
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:111
/path/to/moodle/question/type/pmatch/tests/amati_rule_suggestion_test.php:1184
/path/to/moodle/question/type/pmatch/tests/amati_rule_suggestion_test.php:155
/path/to/moodle/question/type/pmatch/tests/amati_rule_suggestion_test.php:72
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_amati_rule_suggestion" question/type/pmatch/tests/amati_rule_suggestion_test.php

  1. qtype_pmatch_testquestion_amati_rule_suggestion::test_currentquestion
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:248
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:66
/path/to/moodle/question/type/pmatch/classes/testquestion_responses.php:737
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:84
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:111
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:69
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_amati_rule_suggestion" question/type/pmatch/tests/amati_rule_suggestion_test.php

  1. qtype_pmatch_testquestion_responses_test::test_add_responses
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:248
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:66
/path/to/moodle/question/type/pmatch/classes/testquestion_responses.php:737
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:84
/path/to/moodle/question/type/pmatch/tests/testquestion_responses_test.php:161
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_responses_test" question/type/pmatch/tests/testquestion_responses_test.php

  1. qtype_pmatch_testquestion_responses_test::test_update_response
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:248
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:66
/path/to/moodle/question/type/pmatch/classes/testquestion_responses.php:737
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:84
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:111
/path/to/moodle/question/type/pmatch/tests/testquestion_responses_test.php:201
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_responses_test" question/type/pmatch/tests/testquestion_responses_test.php

  1. qtype_pmatch_testquestion_responses_test::test_delete_responses_by_ids
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:248
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:66
/path/to/moodle/question/type/pmatch/classes/testquestion_responses.php:737
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:84
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:111
/path/to/moodle/question/type/pmatch/tests/testquestion_responses_test.php:225
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_responses_test" question/type/pmatch/tests/testquestion_responses_test.php

  1. qtype_pmatch_testquestion_responses_test::test_get_question_grade_summary_counts
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:248
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:66
/path/to/moodle/question/type/pmatch/classes/testquestion_responses.php:737
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:84
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:111
/path/to/moodle/question/type/pmatch/tests/testquestion_responses_test.php:244
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_responses_test" question/type/pmatch/tests/testquestion_responses_test.php

  1. qtype_pmatch_testquestion_responses_test::test_grade_response
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:248
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:66
/path/to/moodle/question/type/pmatch/classes/testquestion_responses.php:737
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:84
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:111
/path/to/moodle/question/type/pmatch/tests/testquestion_responses_test.php:287
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_responses_test" question/type/pmatch/tests/testquestion_responses_test.php

  1. qtype_pmatch_testquestion_responses_test::test_load_responses_from_file
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:248
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:66
/path/to/moodle/question/type/pmatch/classes/testquestion_responses.php:737
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:84
/path/to/moodle/question/type/pmatch/tests/testquestion_responses_test.php:329
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_responses_test" question/type/pmatch/tests/testquestion_responses_test.php

  1. qtype_pmatch_testquestion_responses_test::test_try_rule
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:248
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:66
/path/to/moodle/question/type/pmatch/classes/testquestion_responses.php:737
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:84
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:111
/path/to/moodle/question/type/pmatch/tests/testquestion_responses_test.php:373
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_responses_test" question/type/pmatch/tests/testquestion_responses_test.php

  1. qtype_pmatch_testquestion_responses_test::test_grade_rule_with_responses
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:248
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:66
/path/to/moodle/question/type/pmatch/classes/testquestion_responses.php:737
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:84
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:111
/path/to/moodle/question/type/pmatch/tests/testquestion_responses_test.php:441
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_responses_test" question/type/pmatch/tests/testquestion_responses_test.php

  1. qtype_pmatch_testquestion_responses_test::test_get_rule_accuracy_counts
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:248
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:66
/path/to/moodle/question/type/pmatch/classes/testquestion_responses.php:737
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:84
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:111
/path/to/moodle/question/type/pmatch/tests/testquestion_responses_test.php:473
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_responses_test" question/type/pmatch/tests/testquestion_responses_test.php

  1. qtype_pmatch_testquestion_responses_test::test_regrading
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:248
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:66
/path/to/moodle/question/type/pmatch/classes/testquestion_responses.php:737
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:84
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:111
/path/to/moodle/question/type/pmatch/tests/testquestion_responses_test.php:513
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_responses_test" question/type/pmatch/tests/testquestion_responses_test.php

  1. qtype_pmatch_testquestion_responses_test::test_save_rule_matches
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:248
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:66
/path/to/moodle/question/type/pmatch/classes/testquestion_responses.php:737
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:84
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:111
/path/to/moodle/question/type/pmatch/tests/testquestion_responses_test.php:579
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_responses_test" question/type/pmatch/tests/testquestion_responses_test.php

  1. qtype_pmatch_testquestion_responses_test::test_validate_csv_file_type
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:248
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:66
/path/to/moodle/question/type/pmatch/tests/testquestion_responses_test.php:760
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_responses_test" question/type/pmatch/tests/testquestion_responses_test.php

  1. qtype_pmatch_testquestion_responses_test::test_validate_xlsx_file_type
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:266
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:69
/path/to/moodle/question/type/pmatch/tests/testquestion_responses_test.php:802
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_responses_test" question/type/pmatch/tests/testquestion_responses_test.php

  1. qtype_pmatch_testquestion_responses_test::test_validate_ods_file_type
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:284
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:72
/path/to/moodle/question/type/pmatch/tests/testquestion_responses_test.php:844
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_responses_test" question/type/pmatch/tests/testquestion_responses_test.php

  1. qtype_pmatch_testquestion_responses_test::test_get_responses with data set #2 ('/data/apache/htdocs/moodlesit...al.csv', 4, array(array(0, 'Response 1'), array(1, 'Response 2'), array(0, 'Response 3'), array(1, 'Response 4')))
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:248
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:66
/path/to/moodle/question/type/pmatch/tests/testquestion_responses_test.php:890
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_responses_test" question/type/pmatch/tests/testquestion_responses_test.php

  1. qtype_pmatch_testquestion_responses_test::test_get_responses with data set #3 ('/data/apache/htdocs/moodlesit...l.xlsx', 4, array(array(0, 'Response 1'), array(1, 'Response 2'), array(0, 'Response 3'), array(1, 'Response 4')))
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:266
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:69
/path/to/moodle/question/type/pmatch/tests/testquestion_responses_test.php:890
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_responses_test" question/type/pmatch/tests/testquestion_responses_test.php

  1. qtype_pmatch_testquestion_responses_test::test_get_responses with data set #4 ('/data/apache/htdocs/moodlesit...al.ods', 4, array(array(0, 'Response 1'), array(1, 'Response 2'), array(0, 'Response 3'), array(1, 'Response 4')))
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:284
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:72
/path/to/moodle/question/type/pmatch/tests/testquestion_responses_test.php:890
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_responses_test" question/type/pmatch/tests/testquestion_responses_test.php

  1. qtype_pmatch_testquestion_responses_test::test_currentquestion
    Error: Class 'Box\Spout\Reader\Common\Creator\ReaderEntityFactory' not found

/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:248
/path/to/moodle/question/type/pmatch/classes/testquestion_import_helper.php:66
/path/to/moodle/question/type/pmatch/classes/testquestion_responses.php:737
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:84
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:111
/path/to/moodle/question/type/pmatch/tests/testquestion_testcase.php:69
/path/to/moodle/lib/phpunit/classes/advanced_testcase.php:80

To re-run:
vendor/bin/phpunit "qtype_pmatch_testquestion_responses_test" question/type/pmatch/tests/testquestion_responses_test.php

Latest pmatch (2018111900) blocks running of unit tests elsewhere!

Really sorry, but I get this error when running "vendor/bin/phpunit --group qtype_stack". This is blocking running any unit tests of STACK!

csangwin@faraday:/var/www/html/demo$ vendor/bin/phpunit --group qtype_stack
Moodle 3.4.1 (Build: 20180115)
Php: 7.0.32.1.8.1, mariadb: 10.0.37, OS: Linux 3.16.0-4-amd64 x86_64
PHP Fatal error:  Class 'core_privacy\tests\provider_testcase' not found in /var/www/html/demo/question/type/pmatch/tests/privacy_provider_test.php on line 31

Fatal error: Class 'core_privacy\tests\provider_testcase' not found in /var/www/html/demo/question/type/pmatch/tests/privacy_provider_test.php on line 31

[My solution is to comment out class privacy_provider_test extends .... from line 31 of pmatch/tests/privacy_provider_test.php, but that doesn't fix the problem. Sorry to leave this hanging, but it is 18:30 on a Friday and I want to run my unit tests overnight!

configurable number of words warning

Currently there is a 20 word warning that can be enabled and helps avoiding the "copy&paste" problem. It would be more flexible to have an option to change that word number depending on the the answer length.

Main branch regression

In swapping from master->main, some commits appear to have been dropped.

Eg #54 This patch is no longer present on the main branch and unit tests again throw a deprecation notice on PHP 7.4

Publish qtypes in Moodle Plugin Repository

Hi Tim,

could you please publish the current versions of the OU qtypes in the Moodle Plugin Repository to provide the latest fixes (icons etc) there?

Many thanks in advance.
Alexander Bias

Tiny typo in one English language string

Hi,

While I was translating in AMOS the English language strings for minresponses | qtype_pmatch , I think I spotted one tiny typo:

'Minumum number of responses' should be 'Minimum number of responses' (I think).

Thanks in advance for your help.

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.