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
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request