Page MenuHomePhabricator

Create new Python library to serialize Wikimedia Quiz format, GIFT quiz format, and allow round-trip conversions between the two formats.
Open, NormalPublic

Description

Wikiversity uses a custom quiz format to construct quizzes, documented on pages like https://en.wikiversity.org/wiki/Help:Quiz , https://www.mediawiki.org/wiki/Extension:Quiz , etc.

There are many standardised quiz formats, including QTI https://en.wikipedia.org/wiki/QTI and GIFT https://en.wikipedia.org/wiki/GIFT_%28file_format%29. The canonical reference for GIFT is at https://docs.moodle.org/28/en/GIFT_format and Moodle's reference PHP GIFT parser is at https://github.com/moodle/moodle/tree/master/question/format/gift

A library is needed to import a Wikiversity quiz into Python classes, and allow the quiz to be exported to other formats.

https://pypi.python.org/pypi/quizzer , https://pypi.python.org/pypi/Products.ECQuiz, and https://github.com/mitocw/moodle2edx/blob/master/moodle2edx/main.py contain some suitable code, but they are not a generic library.

https://github.com/edx/edx-platform contains a lot of quiz code, and some of it might be able to be extracted into an independent library.

https://pypi.python.org/pypi/pyslet and https://code.google.com/p/qtimigration/ might be a suitable data structure library.

Support for Wikiversity Quiz format must be added to an existing packaged library, or the subclass to hold Wikiversity Quiz data must be extremely simple (e.g. adding only a few additional elements)

See also : T24475: GIFT format

Internship project details

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
TasneemLo added a subscriber: TasneemLo.

Moving this project to the Missing Mentors column on Possible-Tech-Projects.
The description seems sufficient, but more details like Microtasks would be helpful.

Qgil updated the task description. (Show Details)Oct 11 2015, 9:08 PM

This is the last call for Possible-Tech-Projects missing mentors. The application deadline for Outreachy-Round-11 is 2015-11-02. If this proposal doesn't have two mentors assigned by the end of Thursday, October 22, it will be moved as a candidate for the next round.

Interested in mentoring? Check the documentation for possible mentors.

As previously mentioned, this task is moved to 'Recheck in February 2016' as it doesn't have two mentors assigned to it as of today, October 23 - 2015. The project will be included in the discussion of next iteration of GSoC/Outreachy, and is excluded from #Outreachy-11. Potential candidates are discouraged from submitting proposals to this task for #Outreachy-11 as it lacks mentors in this round.

does that mean tonythomas that pywikibot is not participating in opw ?

does that mean tonythomas that pywikibot is not participating in opw ?

Well, with this task - No. The project is missing a primary mentor, and a co-mentor too - so cannot push it further. There should be some other projects in https://phabricator.wikimedia.org/tag/outreachy-round-11/ where pywikibot related tasks are listed.

jayvdb updated the task description. (Show Details)Dec 20 2015, 9:12 PM
Sumit added a subscriber: Sumit.Feb 18 2016, 1:33 PM
NOTE: This task is a proposed project for Google-Summer-of-Code (2016) and Outreachy-Round-12 : GSoC 2016 and Outreachy round 12 is around the corner, and this task is listed as a Possible-Tech-Projects for the same. Projects listed for the internship programs should have a well-defined scope within the timeline of the event, minimum of two mentors, and should take about 2 weeks for a senior developer to complete. Interested in mentoring? Please add your details to the task description, if not done yet. Prospective interns should go through Life of a successful project doc to find out how to come up with a strong proposal for the same.
Niharika removed a subscriber: Niharika.Feb 19 2016, 3:22 AM
Yland_S added a subscriber: Yland_S.EditedMar 3 2016, 11:14 PM

My name is Yolande Amate from the University of Buea Cameroon. I would like to work on this project for the Google Summer of Code 2016 / Outreachy Round 12. I have a good understanding of the project, and I am proficient in C, C++, PHP and Python.
I would like know what is required to produce a successful proposal for the project and some starting points/issues to begin from.
Please I would need some clarification on the statement "Support for Wikiversity Quiz format must be added to an existing packaged library" as I did not understand it clearly.

Below is a link to github profile, which says more about my experience.
https://github.com/yland

Jsalsman added a comment.EditedMar 4 2016, 12:00 AM

@Yland_S please see https://en.wikiversity.org/wiki/Help:Quiz

@jayvdb if you can't find a co-mentor by the day before the deadline for it, please add me.

Sumit added a comment.Mar 4 2016, 6:53 PM

I would like know what is required to produce a successful proposal for the project and some starting points/issues to begin from.

See https://www.mediawiki.org/wiki/Outreach_programs/Life_of_a_successful_project#Coming_up_with_a_proposal
For some starting points, you can have a look at the mentioned microtasks, or else see https://www.mediawiki.org/wiki/Annoying_little_bugs to get familiar with MediaWiki in general.

Please I would need some clarification as to the objectives of this project. What I understand is that the project require importing Wikiversity quiz data into a python datastructure with the possibility of exporting this data into other standardized quiz formats.

But I did not get the following statement clearly " Support for Wikiversity Quiz format must be added to an existing packaged library, or the subclass to hold Wikiversity Quiz data must be extremely simple (e.g. adding only a few additional elements) "

jayvdb updated the task description. (Show Details)Mar 5 2016, 12:34 AM

@Yland_S , we want a Python package released on https://pypi.python.org that supports the Wikiversity Quiz data.

Ideally Wikiversity Quiz support is added to one of the existing Python package , so that it is maintained by group of developers after this project is complete.

So this project will include evaluation of the existing packages, and involves submitted code to one of those projects and working with their developers to get the code merged.

If they dont want to accept code for Wikiversity Quiz support, this project will release a new pypi packaged library that extends the existing pypi packaged library to add Wikiversity Quiz format.

@jayvdb, Thanks very much, for the clarifications. My doubts have been resolved.

jayvdb updated the task description. (Show Details)Mar 5 2016, 6:54 AM
Qgil removed a subscriber: Qgil.Mar 7 2016, 3:17 PM
Sumit added a comment.Sep 12 2016, 6:45 AM

@jayvdb do you want to continue the project for the current round of Outreachy-13( Dec 6 to March 6 ) as a mentor?

Yea, I am still happy to mentor this project.

@jayvdb nice! Moving to featured, it'd be great if we could find a co-mentor also.

Mvolz added a subscriber: Mvolz.Sep 12 2016, 7:10 AM

I could probably co-mentor this one.

Sumit updated the task description. (Show Details)Sep 12 2016, 7:55 AM
Mvolz added a comment.Sep 12 2016, 1:19 PM

@jayvdb could you tell me why we wouldn't just add the ability to export the quiz format in these other standard formats in the extension itself? Is it just a matter of "extension doesn't have this, let's do this in pywikibot instead?"

Also what is a possible use cases for importing this quiz data into pywikibot?

MayS added a subscriber: MayS.Sep 17 2016, 6:46 PM

I am interested in applying for this project as part of outreachy-13. Right now I'm getting myself familiarised with the Wikimedia platform. It would be great if someone could define the project task in a bit more detail, so that we prospective interns can know clearly what is expected of us. This will give a good starting point to begin exploring.

Is this for GIFT or Twee ( http://www.maximumverbosity.net/twine/Entweedle/
) or both or something else?

jayvdb added a comment.EditedSep 18 2016, 7:38 AM

@Mvolz , even if the PHP extension supported a 'more' standardised format (e.g. T24475), AFAIK there is no generic python library that loads any standardised format.

All of the existing python code I can find is non-standard formats and "good enough" migration scripts, or readers that are part of a very large codebase with a data model designed for a specific website. If we need to design and build a generic data model in python, we may as well require that it can support the existing Wikiversity quiz concepts and serialization.

And unless the PHP extension also *imported* data from another format, any Python tool would still need to know how to serialise to the Quiz format in order to modify quiz on Wikiversity.

The MVP for this project is bi-directional support. Tools need to be able to parse and update Quiz data on Wikiversity. Almost every other embedded content in wikitext is in a format that has parsers and python libraries - this one doesnt.

One of the main use-cases I have heard of is people wanting to import quiz's from other systems into Wikiversity, usually to back-up their materials due to other mooc/quiz systems going offline, or being upgraded and they are told they will need to rebuild all their quiz, etc.

Another use-case is the ability to generate a custom/personalised quiz (in python) and push it to a Wikiversity user page.

Another area of possible use-cases is gamification of Wikimedia, using Python webapps deployed on the tool labs.

@jayvdb So as I understand it, this is to serialise quiz wikitext syntax, serialise GIFT format, and use the serialisation to perform round trip operations (GIFT to quiz syntax, quiz syntax to GIFT).

The use of the word "data" confused me initially because I assumed the data in question were the quiz *results*- as far as I have found, this can't be exported or imported anywhere. Might be a good (separate) project!

Correct. Serialise and deserialise for both formats. The data model should be generic, but it needs to retain style/token information so that the round trip has very few dirty diffs.

A earlytask (a microtask?) will be analysis to find features missing from each format, so we can work out acceptable modes of degraded exporting.

Mvolz renamed this task from Python library for quiz data, with serialisation to Create new Python library to serialize Wikimedia Quiz format, GIFT quiz format, and allow round-trip conversions between the two formats. .Sep 18 2016, 12:42 PM
Mvolz updated the task description. (Show Details)
MayS added a comment.Sep 19 2016, 7:14 AM

@jayvdb @Mvolz I understand the project task better now. So, do you suggest I start working on the microtask. Also please suggest some bugs in I can work on to get a better idea of the python coding convention expected. Some guidance on how I can proceed ahead in the project would be great. Thanks.

hi @MayS , definitely start small tasks to become familiar with the Wikimedia dev tools, ideally on the MediaWiki-extensions-Quiz or Pywikibot project, but it could be in any project. You can find easy tasks by using the good first bug tag in the Phabricator advanced search. e.g. https://phabricator.wikimedia.org/maniphest/query/83FiCVYkDzBc/#R

The microtask that is listed above is for the PHP extension project, and will involve CSS/JavaScript. If that isnt a combination of languages you are comfortable with, let us know your preference so we can find an easy task in a language you are already strong in.

Mvolz updated the task description. (Show Details)Sep 19 2016, 12:42 PM
Mvolz updated the task description. (Show Details)Oct 14 2016, 12:51 PM

Welcome @Dave_Braunschweig .
You can view/join the mentoring discussion at https://gitter.im/WM-quiz-serialize/Lobby

I'm not sure I have any value I can add to the project at present, but if something comes up, please let me know.

Thanks!

Is this project not already in progress (T148074) as part of the Outreachy Round 13? If so, I will move it to a different column 'Outreachy-Round-13' on the Possible-Tech-Projects workboard.

@srishakatux Yup, in progress for Round 13.

Hello,

For very simple quiz, Aiken format is used by some Learning Management System (especially Moodle)
See https://docs.moodle.org/3x/fr/Format_Aiken

I wrote a (quite simple) python library to parse such a format
https://github.com/scls19fr/python-lms-tools

There is currently no support for GIFT format, neither Wikiversity custom quiz format

Feel free to take some code if you want.

Kind regards

Zoranzoki21 added a subscriber: Zoranzoki21.

Removing MOOC-Interface because of archival per T202803.