Matching questions and special characters - M2

Matching questions and special characters - M2

{$a->নাম} - {$a->তারিখ} দ্বারা
Number of replies: 8

I have seen several cases recently when Matching questions are very sensitive to any kind of special characters. So I was wondering if this is a bug or if we have a workaround.

Answer1:   Reasonable Domain   Match1:    0<x<9
Answer2:   Reasonable Range     Match2:     0<x<250

If you type exactly like this, then you will see only the first character (0) in the drop-downs

matching

If you will type 0 < x < 9 (add spaces), then you will always get it "wrong", unless you remove < characters.

matching2

I confirmed this on several M2 instances, including demo site.

 

Other characters that I had sometimes to remove from matching questions were '  "  and ...

রেটিং এর গড়: -
In reply to Elena Ivanova

Re: Matching questions and special characters - M2

{$a->নাম} - {$a->তারিখ} দ্বারা
Core developers এর ছবি Particularly helpful Moodlers এর ছবি Plugin developers এর ছবি Testers এর ছবি Translators এর ছবি

@Elena,

We have exactly the same problem in the Quiz Matching question type. You must add spaces around the > and < signs for a Matching question to work.

Joseph

In reply to Joseph Rézeau

Re: Matching questions and special characters - M2

{$a->নাম} - {$a->তারিখ} দ্বারা

But it still does not work দুঃখিত

I do add spaces - then I attempt the question, answering it correctly. And then my answers are always "incorrect" ... (see my second screenshot).

So to make it work I should remove any kind of character that is even remotely "special":  > < " ' ...

In reply to Elena Ivanova

Re: Matching questions and special characters - M2

{$a->নাম} - {$a->তারিখ} দ্বারা
Core developers এর ছবি Particularly helpful Moodlers এর ছবি Plugin developers এর ছবি Testers এর ছবি Translators এর ছবি

You're right, this is definitely a bug. One workaround is to invert your left and right columns, i.e. place the "formulas" containing < or > signs in the Question field and the "normal text" in the Answer field.

Answer1: 0<x<9      Match1:    Reasonable Domain  
Answer2: 0<x<250  Match2:     Reasonable Range    

In reply to Joseph Rézeau

Re: Matching questions and special characters - M2

{$a->নাম} - {$a->তারিখ} দ্বারা
Core developers এর ছবি Particularly helpful Moodlers এর ছবি Plugin developers এর ছবি Testers এর ছবি Translators এর ছবি

Reported as MDL-35448. Interested people please vote for it!

@Elena, if you can hack your moodle core files, you can use the patch I provide in the tracker, it's only 2 lines to change.

Joseph

In reply to Joseph Rézeau

Re: Matching questions and special characters - M2

{$a->নাম} - {$a->তারিখ} দ্বারা

Thank you!

I have more though লজ্জিত

1.  Quotes

 

2. Spanish characters

accents

In reply to Elena Ivanova

Re: Matching questions and special characters - M2

{$a->নাম} - {$a->তারিখ} দ্বারা
Core developers এর ছবি Particularly helpful Moodlers এর ছবি Plugin developers এর ছবি Testers এর ছবি Translators এর ছবি

Quotes and Spanish characters work OK for me.

If you want to provide more examples, please give the text of matching pairs as text, not as a screenshot image, so I can simply copy-paste.

Joseph

In reply to Joseph Rézeau

Re: Matching questions and special characters - M2

{$a->নাম} - {$a->তারিখ} দ্বারা

I guess if I will copy/paste the ones from my example above - it would not help to replicate the issue. But just in case: 

1. First choice

1. First match

2. Second choice

2. Second match

3. Third Choice

3."Third match"

Moodle 2.3.2+ (Build: 20120914)