Project

moodle2cc

0.04
Low commit activity in last 3 years
A long-lived project that still receives updates
Migrates Moodle backup ZIP to IMS Common Cartridge package
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

 Project Readme

Moodle2CC

moodle2cc will convert Moodle 1.9 backup files into IMS Common Cartridge 1.1 formatted files.

Moodle information: http://moodle.org/

Common Cartridge information: http://www.imsglobal.org/cc/index.html

Use the Github Issues for feature requests and bug reports.

Installation/Usage

Command line

Install RubyGems on your system, see http://rubygems.org/ for instructions. Once RubyGems is installed you can install this gem:

$ gem install moodle2cc

Convert a moodle .zip into Common Cartridge format

$ moodle2cc migrate <path-to-moodle-backup> <path-to-cc-export-directory>

Or into a Canvas-enhanced Common Cartridge format

$ moodle2cc migrate --format=canvas <path-to-moodle-backup> <path-to-cc-export-directory>

In a Ruby application

Add this line to your application's Gemfile and run bundle:

gem 'moodle2cc'

Require the library in your project and use the migrator:

require 'moodle2cc'
migrator = Moodle2CC::Migrator.new moodle_zip_path, destination_path
migrator.migrate

Caveats

Common Cartridge (CC) does not support all of the concepts in a Moodle course. CC has no concepts such as assignments or wiki pages, so these things have to fit into Common Cartridge as best they can. Here are some of the decisions we made about these things:

Moodle Common Cartridge
Course Files All files are in the `web_resources` folder, links to files in HTML are referenced relative to that directory with the token `$IMS_CC_FILEBASE$`.
Assignments HTML pages in an `assignments` subfolder in `web_resources`. The description of the assignment is the body of the page and stuff like points possible are in meta fields.
Wiki Pages HTML pages in a `pages` subfolder in `web_resources`.
Discussion Topics The titles and bodies of topics are intact in the conversion.
Grade Items If the grade item is attached to an assignment its data will be in the meta data of the assignment's HTML page. Otherwise it isn't currently converted.
Assessments (quizzes) TODO - Coming soon! Only the CC-supported question types will be converted to QTI as documented here
Question Categories TODO - Coming soon! Common Cartridge only supports having a single question bank, so all banks will be combined into one. CC Question Bank Docs

Todo

  • Support exporting to CC 1.3
  • Support converting to multiple versions of CC?
  • Quiz conversion
  • Question Category conversion
  • LTI configurations?
  • Convert more Moodle features as requested
  • Moodle 2 support for standard CC
  • Moodle 2 support for canvas-flavored CC

Contributing

Run the tests:

$ bundle exec rake
  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request