Coder Social home page Coder Social logo

gift2qti's Introduction

Quiz format convertor from GIFT to QTI 1.2

This is a simple converter that lets you paste in GIFT formatted quiz questions like:

// multiple choice with specified feedback for right and wrong answers
::Q2:: What's between orange and green in the spectrum? 
{ =yellow # right; good! ~red # wrong, it's yellow ~blue # wrong, it's yellow }

And get them downloaded as QTI 1.2 for import into lots of systems like Sakai and Canvas.

GIFT seems to be a micro-format invented by the Moodle community - and a pretty cool idea if I do say so myself. I like it because I can put quizzes in GitHub :)

https://docs.moodle.org/28/en/GIFT_format

You can play with my demo server at:

https://www.tsugi.org/gift2qti/

This is an early version and only supports multipla choice, true/false, and essay question types. Other types wont' be hard - but I ran out of time.

You can also set up your own server if you have a computer with PHP. Download or clone this repository and then navigate to the directory and run the following command to run a webserver.

php -S localhost:8000

Then open a browser and use localhost:8000 as the address in your browser's navigation bar.

Comments (and Pull requests) welcome.

-- Chuck Wed Jan 7 19:10:57 EST 2015

gift2qti's People

Contributors

csev avatar dsoto avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

gift2qti's Issues

Allow HTML in questions

We are trying to embed pictures into quiz questions, using the tag (images have absolute paths to our web server). How do we modify the code to accept this? I'm guess it's early on in the make_qti.php script, but not sure exactly which lines need an if statement adding.

qti2gift?

We have someone who authored questions using Coursera's tools and now needs to import them into Moodle.

Is there a similar tool to do the reverse translation?

Individual feedback not passing through

I have converted an XML format we were given into a GIFT, including individual feedback for the incorrect answers (according to the spec doc, # at the start of a line denotes individual feedback for the possible answer defined on the previous line). GIFT value for one quesiton below (the code quote option has destroyed carriage returns, sorry):

::Q1::[html]___________ __________ means a cistern provided with valve or device for controlling the discharge of the stored water into a water closet pan or urinal. Complete the missing words. <img src="https://canvas.hull-college.ac.uk/plumbing/L3/Images3/closecoupled.jpg" /> { =Flushing cistern ~Feed and Expansion Cistern #Revision: Interpretations - Terminology which describes a flushing cistern DETR G1.1 WRAS R1.1 WRG p1.3 ~Storage Cistern #Revision: Interpretations - Terminology which describes a flushing cistern DETR G1.1 WRAS R1.1 WRG p1.3 ~Backflow cistern #Revision: Interpretations - Terminology which describes a flushing cistern DETR G1.1 WRAS R1.1 WRG p1.3 }

When I run this through the convertor, it is not putting the individual feedback for each question (XML from the QTI zip for this question below):
<item title="Q1" ident="5e677e5823991_100"> <itemmetadata> <qtimetadata> <qtimetadatafield> <fieldlabel>question_type</fieldlabel> <fieldentry>multiple_choice_question</fieldentry> </qtimetadatafield> <qtimetadatafield> <fieldlabel>points_possible</fieldlabel> <fieldentry>1</fieldentry> </qtimetadatafield> <qtimetadatafield> <fieldlabel>assessment_question_identifierref</fieldlabel> <fieldentry>5e677e5823991_101</fieldentry> </qtimetadatafield> </qtimetadata> </itemmetadata> <presentation> <material> <mattext texttype="text/html">___________ __________ means a cistern provided with valve or device for controlling the discharge of the stored water into a water closet pan or urinal. Complete the missing words. &lt;img src="https://path/to/image/here.jpg" /&gt;</mattext> </material> <response_lid ident="response1" rcardinality="Single"> <render_choice> <response_label ident="102"> <material> <mattext texttype="text/plain">Flushing cistern</mattext> </material> </response_label> <response_label ident="103"> <material> <mattext texttype="text/plain">Feed and Expansion Cistern</mattext> </material> </response_label> <response_label ident="104"> <material> <mattext texttype="text/plain">Storage Cistern</mattext> </material> </response_label> <response_label ident="105"> <material> <mattext texttype="text/plain">Backflow cistern</mattext> </material> </response_label> </render_choice> </response_lid> </presentation> <resprocessing> <outcomes> <decvar maxvalue="100" minvalue="0" varname="SCORE" vartype="Decimal"/> </outcomes> <respcondition continue="No"> <conditionvar> <varequal respident="response1">102</varequal> </conditionvar> <setvar action="Set" varname="SCORE">100</setvar> </respcondition> </resprocessing> </item>

Any ideas why it's not pulling this individual response feedback through?

Overall Feedback option

We want to add feedback for each question, regardless of what they answered (revision signposting).
Is there a way of doing this in GIFT, as the moodle doc for the latest version only offers the ability to do per-answer feedback (which I will do if necessary, but it would be neater to give it to them once).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.