Skip to main content

xls2moodle: Import multiple-choice questions from excel to moodle.

Project description

xls2moodle

Script to convert multiple choice questions from xls to moodle's xml format. The xml format can then be used to import the questions into moodle quizes. Please note, that this repository and the code was intended to be used for german tables / quizes. Adaptions are possible, but some columns (in the input) are hard-coded at the moment.

To install the package and make use of the tkinter GUI (thanks @euvbonk), you can use

pip install xls2moodle

input

The script requires two arguments as commandline options (see MoodleXML usage):

  • course name
  • location of tabular excel file with questions

output

  • xml format, ready for import in moodle

question format

Please refer to the template_advanced.xlsx to get an ideao on the file format. Mandatory columns:

  • Aussage1 - possible answer 1
  • Aussage2 - possible answer 2
  • Aussage3 - possible answer 3
  • Aussage4 - possible answer 4
  • WAHR - contains index of correct answer(s), 1-based
  • FALSCH - contains index of wrong answer(s), 1-based
  • Themenblock - contains a topic name (this should be the same for similar questions)
  • Hauptfrage - Question text

Optional columns:

  • Anwendung - boolean, filter to include (1) or exclude (0) questions

Further columns are ignored.

templates

The script reads templates (xml_templates-folder) that were previously exported from moodle. If the format changes in the future, this process needs to be repeated. In the meantime, do not touch any of the xml templates.

known issues

  • latex equation code supported (?)
  • reading of data with special encoding (utf-8) currently not possible with the latest pandas version

Contributors

  • Benjamin Furtwängler
  • Sven Giese
  • euvbonk

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xls2moodle-1.1.tar.gz (25.3 kB view details)

Uploaded Source

File details

Details for the file xls2moodle-1.1.tar.gz.

File metadata

  • Download URL: xls2moodle-1.1.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.8.3

File hashes

Hashes for xls2moodle-1.1.tar.gz
Algorithm Hash digest
SHA256 ed893e52b9fa75694463f97d25006228f0d47649253949a3ca237e411845e2ed
MD5 42f64737f9d74ad6dcd9871b169eee9c
BLAKE2b-256 d044bf81173f89fdfb944b2b108cda0246686ea67d9ae7355736546e61c43c2a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page