Perpetual Learning
  • Home
  • Case Studies
  • Blog
  • Contact

Multi-Language Support on the Open edX® Platform

5/24/2016

2 Comments

 
One of the more challenging aspects of developing a site on a global scale is enabling it to manage multiple languages. For sites based on Open edX , integrating multilingual features is certainly no easy task. To make things easier however, we’ve provided a clear step by step solution to this.

First off, there are two possible services available that can help make an Open edX site multilingual:
  1. Transifex
  2. Localizejs

Transifex: 
Officially supported by Open edX to localize  edX site,s Transifex is where all translation of the Open edX framework is currently hosted. Here’s a link to their site: www.transifex.com

Here’s how you can integrate this in your code:

Section 1: Developer Stack Configurations
Step 1: Switch to edXapp environment:
  1. sudo -H -u edxapp bash
  2. source /edx/app/edxapp/edxapp_env
  3. cd /edx/app/edxapp/edx-platform
Step 2: Configure your ~/.transifexrc file:
  1. [https://www.transifex.com]
    hostname = https://www.transifex.com
    username = user
    password = pass

    token =
  2. *Make sure the token is left blank*

Step 3:  Make sure all languages you wish to download are present and uncommented in
  • conf/locale/config.yaml.
Example: If you wish to download Arabic and Chinese (China), make sure your config.yaml file looks like this:
  • locales:
    • ar  # Arabic 
    • zh_CN  # Chinese (China)
Step 4: Configure LANGUAGE_CODE in your LMS (lms/envs/common.py). Or, for development purposes, create a dev file called dev_LANGCODE.py - eg dev_es.py - with the following:
  1. from .dev import *

    USE_I18N = True
    LANGUAGES = ( ('es-419', 'Spanish'), )
    TIME_ZONE = 'America/Guayaquil'
    LANGUAGE_CODE = 'es-419'

Step 5: Configure EDXAPP_LANGUAGE_CODE in your configuration files. Here’s an example:
  1. https://github.com/edx/configuration/blob/master/playbooks/roles/edxapp/defaults/main.yml#L246
Step 6: Execute the following command in your edx-platform directory with your edx-platform virtualenv:
  1. $ paver i18n_robot_pull
    • This command will pull reviewed translations for all languages that are listed in conf/locale/config.yaml.
    1. To only pull down some languages, edit conf/locale/config.yaml appropriately.
    2. To pull unreviewed translations along with reviewed translations, edit edx/app/edxapp/venvs/edxapp/src/i18n-tools/i18n/transifex.py
Note: When you launch your LMS instance you can launch it normally and things should display properly. However, if in Step 4 you created a special "dev_LANGUAGECODE" file, you'll need to launch the LMS with the environment file explicitly stated:
  • $ paver lms -s dev_es -p 8000
​Note: If you experience issues along the way:
  • Be sure your browser is set to prefer the language set in LANGUAGE_CODE.
  • In common/djangoapps/student/views.py the user's language code is trying to be obtained from a saved preferences file. Therefore, if you’re having issues seeing your language served up, it may be because your User object has a different language saved as a preference. Try creating a new user in your environment, this should clear up the issue.

Section 2: MultiLingual edX site

Setting the LANGUAGE_CODE enables one language as your installation's default language. You’re probably asking: “What if you want to support more than one language? To "release" a second (or third, or hundredth) language here is a list of instructions to do so:

Step 1: First, you have to configure the languages in the admin panel.

Step 2: While the LANGUAGE_CODE variable is used to determine your server's default language, in order to "release" additional languages, you have to turn them on in the dark lang config in the admin panel. Here’s an example link of where the dark lang config is located in the admin panel:
YourAwesomeDomain.com/admin/dark_lang/darklangconfig/
    


Step 3: After this, add the language codes for all additional languages you wish to “release” in a comma separated list. For example, to release French and Chinese (China), you'd add  fr, zh-cn to the dark lang config list.

Note: You don't need to add the language code for your server's default language, but it's certainly not a problem if you do.

Note: Remember that language codes with underscores and capital letters need to be converted to using dashes and lower case letters on the edX platform. For example the language code of Chinese (Taiwan) is "zh_TW" on Transifex, but "zh-tw" on the edX system.

Confusing? I know. However, the benefits definitely outweigh the initial confusion. Benefits include that you can preview languages before you release them by adding: ?lang-code=xx to the end of any url, and ?clear-lang to undo this. Here’s an example:
  • 127.0.0.1:8000/dashboard?preview-lang=fr       #French
  • 127.0.0.1:8000/dashboard?clear-lang       #Sets the site back to default language


Section 3: Full stack Configurations
For a Local Full stack installation, follow Step One and Two from the Devstack deployment section and then follow these steps:
​

Option 1: If you only need to pull translations of one language, simply execute the following command in your edx-platform directory with your edx-platform virtualenv:
  •  $ tx pull -l <lang_code>
    • ​*The <lang_code> here should be replaced by the language code on Transifex of the language you want to pull (for example, zh_CN for Chinese (China)).
Note: This option will overwrite the .po files located in conf/locale/<lang_code>/LC_MESSAGES with the contents retrieved from Transifex, so please only do this step when Transifex is newly installed or when you really want a new version of translation from Transifex.

Option 2: If you already have your own changes of edX-platform's source code in your local installation or the source files on Transifex is not up-to-date, you may need to extract strings manually. The following steps below will show you how:

Step 1: Execute the following command in your edx-platform directory with your edx-platform virtualenv:
  • $ paver i18n_extract    
    • This command will extract translatable strings into several .po files located in the conf/locale/en/LC_MESSAGES.
Step 2: After this extraction process, you can merge the newly extracted strings into the corresponding .po files located in conf/locale/<lang_code>/LC_MESSAGES (except django.po and djangojs.po, which are generated by i18n tools automatically from other .po files).

Step 3: Edit the .po file and then recompile them using: $ paver i18n_fastgenerate
Note: If you want to change the default language code of a Full Stack, you can modify the value of LANGUAGE_CODE inside lms.env.json and/or the cms.env.json located in /edx/app/edxapp before restarting your Full Stack.

Result: After completing these steps, you should see updated translations. If for some reason they don’t show up, try to restart the nginx server and/or clear your browser's cache.


Localizejs:
Localize is a promising and insanely easy-to-use service that runs on your website by executing from a one-line JavaScript snippet. This one line of code will load Localize on your site and automatically change the language based on the language preference of visitors.

How it works:
By loading Localize code onto your website, it can:
  • Identify text on your website,
  • Replace text with translations, when available,
  • Adapt the text for pluralization and variables,
  • Order translations for unrecognized content,
  • Help you go global!
The Localize library translates the phrases on your pages and sends unrecognized phrases to the Localize dashboard for later translation. On the Localize dashboard, you can:
  • View content and translations
  • Add or remove languages
  • Translate content
  • Order translations (machine or human)
Steps for using localizejs:
Integrating localizejs is a very straightforward process:

Step 1: Create a project account on localizejs.com. As a result, a localized code snippet with project id is generated.

Step 2: Add this code snippet to the header file of the website.
   for eg:  1) main.html
               2) django_main.html

Results: After reloading the page, a toggle menu bar will appear on the page with languages ts hat you selected in your localizejs account. This enables users to select a language of his/her choice. And as soon as they do this, bingo, the language on all pages that have the snippet is changed based on the user’s choice.

Afterthoughts:
Following the successful installation of either of the two services, the sheer number of languages provided makes the whole process worth it. From Arabic to Swahili, both of these solutions provide an astounding 93 languages in total. When you’re trying to attract customers from around the world, comprehensibility plays a critical role in this. By integrating multiple languages on an edX site, not only is it a huge step towards fixing localization issues, but you’re developing a higher standard of consideration towards your visitors.
​

Reference: https://github.com/edx/edx-platform/wiki/Internationalization-and-localization

2 Comments

A Richer Discussion Experience in Open edX

5/5/2016

4 Comments

 
For some institutions interested in using Open edX, student discussions may be an afterthought, while others find it quite important to use discussions for peer learning. The default discussion feature offered by Open edX brings a decent out-of-the-box solution for facilitating interaction between students. However, to get a more robust, cross-course discussion experience it may be worth considering a third-party app integration.

A client recently approached us with a need for creating an edX environment that was largely influenced by peer and social learning. Their requirements for social features included the following:

​Student
  1. Cross-Course Discusions: Ability for students to have one destination to access discussions for multiple courses. 
  2. User Groups: Ability for students to be a part of multiple assigned educational groups. 
  3. Private Discussions: Ability for students to create there own groups with classmates of their choosing. 
  4. Private Messaging: Ability for students to message other students/ instructors in the system privately. 
  5. Multi-Format File uploads: Ability for students to upload files to discussions in a variety of formats. 
  6. Student Directory: Ability for students to be able to access a directory of all students in the system/ see what groups they belong to. 
  7. Advanced Student Profiles: Ability for students to add video/ other multimedia to their profile page. 
  8. Restricted Login/ Signup: Ability to restrict signup/ login to users who have a specific email domain.   
  9. Widget Dashboard: Ability to use discussion data to drive a widget dashboard that would display content such as Top Groups, Discussions, Teacher Announcements, etc. 

Instructor
  1. Create and Assign Groups: Ability for an instructor to create groups and assign students to them.
  2. View/ Manage All Groups: Ability to see all groups and edit/ add/ delete members. 
  3. Moderate posts: Ability to manage posts based whether promoting positive posts or flagging/ deleted negative posts. 
  4. Rate Student posts: Ability for an instructor to rate a students post/ provide feedback on their post. 
  5. Private Messaging: Ability for an instructor to be able to message students. 
  6. Widget Dashboard Management: Ability for an instructor to manage widget dashboard/ post content to dashboard. 

Examining the required feature set revealed that the current default Open edX Discussions solution did not cover a lot of what the client was looking for. Using cohorts and groups along with some platform customizations could be a viable solution. However, our client required minimal to no platform customizations in order to make future upgrades as seamless as possible. This is pretty common as the further you deviate the platform from it’s original state, the harder it becomes to upgrade. This means that you’ll eventually be losing out on new free features that edX rolls out.   

It became apparent that a third party tool would best suit our clients needs.

There are many tools available that would integrate well with edx for richer discussions. The ones we evaluated included:


  1. Google Groups
  2. Discourse
  3. DjangoBB
  4. Misago (another Django Forum)
  5. Machina
  6. Slack

We did a feature analysis, posted below for your review.
Student Feature Default Open edX Google Groups Discourse DjangoBB Misago Machina Slack
Cross-Course Discussions No Yes Yes Yes Yes Yes Yes
User Groups Using Cohorts Yes Yes No Yes No Yes
Private Discussions No Yes Yes No Yes No Yes
Private Messaging No Through Gmail Yes w/ Plugin Yes Yes No Yes
Multi-Format File Uploads No Yes Yes Yes Yes No Yes
Student Directory No Not Cross Group Yes Yes Yes No No
Advanced Student Profiles No No Yes No No No No
Restricted Login/ Signup No Yes No No No No No
Widget Dashboard No Yes Yes No No No Ywa
Instructor Feature Default Open edX Google Groups Discourse DjangoBB Misago Machina Slack
Create and Assign Groups Yes Yes Yes No Yes No Yes
View/ Manage All Groups Yes Yes Yes Yes (No Groups) Yes Yes (No Groups) Yes
Moderate Posts Yes Yes Yes Yes Yes Yes Yes
Rate Student posts No No Yes No No Yes Yes
Private Messaging No Via Gmail Yes Yes Yes No Yes
Who would we go with?

While a Slack + Open edX integration sounded super exciting and something we want to pursue in the near future, after carefully considering all of these options, we decided to go with Discourse for a few different reasons:
  1. Feature richness: Discourse has many features that were required by our client. Just a few include Post Metrics, Groups, SSO, Multiple file attachment formats, and many more.
  2. Open source: Like Open edX, Discourse is completely open source which means it’s completely free and can be edited/adapted as needed. It's built in Ruby on Rails, the same technology stack as the current Open edX discussions solution.
  3. Active Community: The open source community that revolves around discourse is extremely active with releases coming every couple of weeks and sometimes as often as every few days. See their github here: (https://github.com/discourse/discourse).
  4. API: Discourse comes with a comprehensive API which allows it to seamlessly integrate with Open edX. This was helpful in this particular case because it allowed for data to easily be picked up for the required dashboard.

Prototype
​

Click on the prototype below which imagines discussions heavily integrated into Open edX using Discourse, based on our clients' needs.
Picture
Direct link: https://invis.io/8977DPZBE#/145697268_DashBoard
4 Comments

Open edX Dogwood: New Features & Highlights 

5/3/2016

0 Comments

 
​Open edX is an open source course management system that is used to author and deliver online courses. Two kinds of courses, MOOC (massive open online courses) and SPOC (small private online courses) can be created. The fourth Open edX release, Dogwood, brings a host of features with several enhancements.
edX rolls out stable tested releases inclusive of upgrade instructions every 4-6 months. Released on February 11, 2016, Dogwood has a host of new features to empower course makers with new and efficient tools. Fun fact: Dogwood happens to be named after a tree like prior Open edX releases (Aspen, Birch, Cypress and the upcoming Eucalyptus release)
“Students learn much better when they are interacting with the material. Self-pacing can be very helpful for learning. Another idea is instant feedback. We applied gamification ideas to learning.”
-  Excerpts from a TED talk by Anant Agarwal, CEO, edX.
A significant change in the Dogwood Release is an upgrade to Python from 2.7.3 to 2.7.10. The Django framework has also been upgraded from 1.4 to 1.8.7.
 
Here's a summary of some of our favorite new features:
 
Mobile App Features: The key, critical additions are new mobile app features.the improvements are a big step forward in a mobile first world. To preview mobile behavior,  log in to edX.org running on Dogwood, browse courses registered for, attempt assessments, view videos, handouts and announcements. You can practically use most common features in mobile that the desktop website allows you to do. More advanced features like drag-and-drop are not yet available on mobile, basic assessments are available on the mobile app. On a more technical note, xBlocks, the extensible framework used to develop advanced learning units, do not yet have mobile support built in. Mobile support needed to be developed by the implementer of the feature, making mobile support for all learning units even more complicated.
 
E-commerce Service: There is a more comprehensive e-commerce service, Otto, now available, beyond the basic shopping cart and cybersource implementation available earlier. A Django application, the e-commerce service will manage product catalog orders. Adding ECommerce to your Open edX install can be achived using a Course Administration Tool (CAT, a web app) and a Django administration site. CAT is part of the ECommerce service, it enables you to manage and configure course-related products as part of your edX learning management system .
 
Partial Credit: Earlier edX versions evaluated the assessment answers to be either right or wrong. In Dogwood, you can award a minimum of 0.25  points to the learner. This occurs when the learner chooses the second-most likely answer out of the provided four options.
 
LTI XBlock: The new LTI XBlock edition will replace the LTI XModule. Apart from existing module features, users can configure learning tools interoperability (LTI). There are a few options to render content: embedded in a course page, in a modal window or in a separate web browser window. Remote learning tools like textbooks and applications can also be integrated into your course, thanks to LTI components. Embedding a variety of third-party tools and plug-ins is now easier, thanks to LTI. 
 
More LTI uses:
  1. Remote LTI tools can be used for content display only. These do not require a learner response.
  2. The same remote LTI tools can aid in stages that require a learner's response.
  3. The LTI component can also act as a placeholder for remote grading system synchronization.
 
Specific Student View: An instructor can preview how a particular course looks to any particular student by just typing in their email id or user name. This is a useful addition for troubleshooting and grading.
 
Certifications: Dogwood allows you to create HTML web certificates. You can fill in the details, preview the design and take a print out, giving youmore flexibility on how students canview their certificate. It also allows you to purchase a verified certificate (proof that you took the course) and verify student identity..        
 
Instructor Dashboard: Dogwood provides a more dynamic application, for example - allowing viewing of invoices of all students taking the course. The dashboard is now loaded with a great set of tools giving  the instructor  an all-round view of the set up. This includes course info, analytics, student admin, certificates, enrollment codes and course seat purchases.
 
Student Notes: A nice handy new feature, allowing students to take down notes, highlight text, tag the selected text, edit or delete them. A 'Notes' tab allows you to search through your collected notes and find the one you want.  
 
Bulk Enrollment: In cases where employees from an entire organization have to avail a course, Dogwood has eased the initiation process. It allows learners to access the courses through bulk enrollment codes and unique URLs. Any paid course can be set up in the back end, with a simple interface allowing you to either edit or create a brand new course altogether. The course name, course type, course price, course upgrade deadline and certificate deadline can all be selected with ease.
 
Paid Courses: Reviewing paid courses is a lot more easier now. A simple drop-down allows you access to user and product analytics, among other things. The entire set up is on an open source e-commerce framework, called Oscar.      
 
edX Insights: A feature that has been around for a while, this analytics edX section is now easier to run. Testing a course, evaluating its effectiveness are just a part of it. Sharing student data, their course assignment details, daily course enrollment, active students percentage, video-watching percentage are all filtered down to the minutest details (how many videos were watched end-to-end, etc), helping edX administrators and course authors gather a 360 degree comprehensive data view of the course.      
 
'Search' is now default: The search feature is now default in Dogwood. It allows you to search all your courses in your course catalog, with an advanced search option allowing search with regard to course language, type (example: Video with transcript), etc.
 
Summary

Besides the features above, learners with Facebook or Google accounts can enroll into courses more easily, with social login being made easier to integrate. Features like 'Wiki Notifications', 'Studio Checklist', 'Legacy Instructor Dashboard' and 'Shoppingcart' are set to be removed in the next version release, presently deprecated in Dogwood. Several improvements to aid readability and navigability have been made. Learn more about Dogwood features here.   
    ​
0 Comments

    Author

    Danielle Chan

    Archives

    June 2017
    March 2017
    August 2016
    June 2016
    May 2016
    April 2016
    February 2016
    January 2016
    December 2015
    September 2015
    August 2015
    July 2015
    June 2015
    May 2015
    April 2015

    RSS Feed

    Categories

    All
    Open EdX® Help
    XBlock

​
edX and Open edX are registered trademarks of edX Inc. All Rights Reserved.

© 2022  | Perpetual Learning  |  info@perpetualny.com  |  134 W 29th St, 607, New York, NY 10001