Should we allow UI language to be forced for activities, as well as courses?

Should we allow UI language to be forced for activities, as well as courses?

by Tim Hunt -
Number of replies: 26
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

At the moment in Moodle, you can force the UI language at course level:

The question is: would it be useful if we also had this feature at activity level as well?

If we did it, I assume we would add the option in the 'Common module settings' part of the activity settings form:

Having had a quick look at the code, I don't think this is particularly technically difficult to make work. I think the only question is: should we do this? What do you think?

Average of ratings: Useful (5)
In reply to Tim Hunt

Re: Should we allow UI language to be forced for activities, as well as courses?

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
I really like the idea of forcing a language for activities. (My head is busy now trying to think of use cases that I can demonstrate with once you've done it!)
In reply to Tim Hunt

Re: Should we allow UI language to be forced for activities, as well as courses?

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
My worry is that it is yet another setting in the already long list of activity settings. The language can be forced on the course level.
Average of ratings: Useful (2)
In reply to koen roggemans

Re: Should we allow UI language to be forced for activities, as well as courses?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
That is certainly the worry, and that I why I asked the quetion here, rather than just rushing ahead to write the code.
In reply to Tim Hunt

Re: Should we allow UI language to be forced for activities, as well as courses?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Isn't this almost the same as what https://moodle.org/plugins/availability_language does?
In reply to Visvanath Ratnaweera

Re: Should we allow UI language to be forced for activities, as well as courses?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

I don't think so.

Availability_language is about showing different things to different sudents, based on their preferred (currently selected) language.

What we are talking about is ensuring that all students see a particular activity with the Moodle UI in a particular language, in the same way that forcing the course language means the all students see the entire course in that language.

The context for this is obviously Language teaching, and this feature is probably most relevant at intermediate ability levels. Once your students are proficient in the language they are learning, you probably want to force the language for the entire course into the one you are teaching. And, at beginner levels, you don't want to do this at all. Students will have enough trouble reading the teaching content without having to grapple with everything being in another language.

But, at intermediate levels, you might want a mixture. I am proposing this becuase the language teachers at the Ou want the ability to have most of a French or German course taught in English, but then when students get to the final exam, they would like that entire experience to be in French or German, or whatever. It could also work really well with a 'Practice your French' forum in a course, where you could make the experience more immersive by having the UI of that forum in French too.

Average of ratings: Useful (5)
In reply to Tim Hunt

Re: Should we allow UI language to be forced for activities, as well as courses?

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Well yes, actually Tim's example is exactly the example I first thought of when I read this suggestion.
In reply to Mary Cooch

Re: Should we allow UI language to be forced for activities, as well as courses?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I just thought of the opposite scenario too.

Suppose you are teaching French to a group of English speakers, and suppose you have forced the course language to French. Perhaps, as a safety net, you might want to add a forum called "Help! I'm stuck! Please just let me ask a question in English" to the course, with the language there set to English?
Average of ratings: Useful (3)
In reply to Tim Hunt

Re: Should we allow UI language to be forced for activities, as well as courses?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
What I learned from my indic group is that the selected language of a page and what you type have no connection! The candidates don't know or care what the selected language is, they need both languages at the same time. Examples of their preferred format are attached.

The explanation is that they don't know the technical terms in their language, use English instead. But 100% English is also not OK. Therefore the mix.

Attachment mixlanguage1.png
Attachment mixlanguage2.png
In reply to Tim Hunt

Re: Should we allow UI language to be forced for activities, as well as courses?

by Randy Thornton -
Picture of Documentation writers
I think this would be very valuable.

Not only would this be very valuable for the two language learning situations above, but for real life complex language situations too. A few years ago I worked on a site where there were two writing systems for a language (its own and a common romanization). Some students were not yet literate in both (and sometimes neither) but they were in English or French. Having courses all in one language did not work. It took a huge amount labor to build all multi-lang features and even then it was hard to use and maintain. In that case, language specific activities would have been very valuable.

I respectfully must disagree with the view on this about adding another setting. The default will be sensible inheritance: for those who do not use it, then ignore it as they do now with the course level languages. Or add a simple admin setting to globally enable/disable this would be a good compromise if you really think it will be a burden (which is not an option for course level languages now.)

As Visvanath points out with another example below, real life multi-language use and learning can be pretty complex. It would be good to have more flexibility in Moodle to help that along.
Average of ratings: Useful (1)
In reply to Randy Thornton

Re: Should we allow UI language to be forced for activities, as well as courses?

by Séverin Terrier -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Hi Randy,

I think that, for this option, like for others, there should be a global setting tha Admin can enable/disable. This way, it can be totally disabled if not used, to show a cleaner interface, with less options.

And if activated, display this in activities only if activated in course settings.

A really think this should be the way to handle most settings, to be consistent in the way Moodle do things.

Séverin
Average of ratings: Useful (1)
In reply to Séverin Terrier

Re: Should we allow UI language to be forced for activities, as well as courses?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Note that, in effect, there is already a way for admins to control who can see this feature.

There is a capability moodle/course:setforcedlanguage, which, by default is given to Editing teacher and Manager - and obviously admin has it too.

So, if you don't want your teachers to see this setting, just remove that permission. I will invoke the "don't add too many settings" principle, to justify that: since this way of disabling the features exists, we should not make another way to disable it; and also, my suggestion is to use the same capability to control both course-level language forcing, and activity-level. No need for a new capability.
Average of ratings: Useful (3)
In reply to Tim Hunt

Re: Should we allow UI language to be forced for activities, as well as courses?

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
I didn't think of removing the capability. And you are right about not making another way to disable it: no extra switches to switch of the switches smile
Narrowing down the feature set of Moodle is not an easy route, but it is doable.
I take my previous comment about the extra setting in the long list of settings back wink.
In reply to koen roggemans

Re: Should we allow UI language to be forced for activities, as well as courses?

by Randy Thornton -
Picture of Documentation writers
Tim and Koen,

I have to admit I did not know this permission existed. But now that I do, I will use it smileIf this proposed feature uses the same capability, problem solved.

Though it could also be a new one as well which I think is a good approach, since if you don't, someone somewhere will have a scenario where they want to enable/disable one of them but not the other.

I have never had anyone complain about the presence of the forced language setting in the course settings. I have had a couple people switch it to a language they did not know, as an experiment, and then get stuck there and not know how to switch it back ;)
In reply to Tim Hunt

Re: Should we allow UI language to be forced for activities, as well as courses?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
True. They do two different things. With the proposed feature the teacher can lock certain activities to one language and keep the language of other activities in the same course open for the student to choose.

I work in different multilingual environments, European and Indic - technical things, no language teaching though. For me the present multi-language capabilities of Moodle are more than sufficient. The limitations are at the receiving end.

My view of language teaching as a layman is that, teaching a language in the target language is the best. If the participants are not yet up to that level, one has to mix with their native languages. What I don't believe is that a single course will take a participant across that barrier mid-course. It is the next course which could be mono-lingual, in the best case.
wink

Anyway the new proposal doesn't break the old system. The added complexity (Koen mentioned) is OK with me. I can't speak for others.

In reply to Tim Hunt

Re: Should we allow UI language to be forced for activities, as well as courses?

by Ralf Hilgenstock -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Translators
I needed some time to understand the odra and the pedagogical options
For me it should be a general feature for all activities and not exclusive in quiz.
Similar argumentation is possible for forum, chat, assignment ans glossaries or lessons.
Average of ratings: Useful (2)
In reply to Ralf Hilgenstock

Re: Should we allow UI language to be forced for activities, as well as courses?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I agree.

Perhaps this was so obvious in my head that I forgot to express it clearly in my forum post.

Oh, and I was bored yesterday afternoon, so I made a tracker issue and had a go at writing the required code: See MDL-74608 if you are interested.
In reply to Tim Hunt

Re: Should we allow UI language to be forced for activities, as well as courses?

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

This touches on one of the multi-language issue (there are a few) which is handling of multiple languages from an accessibility point of view.

The language of each page is identified at a global level by way of a lang attribute at the very top of the HTML for each page. However, when an English site lists courses or activity in other languages, there is no HTML with a lang attribute to identify it as being in a different language than the UI's. In most cases, Moodle won't even let you wrap it in the required HTML. The result is that screen readers have trouble reading the text and the user to understand what the screen reader is trying to say.

I agre with you Tim and can see valid cases for French courses listed in an English course listing or a French activity in an otherwise English course.

Moodle should add appropriate lang attributes around any field that might not match the current UI language. The workaround so far has been to wrap things like course names, in other languages, in FilterCodes plain text {langx} tags.

It would also be important to indicate somehow that a link will switch UI language should the user choose to follow it. Something simple like the language name should be sufficient.

Example:

Google (French)

If the user does not understand the forthcoming language, they can simply not click the link -  instead of ending up on a page that they cannot read or understand.

Let me know if you have any questions. Hope you find this helpful.

Best regards,

Michael Milette

Average of ratings: Useful (1)
In reply to Michael Milette

Re: Should we allow UI language to be forced for activities, as well as courses?

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

I didn't get your point with the example https://google.fr/. This is what I get:


Browser Firefox. This was its language setting:

Your comment on "a global level by way of a lang attribute at the very top of the HTML" is interesting. Any connection with why Atto generates tons of tags <span lang="SI-LK"> tags? I am wasting so much time cleaning them.
In reply to Visvanath Ratnaweera

Re: Should we allow UI language to be forced for activities, as well as courses?

by Michael Milette -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Visvanath,

I suspect that Google may have set a cookie or something. Normally google.fr takes you to the French version of google.com.

I get a lot of other span tags, mostly specifying the font size for no reason. But I have yet to see Moodle generate so many language tags. Are you doing this in 4.0 by chance?

Try to make sure that your Moodle language UI is the same as the content you are typing, and also the language of your keyboard. It would drive me crazy too if I had to constantly clean those up all the time.

If all is in sync to the correct language, the next thing I might suspect is that you are copying content from a Word (or something similar) document and pasting it into Moodle. If that is the case, those span lang tags may be coming from there.

Word supports multiple languages within one document so it makes sense that it might tag some of the text when converting to HTML during paste. You can verify this by selecting all of the text in your document and setting the language.

Let me know if any of this is helpful.

Best regards,

Michael
In reply to Michael Milette

Re: Should we allow UI language to be forced for activities, as well as courses?

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

> I suspect that Google may have set a cookie or something. Normally google.fr takes you to the French version of google.com.

I have many browsers in my laptop, but every browser has seen something Google, unfortunately. Just now I installed Microsoft Edge weekly (microsoft-edge-beta) afresh, and this is what I get:


Looks like Google detects many things.
sad

> I get a lot of other span tags, mostly specifying the font size for no reason.

Me too. Time for another rant somewhere. Will check in another forum.

> But I have yet to see Moodle generate so many language tags. Are you doing this in 4.0 by chance?

No I am on Moodle 3.9.

> Try to make sure that your Moodle language UI is the same as the content you are typing, and also the language of your keyboard.

True, I sometimes copy between two browser windows displaying Moodle, the selected languages being different. Will keep an eye.

> you are copying content from a Word (or something similar) document

Definitely not MS Word, my desktop is Debian GNU/Linux, also not LibreOffice or any other WYSIWYG program, since I don't use them. On rare occasions I get text copied from PDFs though. I get much more si-LK attributes for that. Will keep my eyes open.


In reply to Tim Hunt

Re: Should we allow UI language to be forced for activities, as well as courses?

by Sander Bangma -
It's an interesting idea Tim. And having read the discussion I see we have thought of at least one good use case.
Usually though, I'd prefer us to have the use case (the need or problem that we're solving) identified first...and then the solution. Because that highlights there is a real need.

I'm not saying I'm against this proposal, but perhaps there are other ways the use case should be tackled. E.g. the idea of multiple languages in one course that Visvanath raised.
In reply to Sander Bangma

Re: Should we allow UI language to be forced for activities, as well as courses?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
For me, the use case certainly came first: OU Languages academics (who are are already using the feature we built them to force the language for individual questions embedded in learning material using https://moodle.org/plugins/filter_embedquestion) came to the product owner I work with (Chris) and me, and said "please can we have this for quizzes too, becuase ...".

I may not have expressed that here, becuase I only started posting here after I had taken an initial look to ensure that what they wanted was technically feasible. So, my posting here may have started in the middle.

Thanks for everyone who has expressed an opinion so far. It is has been interesting reading. Please carry on smile
Average of ratings: Useful (1)
In reply to Sander Bangma

Re: Should we allow UI language to be forced for activities, as well as courses?

by Ralf Hilgenstock -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Translators
Hi Sander,

here is an interesting use case.
Teachers are often free to define how they teach a class. Often the institution defines conditions for graded activities/exams.
Often this means the exam are made under the same condition for everyone.

With this new tool a teacher can create multiple language courses or show the Moodle language elements in the preferred language of the student. But for assignments or quizzes s/he can fix the interface language.
In reply to Sander Bangma

Re: Should we allow UI language to be forced for activities, as well as courses?

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Re-reading the thread I'm not sure whether my examples are directly related to the original question. Since there seems to be an interest in examples from the practice, I'll describe the two completely opposite types of sites I maintain.

The first type is in Central Europe. Technically they have any combination of the four language packs, German, French, Italian and English, installed. The Default language (lang) is the first language, say German. Language autodetect (autolang) is set, the Display language menu (langmenu) too. The server OS need to have all these locales. On top of that a language filter, say https://moodle.org/plugins/filter_multilang2, is installed.

From the teachers' view, they simply enter content in the medium of instructions. They don't worry about the selected language. The students are young adults, they know the connection between the browser's language settings and the language selected from the drop-down menu in Moodle. The course contents are essentially monolingual. I am yet to find a clean multilingual course which makes use of the language filter. Other additions like https://moodle.org/plugins/availability_language not needed.

So plain and simple multi-language sites following in https://docs.moodle.org/en/Language_settings. All are happy.
smile

The second type is less satisfactory. The sites are for Southeast Asia where the local languages are Indic. As I wrote earlier, "they don't know the technical terms in their language, use English instead. But 100% English is also not OK." https://moodle.org/mod/forum/discuss.php?d=434039#p1746572. They wish to see both languages on every page! They don't even expect a language switch! Many are surprised that one can type in the own alphabet. Unicode is a new challenge, since the Windows world is used to enter "fonts".
sad

From a teachers' view not only the courses are ugly, embedded images have to be repeated, not to mention multimedia. I'm struggling to take them towards the above model, but it's a long tunnel.

In reply to Visvanath Ratnaweera

Re: Should we allow UI language to be forced for activities, as well as courses?

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I have continued to work on MDL-74608 in amongst other tasks, and therefore, before sending the code to integration, I thougth I should come back here and summarise the balanced of people's opinions.

I think I count 6 people who were ultimately in favour of this: Ralf, Mary, Koen, Visvanath, Randy and Michael, especially once it was understood that the existing capability moodle/course:setforcedlanguage already exists, can be used to hide this more advanced feature.

[In relation to that, my favourite sentence in this entire thread is Koen's "And you are right about not making another way to disable it: no extra switches to switch of the switches smile"]

I don't think Séverin expressed an opinon either for or againse the feature itself, but was in favour of having a way for admins to configure it if it was done.

And Sander did not express an opinion, but just reminded us to start with a real need (use case) before suring to solutionise, which is always an appropriate reminder.

I don't see anyone being aginst it (providing it can be hidden). Of course, that is in this self-selected group of Moodle super-users.

Still, based on this summary of opinions (which I hope is fair), I have no hesitation in trying to send this to integration. Thank you to everyone who commented.
Average of ratings: Useful (4)
In reply to Sander Bangma

Re: Should we allow UI language to be forced for activities, as well as courses?

by Enrique Castro -
Picture of Core developers Picture of Particularly helpful Moodlers
Hi Sander: we at ULPGC has one activity hacked to get this precise behaviour. I think Tim's suggestion is a very good one that with a single option more gets a lot of flexibility.

Our use case is mod_tracker. We use this activity to collect input form users (students, teachers). For instance students need to make a Proposal for a master thesis, the proposal should be reviewed by a board (some teachers) and approved or rejected. Or teachers need to submit Reports about performance, and Deans need to collect them. We use the same module for both (and more) cases.

Calling everything an "Issue" may be an issue. People is more confortable submiting Reports or Informs, or Proposals or Applications. We do use the mod_tracker as a "bug report" application in other contexts. And responses to those submissions, Accept/Reject, many times require more sensible words for each case.

We ended hacking mod_tracker to allow custom language packs used in a per instance basis. You may have three instances in the same course, for different purposes, each with a subtly different language in use.

I see the same need even for such regular activities as Assignments or Quizzes. The lang strings in the module interface perhaps need to talk about "Examination", not a Quiz. Or the quiz is used as a glorifies Survey. We can set the name of the activity but it is often much, very much clears for users if lang strings may adapt to such specialized cases.

Having this option, and Admin can setup a number or custom lang packs quite easily, without really touching moodle code. The extra option complexity is cheap for the possible uses.