Longer quiz answers

Longer quiz answers

by Valentin Dumitru -
Number of replies: 6

Hello,

I am building a multilingual course (three languages: en, fr, es) and I am facing with the problem that answers to let's say multiple choice questions are limited to 256 characters. The HTML syntaxt for the three languages would be:

<span lang="en" class="multilang"></span><span lang="es" class="multilang"></span><span lang="fr" class="multilang"></span>

which totals 124 characters, leaving only 132 characters for the actual text, which splitted in three (languages) means an average of 44 characters/answer/language. This is very often too little. I there a solution for this?

Actually, this is a general problem, for all text values that reside in inputs instead of textarea tags (site title, resource title, pretty much all titles...).

Average of ratings: -
In reply to Valentin Dumitru

Re: Longer quiz 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

What makes you think the answers are limited to 255 characters?

In the database, they are stored in TEXT columns, which are effectively unlimited.

In reply to Tim Hunt

Re: Longer quiz answers

by Jeff Forssell -

That's good news that there's no limit in getting to the database, at least for quiz answers.

I have noticed earlier that course short names were not allowed to be entered with a längd that would be necessary for multilang markup. But I don't know if that was something set in the HTML or in the database connection.

When working with Multilang it would be good if some text entry fields were much bigger.  Maybe making a special theme might be a good tool.

In reply to Tim Hunt

Re: Longer quiz answers

by Valentin Dumitru -

Hello Mr. Hunt,

Thank you for your quick reply. To my full shame I had no tested this before posting the question. I have seen the answer being a normal HTML input, just as with titles, and since titles are limited to 256 chars, I assumed that it is the same here.

Thank you and sorry for the stupid post.

But is there a possibility to enter also longer titles (for ressources or even the main course title)?

In reply to Valentin Dumitru

Re: Longer quiz 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

This is probably something that can be changed quite easily (it may just be as simple as changing the column type in the databass), but the quiz forum is probably not the best place to discuss it.

In reply to Tim Hunt

Re: Longer quiz answers

by Valentin Dumitru -

Hello Mr. Hunt,

I have followed your suggestion of changing the column in the database, which worked ok for the resources title, but the main course title needed a further modification, of the moodle php file "edit_form.php", and that is because the input itself was also limited to 255 characters. This is not the best solution, since on a moodle upgrade we would lose this change, but it worked for now...

Again thank you for your support, and sorry for continuing the discussion here... this ending comment wasn't really worth opening a new post...

Best Regards,

Valentin

In reply to Valentin Dumitru

Re: Longer quiz answers

by Jeff Forssell -

I appreciated hearing where the problem was and how you could solve it. I might have missed it in another thread.

It sounds like removing that limitation would be good for increasing multilang flexibility. Is there any Tracker issue I could vote for?