Skip to content

KeNopphon/edx-txt_mod_tool

Repository files navigation

Text Modification Tool for edX Online course
A new open edX Content Modification Tool for text replacement, which is developed to automatically replace English text with translated text of Online edX course. Tool extracts course structure from exported edX course and to excel file. Then the English text is replaced by translated text which is noted in the excel file by the user.

Python package dependenies

  • lxml, xlrd, xlwt, beautifulsoup4

Workspace folder

  • 2 python scripts
    course_struc_extract.py --> this script generates an excel file ‘conversion table’
    text_replacement.py --> this script replaces target text components to exported course
  • 4 folders
    ‘course’ folder --> Unzip an exported edX course and move into this directory
    ‘original_course’ --> copy 'course' folder and place it in this directory
    ‘source’ folder --> Move all translated texts (HTML files) to this directories
    'Example' folder --> contain an ‘conversion table’ example files (both before and after filled up contents)

How to run

  • Run a python script ‘course_struc_extract.py’ --> excel file ‘conversion_table.xlm’ will be created
  • Open the conversion_table --> manually add the path location of translated texts (HTML files) contained inside ‘source’ folder (please see example file for detail)
  • Run a ‘text_replacement.py’ --> Original text in 'course' folder will be replaced by the translated texts in 'source' folder
  • If program is successfully executed, ready-to-upload course (course.tar.gz) is created inside the 'course' folder

NOTICE!!!

  • This tool only replaces HTML(text) component.
  • This script is only tested with 1 edX course. Therefore, unexpected error should happen while using the program.
  • There is a bug after uploading course back to edX. It is found that some text components disappeared in edX page. In our test, 1 component is missing.
  • Some HTML component listed in ‘error_files.txt’ will not have figures showed properly in edX. This happens when original component (Eng) and translated component (local language) have different number of figures

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages