downloading folders from google drive.

I wanted to download some course material on RL shared by the author via Google drive using the command line.  I got a bunch of stuff using wget a folder in google drive was a challenge. I looked it up in SO which gave me a hint but no solution. I installed gdown using pip and then used: gdown --folder --continue if there are more than 50 files you need to use --remaining-ok and only get the first 50. In such a case its best to download using the folder using the UI and decompress locally. Decompressing from the command line created errors related to unicode but using the mac UI I decompressed without a glitch.

Fixing Multi language support in Moodle

Deutsch: Logo der freien Software Moodle moddl...

Last week I was asked by +Charles Matthews to review WM.UK upcoming Wikipedia tutoring system being developed on on the open source Moodle system.

I've been thinking of different option to better support Wikipedia coaching in different languages  I have been reviewing and testing Moodle in the last few weeks to that end.

I'm really interested in developing course ware for both English and Hebrew editions (as a start).

Multilingual content

While Moddle is internationalized, support of multilingual content requires using a somewhat clumsy technique. One need to use html and store different languages content in top level div elements. Then you have to switch on Moodle's multilingual filter which can hide all the language version which are incompatible with the language selector's settings.

However due to a bug the the html editor mangles the html code and mangles the top level <span> element required.
 <span lang="XX" class="multilang">your_content_here</span>
 <span lang="YY" class="multilang">your_content_in_other_language_here</span>

Luckily I found a patch in the forum - but it did not work. However it got me started hacking the filter and I was soon able to get it to work with more and more elements.

I thought I'd share the bug fix online in case someone is stuck with this. Once I figure how I'll send a patch to the Moodle dev team.

the fix is as follows - search and replace span with div
then replace in line 57 with:

this just tells the filter to also consider some extra attributes that certain Moodle module  (e.g. wiki) place into divs such as xml:lang="XX"

the change is that you need to use <div> elements as your top level tags:

<div lang="en" class="multilang">your English content here</div>
<div lang="he" class="multilang">your Hebrew content here</div>

Remaining Tasks

One things is still unclear - how to specify title translation. While the filter's documentation states this is supported and it comes up in different places in the U.I. it is unclear how this can be done - if it is even supported at all.

See also


Enhanced by Zemanta


Popular posts from this blog

Moodle <=< Mediawiki SUL integration - first thoughts

downloading folders from google drive.

AWS CloudFormation Pros and Cons