QType Word Select with some codes appear later some time

QType Word Select with some codes appear later some time

by Kampanart Udomchian -
Number of replies: 13

Hi. I am not sure HOW these strange codes appear later for some time. The users notice the strange thing as described in the attached pictures.

Has anyone faced this kind of problem "some codes added unintentionally"? on Moodle 3.6.5+

How to solve it forever? As it can happen without notice, so the users will see it one day.

Thanks.

Attachment Error-1_2020-03-03_9-51-16.png
Attachment Error-2_2020-03-03_9-53-35.png
Average of ratings: -
In reply to Kampanart Udomchian

Re: QType Word Select with some codes appear later some time

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Can you confirm what the question type is and can you paste in examples of the html so they can be tested.
Update: This is where I should berate myself for not reading the posters subject that says QType WordSelect.

You have crammed so much into a single post it is hard to work out the actual issue.  My usual complaint is too little information so I seem to be a bit Goldilocks...
Average of ratings: Useful (1)
In reply to Marcus Green

ตอบ: Re: QType Word Select with some codes appear later some time

by Kampanart Udomchian -
In all of my questions, there are various question types I use, but this kind of errors happens with the Word Select question type.


At the moment, I don't see any more errors, but if there is any, I will let you all see those codes. Thanks.

In reply to Kampanart Udomchian

Re: QType Word Select with some codes appear later some time

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
How did you create those questions? Did you copy/paste the texts from another source, such as a word processor or a website? You should never do this, or you should clean the code first.
Average of ratings: Useful (2)
In reply to Joseph Rézeau

ตอบ: Re: QType Word Select with some codes appear later some time

by Kampanart Udomchian -
I understand your point, but surprisingly, this kind of error happens with the Word Select question type.

I have the notepad to work with every questions, there are simple code to fill in as for the question text.

After created the questions, it was fine. But as time goes by, the user just notice that strange question layout with those codes. Btw, I am finding any of strange question as for example. Thanks.
In reply to Kampanart Udomchian

Re: ตอบ: Re: QType Word Select with some codes appear later some time

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Sorry, but I do not understand your reply. You mention "notepad". Does this mean you first write your Word Select question text in Notepad and then copy/paste it into the Word Select question text? Why do you not type the text directly in the Question editor?
You write "as time goes by, the user just notice that strange question layout with those codes". This is not possible. The text of your question cannot change by itself "as time goes by".
Another thing; why do you use the Word Select question type for this exercise? It is not really suited, you should really use the Cloze question type.
Finally, could you please export your Great Barrier Reef question in Moodle XML format and attach the xml file to your next answer, so we can examine it and provide relevant help?
Average of ratings: Useful (1)
In reply to Joseph Rézeau

ตอบ: Re: ตอบ: Re: QType Word Select with some codes appear later some time

by Kampanart Udomchian -

I am new to Moodle. I agree with you about using the Cloze question type. (I will change them later.)

About "Notepad", I attached the picture for you. It's only simple code patterns for me to create the questions.

BTW, if I find any error like this lesson, I will export to Moodle XML and post again because I had edited those 2 questions a few days ago once the user notified me.

** Your reply is useful.

Attachment Capture.PNG
In reply to Kampanart Udomchian

Re: ตอบ: Re: ตอบ: Re: QType Word Select with some codes appear later some time

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
OK, now I understand better your initial problem. Why do you use Notepad to enter your question text, with added HTML tags? This is not a good idea. You should type your question text directly in the text editor that is provided (usually ATTO).
In your original post you complained that your questions text if full of weird code, but you put that code in yourself. Most strange!thoughtful
Average of ratings: Useful (2)
In reply to Joseph Rézeau

ตอบ: Re: ตอบ: Re: ตอบ: Re: QType Word Select with some codes appear later some time

by Kampanart Udomchian -

Yes sir. I must be more careful about this.

In reply to Kampanart Udomchian

Re: QType Word Select with some codes appear later some time

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Kampanart,

The HTML formatting tags are automatically inserted by the Atto editor, which does a great job. Normally, you don't have to edit the HTML code.

If you check the HTML code, you will see that the Atto editor sometimes inserts "unnecessary" tags such as <span style="font-size:1rem;">. These tags are fairly harmless, for example <span style="font-size:1rem;"> simply means to use the default root font size.

You have to be careful if you want to clean up the HTML code and remove these tags. Make sure to delete the entire tag, that is everything inside and including the "<" and ">" characters, and the corresponding closing tag. For example, the tag <span style="font-size:1rem;"> and the corresponding closing tag </span> can be deleted if desired.

"&nbsp;" is a character code which is also sometimes inserted by the Atto editor. It represents a non-breaking space. You can replace it with an ordinary space, " ", if that's what you want.

If you edit the HTML code, be sure to check the result in preview mode. Then check again the HTML code and the preview before saving. If you are editing the HTML code, in case of problem, I suggest that you always make a copy of the HTML code at least to the clipboard before previewing and saving.

You may want to switch to the "Plain text area" editor, but I don't suggest that you do so unless you have a few years of experience working with HTML.

In short, clean up your code correctly and you should have no problem.

Average of ratings: Useful (1)
In reply to Dominique Bauer

Re: QType Word Select with some codes appear later some time

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
@Dominique,
We can't really answer the OP's post until he answers my simple question above. If, as I suspect, they did a copy/paste of their text into the text of that WordSelect question, then all the "garbage" codes are easily explained.
Average of ratings: Useful (3)
In reply to Dominique Bauer

ตอบ: Re: QType Word Select with some codes appear later some time

by Kampanart Udomchian -
Thanks for your comment.

If I find any error like this, I will post here again. Those 2 questions had been edited already.
In reply to Kampanart Udomchian

Re: ตอบ: Re: QType Word Select with some codes appear later some time

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Hi Kampanart thank you for persisting with this, It would be very helpful if you can confirm what theme you are using (probably of no importance) and if you could export the questions you are having problems with to XML format and make the output available to me. 
Average of ratings: Useful (1)