-
-
Save timhunt/fc3f0850e4ba943b0093a46cb9e78d0a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From d9e867918199a1962b75e77ed95125d1a0c8b346 Mon Sep 17 00:00:00 2001 | |
From: Huong Nguyen <Huong.NguyenVan@Nashtechglobal.com> | |
Date: Mon, 7 Sep 2020 15:11:21 +0700 | |
Subject: [PATCH] PMatch JME: should not invoke the dictionary on chemistry | |
equations #413438 | |
--- | |
question/type/pmatchjme/questiontype.php | 4 +++- | |
.../type/pmatchjme/tests/fixtures/testquestion.moodle.xml | 2 +- | |
2 files changed, 4 insertions(+), 2 deletions(-) | |
diff --git a/question/type/pmatchjme/questiontype.php b/question/type/pmatchjme/questiontype.php | |
index 301bff43833..b5771418992 100644 | |
--- a/question/type/pmatchjme/questiontype.php | |
+++ b/question/type/pmatchjme/questiontype.php | |
@@ -23,6 +23,8 @@ | |
*/ | |
+use qtype_pmatch\local\spell\qtype_pmatch_spell_checker; | |
+ | |
defined('MOODLE_INTERNAL') || die(); | |
require_once($CFG->dirroot . '/question/type/pmatch/questiontype.php'); | |
@@ -60,7 +62,7 @@ class qtype_pmatchjme extends qtype_pmatch { | |
global $DB; | |
$question->usecase = 1; | |
$question->forcelength = 0; | |
- $question->applydictionarycheck = 0; | |
+ $question->applydictionarycheck = qtype_pmatch_spell_checker::DO_NOT_CHECK_OPTION; | |
$question->extenddictionary = ''; | |
$question->converttospace = ''; | |
if (!empty($question->id)) { | |
diff --git a/question/type/pmatchjme/tests/fixtures/testquestion.moodle.xml b/question/type/pmatchjme/tests/fixtures/testquestion.moodle.xml | |
index 34fe57d4151..f50ce820e64 100644 | |
--- a/question/type/pmatchjme/tests/fixtures/testquestion.moodle.xml | |
+++ b/question/type/pmatchjme/tests/fixtures/testquestion.moodle.xml | |
@@ -18,7 +18,7 @@ | |
<allowsubscript>0</allowsubscript> | |
<allowsuperscript>1</allowsuperscript> | |
<forcelength>0</forcelength> | |
- <applydictionarycheck>0</applydictionarycheck> | |
+ <applydictionarycheck>-</applydictionarycheck> | |
<extenddictionary></extenddictionary> | |
<converttospace></converttospace> | |
<answer fraction="100" format="moodle_auto_format"> | |
-- | |
2.22.0.windows.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment