Foreign characters in short answers

Foreign characters in short answers

by Restituta Castiello -
Number of replies: 30

Hi, we are an institution based in Italy, 90% of our students are italian native speakers. During this pandeming we are administering tests online so we have to rely on student's own devices.

We need to administer short answer quizzes in german, french and spanish and answers often contain words with special characters such as umlauts or the spanish ñ and so on.

Is there any way to introduce a virtual keybord in the quiz without the use of any plugin or without asking students to tamper with OS keybord? Something which allows them to easily input foreign characters?

Thanks lot for your help


Average of ratings: -
In reply to Restituta Castiello

Re: Foreign characters in short answers

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Good question. I assume that the students are Italian speakers, so they have Italian keyboards. The question is how should they enter the special characters in German, French and Spanish? How did they do that during the course? On Linux we have a system called IBus. Once it is activated, by pressing a hot-key repeatedly one can rotate the keyboard in any number of languages - including many exotic ones.
wink
In reply to Visvanath Ratnaweera

Re: Foreign characters in short answers

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Both Windows and Linux support switching keyboard drivers from one language to another with just two clicks. All a person has to do is add the required drivers. I currently have about forty keyboard drivers and the same number of Moodle language packs installed so that I can support/work in the MooTyper plugin. This makes it possible for me to type in any of the installed languages with just two clicks. I can even change Moodle to display in another language in just another two clicks. Should be just a matter of showing students how to add a keyboard driver in the desired language. Visvanath mentions auto rotation switching in Linux and in Windows the same auto rotation between languages is achieved via the Windows key + space key.
Average of ratings: Useful (1)
In reply to AL Rachels

Re: Foreign characters in short answers

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It seems to me that, at some point in learning a foreign language in the 21st centuary, learning how to type that language (using your operating system's keyboard support) is a useful learning outcome.

However, early on in learning the language, that is probably just a distraction. Therefore, some sort of work-around in Moodle might be useful, but I don't know what is available.
In reply to Tim Hunt

Re: Foreign characters in short answers

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Hate it when that happens...had an answer half typed before I realized my keyboard was set for Hindi. Think I'll go do some yard work.
Anyway, there is a relatively easy work-around in Windows. Open the Windows Character Map applet. (Start > Windows accessories > Character Map) Find the letter you want, such as, ñ, select it, hit the copy button, go to where you want it to appear and paste it.
Average of ratings: Useful (1)
In reply to AL Rachels

Re: Foreign characters in short answers

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Al, you are overestimating Joe and Josephine normal student.
Average of ratings: Useful (1)
In reply to Marcus Green

Re: Foreign characters in short answers

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
AL Rachels wrote:

> had an answer half typed before I realized my keyboard was set for Hindi.

The best advertisement for the MooTyper.
wink

@Marcus, I know what Joe does. He has found an on-line tool which does the same: Select your keyboard, type, copy-and-paste. Pretty convenient in the case of non-latin languages, because it allows various transliteration schemes and also offers complete glyphs.

P.S. I fear we've diverted from the Quiz forum to Languages.
In reply to Restituta Castiello

Re: Foreign characters in short answers

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

You could paste the following line in the HTML of the question text:

<button onclick="MyWindow=window.open('https://www.lexilogos.com/keyboard/index.htm','MyWindow','width=600,height=300'); return false;">Multilingual keyboard</button>

Students have to copy and paste the answer. Note that this will not work if you set "Browser security" to "Full screen pop-up with some JavaScript security".

ForumQuiz_20210415_0120.png

Average of ratings: Useful (3)
In reply to Restituta Castiello

Re: Foreign characters in short answers

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

HotPotatoes has a useful virtual keyboard option displaying only those diacritics which are needed in the current activity, thus avoiding cluttering the screen with useless signs. I find it really neat. Not sure how difficult it would be to add this feature to the Moodle short answer question type.

Average of ratings: Useful (2)
In reply to Joseph Rézeau

Re: Foreign characters in short answers

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Looks like something that might be widely useful. Would it be useful in my Gapfill question type?
In reply to Marcus Green

Re: Foreign characters in short answers

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

I'm not surprised that that featured piqued your interest, Marcus.wink Long time since you last added a new useful feature to Gapfill. big grin

In reply to Joseph Rézeau

Re: Foreign characters in short answers

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
"Long time since you last added a new useful feature to Gapfill."
I thought you would still be gasping with pleasure from
Version 2.09 of the Moodle Gapfill question type Sep 2020
When I added Single Use draggables mmmmm.
I just added a fix to master to stop iOS breaking apostrophe's ... and I will need to make it work with Junes version of the Mobile app....
But I do like the idea of being able to add accents without being a keyboard ninja 🥋
In reply to Marcus Green

Re: Foreign characters in short answers

by Justin Hunt -
Picture of Particularly helpful Moodlers Picture of Plugin developers
Thats how we do this in wordcards too. Pull the distractors from the pool of possible options.


It's 2021 already Marcus. 
Average of ratings: Useful (2)
In reply to Justin Hunt

Re: Foreign characters in short answers

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

Re: Foreign characters in short answers

by Restituta Castiello -

This is really great! Is there any way to make it work with cloze quizzes with multiple shortanswers?

I've tried it it in my cloze and any time I click on a button, each gap is filled with that character.

Thank you! 

In reply to Justin Hunt

Re: Foreign characters in short answers

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I was working on the UK standard assumption that "if you shout loud enough everyone understands English anyway" + ASCII is all you need.
In reply to Marcus Green

Re: Foreign characters in short answers

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

Hello Marcus,

I made this little multilingual keyboard in JavaScript. Obviously it is not complete, but it works great. Unlike the previous proposals, the picture is not a virtual keyboard, although it could be made so. Rather, by selecting a language, the keys on the real keyboard change as indicated in the picture. You can try it at https://moodleformulas.org/course/view.php?id=77&section=46 ↗.


I know it's not the real thing, you probably can't use it on a phone, you have to check if it works on a Mac, etc. but I think some users, who can't switch keyboards on their computer for some reason, might still find it useful.

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

Re: Foreign characters in short answers

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

Re: Foreign characters in short answers

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Hi Dominique, I have been following your posts and also downloading the code and testing it. The more I read about this the more I wonder why it has not come up more in the past, it seems very important. I have been researching both specific solutions (adding it to my Gapfill question type), and generic ones having a local plugin where qtypes can somehow "hook into" the keyboard. Because there are so many combinations of accents I thought it would be useful to re-use some existing code and I was interested in this.

https://github.com/marcusgreen/Keyboard

So much software, so little time.
Average of ratings: Useful (1)
In reply to Marcus Green

Re: Foreign characters in short answers

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

Hi Marcus,

I wonder what would be better:

  1. a virtual keyboard (click keys on an image) where only the international characters are displayed,
  2. a complete 61-key virtual keyboard (click keys on an image),
  3. change the actual keyboard keys,
  4. both 2. and 3. combined.
What do you and other people think?

I think option 1 might do the trick for languages where there are not a lot of international characters, e.g. German. But for languages where there are a lot of international characters, for example Greek or Russian, options 2, 3 or 4 seem more appropriate to me. (Note that by international characters I mean characters that differ from those of the US English keyboard.)

The keyboard could be integrated in a "block" plugin. Teachers would only have to display this block in their quiz. Since the answer boxes in Cloze, Short Answer and probably most other question types are "input" elements, the keyboard block plugin would work with all of these question types. It could even be adjusted to other question types if their answer boxes use elements other than "input".

I think I read that "block" plugins are relatively easy to write. I might be able to give it a try this summer.

My mother tongue is French and I have spoken French at home and at work most of my life. So I'm used to the accented characters and other difficulties of this language, but I can understand that this is somewhat scary for someone who is not used to it. Although a bit laborious, it is nevertheless not that complicated. smile

There is a multilingual Virtual Keyboard plugin ↗, but it only works with the TinyMCE editor. An international keyboard "block" plugin could work with TinyMCE and Atto editors, for example in Essay questions, as well as when there is no editor for example in Cloze and Short answer questions.

In reply to Dominique Bauer

Re: Foreign characters in short answers

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
I would put 1. as the most immediately useful.
In reply to Dominique Bauer

Re: Foreign characters in short answers

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Dominique

My initial reaction is of skepticism. Before taking the assessment the learner must have used his computer during the course, I mean outside of Moodle, office programs for example. So, how did he write?

Looking more carefully, I realize that the arguement above is valid only for the personal laptop/PC. How about the school's laptops/PCs? What if the learner is using the PC in a public library?

And then there is a whole world of mobile devices (tablets and smart phones). Have no clue, I don't use them.
In reply to Visvanath Ratnaweera

Re: Foreign characters in short answers

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
My scenario is I am learning introductory Spanish. There is a question that expects me to type in the word for Year. The correct spelling is año. At this moment I have no idea how to enter that accent over the ñ from the keyboard I am using. So I enter ano instead. The lack of an accent means the word has a very, very different meaning.
In reply to Marcus Green

Re: Foreign characters in short answers

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
What do you mean, your client machine has no keyboard drivers? What is the platform, Mac? Linux has IBus https://moodle.org/mod/forum/discuss.php?d=420985#p1696610, Windows has an equivalent https://moodle.org/mod/forum/discuss.php?d=420985#p1696629.

Swapping the code page in 8 bit ASCII was normal practice even during the DOS days, 1980s. Today we talk of UTF, arrived at least a decade ago on the Linux desktop. Servers switched much earlier.
In reply to Visvanath Ratnaweera

Re: Foreign characters in short answers

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
'What do you mean, your client machine has no keyboard drivers? '
I have absolutely no idea, I expect I could find out, but then I am total Geek who can do most things with a computer. I am not even slightly normal. Transfer that to Joe Q Normal and you have "I can't do this"

"Today we talk of UTF"
Perhaps you and I talk of UTF, the other 6.9 billion humans don't however.

I spent about 12 years teaching and I am familiar with how hard it was to get students in their late teens to login where everyone had the same short password that was a common word with no extra characters. Changing keyboard driver would be a challenge. Giving them the extra characters to click on would be a huge help.
Average of ratings: Useful (1)
In reply to Marcus Green

Re: Foreign characters in short answers

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
You can't spell ¡Hasta mañana! ? That's sad. You didn't say what your client platform is. On mine, IBus on Debian GNU/Linux, I activated Spanish and get ñ at ; on my US keyboard, and ¡, ¿ at =, +.

Being a Windows noob, I would have searched the System settings and changed the keyboard. I guess, if I add the keyboard, a switch will appear in the task bar. I vaguely remember Alt+Numkey combinations in DOS and early Windows. Expect modern MS Windows to be more multilingual / user friendly. I was surprised not to find an answer in the https://docs.moodle.org/en/Language_FAQ.

Are you sure of those 6.9 billion humans? How do the Chinese, Japanese, Koreans write? Not to mention India and Pakistan. Watch out! There are some heavyweights in that list.

P.P.S. We've definitely left the Quiz forum and landed in Languages.
In reply to Visvanath Ratnaweera

Re: Foreign characters in short answers

by Germán Valero -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
In reply to Germán Valero

Re: Foreign characters in short answers

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Hi Germán

It is nice of you to prepare that FAQ. If you meant me, sorry to disappoint you, I won't take part in it - for multiple reasons.

The first problem: Why limit to Windows? Moodle users are distributed over five platforms: Linux, Mac OS, Windows on the desktop and Android, iOS on mobile devices. I know only one. Each of those mentioned (must) have multiple methods on the system level. And do we include the application: browser, mobile app? How about other applications, famously Office? How about the system character set, like for file names? You see, the useful question it is very broad.

The second, and bigger, problem: I have given up the Moodle Docs a long time ago. Its "organic" nature (a collection of random pages, at all levels of development and non-development). To make the matters worse, the whole wiki spawns itself every six months. Even Sisyphus' job was more focused! (Before you ask further, I have discussed this extensively in the "Moodle community sites" and not available for further discussion.)
In reply to Visvanath Ratnaweera

Re: Foreign characters in short answers

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
'The first problem: Why limit to Windows? '
My interpretation of the main purpose of this thread was that by offering a virtual keyboard within an activity the operating system would be irrelevant. I intend to pursue solutions for this (once I get the latest thing out the way)
Average of ratings: Useful (2)
In reply to Marcus Green

Re: Foreign characters in short answers

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators

I think the confusion started with your post, <full quote>"I was working on the UK standard assumption that "if you shout loud enough everyone understands English anyway" + ASCII is all you need."</full quote> where we moved from the quiz (question type short answer) to typing non-english (latin) characters in general. May be it won't be a bad idea, if the moderator would jump in an split the discussion at that point and move that branch to the Languages forum (as I have warned twice: here and here).
Average of ratings: Useful (1)