Increasing the character limit of course section name

Increasing the character limit of course section name

by Robert G -
Number of replies: 13

I have a course that has been translated to 5 languages and that I will be using it with the multilanguage filter. I will need to display each of the section names in the correct language. Unfortunately, after using the <span> multilanguage tags I'm only able to fit 3 of the languages into the section name box. Can the character limit be increased?

I haven't even started doing the quizzes yet, do the answer boxes also have a character limit?

 

Here's an example of the code I have to put into the section name box:

 

<span lang="en" class="multilang">Module 1: The Basics</span><span lang="es" class="multilang">Módulo 1: Principios básicos</span><span lang="zh_cn" class="multilang">模块 1: 基础知识</span><span lang="zh_tw" class="multilang">模組 1: 基礎知識</span>

Average of ratings: -
In reply to Robert G

Re: Increasing the character limit of course section name

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

What version of Moodle please?

In reply to Gareth J Barnard

Re: Increasing the character limit of course section name

by Robert G -

I am on Moodle 2.6.

In reply to Robert G

Re: Increasing the character limit of course section name

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

You will need to edit core code and the database.  And repeat the exercise every time you upgrade.  Also, I'm not sure if this will break course backups / restore.  Use at your OWN risk.

Edit '/course/editsection_form.php' and increase the value shown to the same value that you will edit the value of the stored attribute in the database.

Please see attached.

 

Attachment 2014-02-05 20_28_07-F__moodledev_moodle26_moodle_course_editsection_form.php - Notepad++.png
Average of ratings: Useful (1)
In reply to Gareth J Barnard

Re: Increasing the character limit of course section name

by Robert G -

Thanks for your reply, I was afraid It might come down to something like that. I'll share this with my IT folks and see if they'll even allow it.

In reply to Robert G

Re: Increasing the character limit of course section name

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Thinking about it, this is a pedagogical reason to justify a technical improvement in core for easy multiple language support.  Need to see if there is a tracker for it when I get a moment.  If not, raise one.

A question or two though.  Even though the section name changes, what do you do with the content?  How is that multiple language for the activities / resources you create in the course?

In reply to Gareth J Barnard

Re: Increasing the character limit of course section name

by Robert G -

The way we link content is a little different. We typical don't add it as an activity, we will usually use the Course File Area repository to store these files and then just hyperlink to them in each of the modules summaries. That allows us to translate the content to each of the different languages and only allow the student to see the links/activities for their language.

We've also had success translating everything in one quiz to two different languages using the multilang tag, but will probably run into the character limit issue if we would like to do more languages.

See the two screenshots below for an example of what the course admin sees in english and then spanish.

Attachment Screen Shot 2014-02-06 at 1.26.47 PM.png
Attachment Screen Shot 2014-02-06 at 1.28.11 PM.png
Average of ratings: Useful (1)
In reply to Robert G

Re: Increasing the character limit of course section name

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Interesting, thanks Robert.  How do you restrict the links to the course file area by language?

In reply to Gareth J Barnard

Re: Increasing the character limit of course section name

by Robert G -

Here's a shortened version of what the HTML might look like, we don't necessarily restrict access to the other languages, we just link to the one the user should see depending on their language. The Course File Repository does a good job at letting us see the entire url for our files, while at the same time restricting access to them if you're not enrolled in the course.

If you look at the hyperlinks in the two different span tags you will see we just point to two different files.

<span lang="en" class="multilang">
<p>This color theory course is divided into six modules. Each module is accompanied by a short quiz which will test you on the knowledge presented. Have fun and good luck.</p>

<p><strong>Before you begin, take a moment to print a copy of the course workbook. This document contains key points and will serve as a companion as you work through the course. Use it to help you track your progress and to jot down notes. (PDF format).</strong></p>

<a href="/repository/coursefilearea/file.php/15/ColorTheory_Workbook_1.0_112911.pdf" target="_blank">
<img src="/pdf.png"> Class Workbook (PDF Document)</a>
</span>

<span lang="es" class="multilang">
<p>Este curso de teoría del color se divide en seis módulos. Cada módulo va acompañado de un breve cuestionario que le pondrán a prueba los conocimientos presentados. ¡Diviértase y buena suerte!</p>

<p><strong>Antes de comenzar, dedique unos instantes para imprimir una copia del libro del curso. Este documento contiene los puntos clave y servirá como un complemento mientras se trabaja en el curso. Utilícelo para ayudarle a realizar un seguimiento de su progreso y para tomar notas. (Formato PDF).</strong></p>

<a href="/repository/coursefilearea/file.php/15//NoCWorkbook_09JAN13_ES.pdf" target="_blank">
<img src="/pdf.png"> Cuaderno de clase (Documento PDF)</a>
</span>

Average of ratings: Useful (1)
In reply to Robert G

Re: Increasing the character limit of course section name

by Robert G -

Eventually it will be important for us to support 9 different languages on our site. I hope the multi-language support will continue to improve so we can translate everything including headings and other short fields.

In reply to Robert G

Re: Increasing the character limit of course section name

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Thank you Robert.

Thinking out aloud as course formats have control and possible ability to manipulate the listing of the activities / resources and there is a function 'current_language()' that returns the language code, like 'en', 'en_ar', 'es' etc.  Would it be acceptable that the construction of a course could be undertaken in the current language and to construct the other languages you had to change language?  In that when editing you would only see the activities / resources for that language, even though other languages would have activities / resources too.  And that the format would filter and only display content based on the current language.

Conceptually it would be possible with to do this with the result of 'current_language()' for the activities / resources but not with the section name / summary.

From a user point of view, would this means of manipulation, creation and use be acceptable?  I'm by no means committing myself to anything, just exploring ideas.

In reply to Gareth J Barnard

Re: Increasing the character limit of course section name

by Robert G -

Hi Gareth,

I understand and would not expect you to commit to anything. I think what you're explaining might be acceptable, but it may not be the easiest to work with. As someone who only speaks English, it might be hard to edit and add content when in Chinese. I could probably remember which buttons to click, but not sure if it would be easy.

I'm not sure how the majority of Moodlers are doing it, but for me the biggest thing would be to allow more characters in all text fields. I just tried multilanguages in a quiz as well and some of those answer blanks only allow 255 characters as well.

I'm honestly not sure what the best way to handle activities would be. Maybe when adding one, select which languages it would show up for (if even possible)?

I do appreciate your interest in this though!

In reply to Robert G

Re: Increasing the character limit of course section name

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Thank you Robert, so in essence a solution where language filtered content for students but for teachers / editing teachers showed all.

Also, the course format can determine the how section name and summary are rendered, so does not have to come from the core database, but a separate table for the format.

In reply to Gareth J Barnard

Re: Increasing the character limit of course section name

by Robert G -

I think something like that would perhaps work nicely.

Also my IT teams doesn't like to touch the current tables in case something does break when we upgrade our site in the future. So if a new update with a separate table was introduced in the future that would be great. Thanks!

Average of ratings: Useful (1)