Package: ybe
Ybe is a software package supporting aYAMLbased file format for importing,
exporting and storing exams in a plain text file. It supports multiple-choice, multiple-response and essay questions.
Due to the extensive meta-data storage, storing exams in ybe allows you to easily search, annotate and recombine questions into new exams.
Exams can be written as a LaTeX file, or be exported to the QTI format and be imported by Canvas and other educational software.ExamplesQuestions can be stored in a plain text file usingYAMLfor structure andMarkdown, HTML or plain text, for the content of the questions.Minimal .ybe fileFor example, a minimal example of a multiple choice question is given by:ybe_version:0.2.0questions:-multiple_choice:id:q1title:Optional titlepoints:1text:!markdownExample *multiple* choice question.answers:-answer:text:First answer-answer:text:Second answercorrect:trueThis defines a list of questions with only one question. Theidis meant to be provide
a unique identifier to every question and should be unique for every question in an .ybe file.
The points define the worth of the question.
By prefixing the text with!markdownwe indicate that that the text is in Markdown format
and as such allows all Markdown operators.
The answers are not prefixed with!markdownmaking them plain text.
The itemcorrectmarks the correct answer.Exporting to QTIIf you would copy the previous Ybe content into a text file namedexample.ybe, you could export it to a QTI using:fromybeimportread_ybe_file,YbeToQTI_v1p2ybe_exam=read_ybe_file('example.ybe')# QTI v1.2 for use in CanvasYbeToQTI_v1p2(convert_canvas_equations=True).convert(ybe_exam,'qti_canvas.zip')Exporting to other formatsAlternatively, you could export your Ybe exam file to other formats like Latex, Markdown, HTML or Docx/ODT:fromybeimportread_ybe_file,\YbeToLatex,YbeToMarkdown,YbeToDocx,YbeToODT,YbeToHTMLybe_exam=read_ybe_file('example.ybe')YbeToLatex().convert(ybe_exam,'/tmp/ybe/latex/main.tex',copy_resources=True)YbeToMarkdown().convert(ybe_exam,'/tmp/ybe/markdown/main.md',copy_resources=True)YbeToHTML().convert(ybe_exam,'/tmp/ybe/html/main.html',copy_resources=True)YbeToDocx().convert(ybe_exam,'/tmp/ybe/main.docx')YbeToODT().convert(ybe_exam,'/tmp/ybe/main.odt')This compiles all your questions in a single Latex, Markdown, HTML or docx/odt file for printing or further processing.
For technical minded people, this uses a Jinja2 templating system which can be fully adapted for your specific needs.Supported question typesYbe supports multiple choice, multiple response, text-only and open/essay questions.
An example of an ybe file with all supported questions and some file meta data is given by:ybe_version:0.2.0info:title:Example questionsdescription:Example of all questions.document_version:0.1.0date:2020-05-24authors:-The Authorquestions:-multiple_choice:id:q1title:Questions can have a titlepoints:1text:Example multiple choice question.answers:-answer:text:First answer-answer:text:Second answercorrect:truefeedback:general:Here's the explanation forthe correct and incorrectanswer (or "general comments")on_correct:Here's the explanation forthe correct answer.on_incorrect:Here's the explanationfor the incorrect answer.-open:id:q2points:3text:Example open question.-multiple_response:id:q3points:2text:!htmlA multiple response <b>question<b/> is amultiple choice question, wheremultiple answers are possible.answers:-answer:text:First answercorrect:truehint:Multiple choice/response answerscan have hints.-answer:text:Second answerhint:This is not correct!-answer:text:Third answercorrect:true-answer:text:Fourth answer-text_only:id:q4text:!markdown|-This text is prefixed with !markdown, meaning you canuse Markdown syntax to markup your document.For example:1. this is a list2. *with this in italics*3. **and in bold**This is a famous formula inline: $E=mc^2$and this is a basic displayed formula:$$ a^2 = b^2 + c^2 $$Support for hints and explanationsYbe supports comments to the answer of a question by means ofhintsandexplanations.
Explanations can be added to any question and allow commenting on the provided answer.
Hints are meant as a comment to a selected multiple choice or multiple response answer.
In Ybe, these can be added as follows:questions:-multiple_choice:id:q1points:1text:Example multiple choice question.answers:-answer:text:First answerhint:This is the wrong answer-answer:text:Second answercorrect:truehint:This is the correct answerfeedback:general:General comment after finishing the question.on_correct:Here's the explanation for the correct answer.on_incorrect:Here's the explanation for the incorrect answer.That is, everyanswercan contain ahint, and everyquestioncan contain afeedbackelement.
What to do with this information is application dependent.Adding meta-dataIn addition, Ybe supports adding meta-data to your questions.
A full example of all the available meta-data options is given below.
Not all the options need to be used, one can leave one or more out if not needed.
A full example:questions:-open:id:q5points:1text:Example with meta datameta_data:general:description:Some descriptionkeywords:[alpha,beta]language:encreation_date:2020-05-29authors:-John Doemodule:Sciencechapters:-Some book, ed. 2, ch. 1-Some book, ed. 3, ch. 2skill_type:Knowledgedifficulty:1analytics:-exam:name:2020_qz1participants:1nmr_correct:0-exam:name:2020_qz1participants:200nmr_correct:25Searching your questionsIf you would save the above in a fileexample.ybe, you could then search through the questions easily.
For example, finding all questions that yield exactly one point can be done like:fromybeimportread_ybe_fileybe_exam=read_ybe_file('example.ybe')forquestioninybe_exam.questions:ifquestion.points==1:print(question)Importing from QTIIf you already have questions inCanvasor other software packages, you can export
these to QTI file and convert those into an .ybe file:fromybeimportread_qti_zip,write_ybe_filefromybe.lib.utilsimportcopy_ybe_resourcesybe_exam=read_qti_zip('qti_file.zip')# write the ybe file and the resources (images)write_ybe_file(ybe_exam,'./qti_to_ybe.ybe',copy_resources=True)SummaryIn general:Storing exams in a plain-text.ybefileImporting and exporting to and from QTIWrite exams to LaTeXAPI for scripting examsTechnical details:Free software: GPL v3 licenseFull documentation:https://ybe.readthedocs.ioProject home:https://github.com/robbert-harms/ybeQuick installation guideYbe requires Python 3.8+. Either use your package manager, or install a Python distribution likeAnaconda.
After that it is typically as simple as:pipinstallybeLinuxFor Ubuntu 18.xx you need to install Python 3.8 first, for example see here:https://linuxize.com/post/how-to-install-python-3-8-on-ubuntu-18-04/.
Afterwards, simply install using:pip3installybeFor other Linux distributions the setup is typically similar, install Python 3.8 and then install ybe.WindowsInstall Anaconda Python 3.8Open an Anaconda shell and type:pip install ybeMacInstall Anaconda Python 3.8Open an Anaconda shell and type:pip install ybeContributorsSoftware by Dr. HarmsCommissioned by Asst.Prof.Dr.Ir. S. Schoenmakers, Eindhoven University.