A sort of sorts

As you may know, I am an IT freelancer who (among other things) creates new H5P content types and features. Sometimes, there are companies who hire me and don’t mind if what I create for them becomes open source software. We have another case!

Sonny English who runs justasksonny.com required an H5P content type that allows to sort paragraphs into the correct order. Here it is: Sort the Paragraphs!

You may notice a couple of things. Here, the content doesn’t consider the correct and wrong positions of the paragraphs, but the correct and wrong transitions between them. Otherwise, you could receive a score of even 0 if you just misplaced the paragraph that was supposed to be the last one to the top – although the order of the rest was fine.

But that’s up to you to decide. Maybe you want to use the content type for a pseudo-coding exercise and rather want everything to be in the right spot (or the code wouldn’t work)?

Have you noticed, by the way, that you can drag and drop the paragraphs or use the buttons or use the keyboard in order to move them around? The buttons are rather intended for mobile use, because H5P content lives inside an iframe and that could cause trouble for dragging the paragraphs if they don’t fit on the screen. The keyboard is part of the content type’s accessibility features – like having buttons that seem to be quite large, but they just have kind of the minimum suggested size for touch use by people with disabilities. You can override the CSS on your platform if you want them smaller deliberately, of course.

I’ll leave it to you to find out the other small features that the content type has. The easiest way to install it is by downloading one of these demo contents and to upload that to your platform. Remember that you need the rights to install H5P libraries in order to do that. If you want to have a look at the source code instead, feel free to visit the content type’s github repository.

Some more details:

Aktivieren Sie JavaScript um das Video zu sehen.
https://youtu.be/EfOJ2_BOAgc


Update Nov 14, 2020:
Peter Baumgartner hinted that the swapping of draggables wasn’t intuitive and that a draggable should rather displace other draggables when being dragged – what a drag 😉 I changed that. Also, I just added an option to treat duplicate paragraphs as identical (based on their plain text content). You can now, e.g. let students sort the notes of a tune which generally will have duplicate notes.

Update Jun 29, 2021: The content type has passed the review of the H5P core team, lost some bugs during that process and learned two new tricks. Should be available on the H5P Hub soon.