MrWarper's self-checking exercise generator

General discussion about learning languages
User avatar
mrwarper
Orange Belt
Posts: 106
Joined: Sat Jul 18, 2015 4:06 pm
Languages: A bunch, in various stages
Language Log: http://how-to-learn-any-language.com/fo ... ?TID=39905
x 149
Contact:

One last placeholder

Postby mrwarper » Sun May 01, 2022 11:38 am

TBD. Probably for uploading current implementation samples and such.
0 x
MrWarper while HTLAL is offline.

User avatar
mrwarper
Orange Belt
Posts: 106
Joined: Sat Jul 18, 2015 4:06 pm
Languages: A bunch, in various stages
Language Log: http://how-to-learn-any-language.com/fo ... ?TID=39905
x 149
Contact:

What I need help with

Postby mrwarper » Sun May 01, 2022 11:38 am

-Identifying useful exercise types not covered, i.e. that could not possibly be generated yet (please post examples and/or descriptions).
-Think up new dynamic elements for existing and new types of exercises, if/as necessary.
-Defining a language that lets anyone type the source for generated exercises in the simplest, most effortless possible way.

In principle, I can distill any new exercise primitives from the exercise types you come up with, or handle any necessary HTML stuff for the new primitives and dynamic elements, all by myself -- however any comments you may have on this are welcome too.

Anything else related you can think of, that I overlooked or omitted.
Last edited by mrwarper on Fri May 06, 2022 9:31 am, edited 2 times in total.
0 x
MrWarper while HTLAL is offline.

Cainntear
Black Belt - 3rd Dan
Posts: 3468
Joined: Thu Jul 30, 2015 11:04 am
Location: Scotland
Languages: English(N)
Advanced: French,Spanish, Scottish Gaelic
Intermediate: Italian, Catalan, Corsican
Basic: Welsh
Dabbling: Polish, Russian etc
x 8657
Contact:

Re: MrWarper's self-checking exercise generator

Postby Cainntear » Sun May 01, 2022 3:07 pm

mrwarper wrote:However, in the 21st century we can up our game a bit, and provide an electronic version of the same materials instead of / in addition to the old-school paper handouts. These should put checking exercise answers a mere, single mouse click (or smartphone screen tap) away, thereby speeding up the whole process and letting students focus on what is useful.

Absolutely agree with you on the concept. I have my own question engine I've been working on on and off for a while for exactly those reasons. I have been intended to write a smart backend for mine to use it for a teaching website, so for now I'm keeping it to myself (which is why I didn't respond to earlier messages -- feel kind of selfish in a way....)
Output demonstration
As you may know, I started rewriting the Princeton Russian Course for the web some 10 years ago, so I can already give you a close example of what such electronic exercises look like live. Please check:
sample_exercises.zip

These can be used nearly universally -- upload them to a website, send them via instant messaging applications like WhatsApp / Telegram and open on your smartphone, etc., or simply print and hand them out for the old-schoolers like me.

Are you aware you've only zipped the HTML file? The audio files aren't included and I wasn't sure if that was a mistake or not.

Also, why link to the audio files ( <a href="L03HW2.mp3">Exercise 2.</a> )?
Why not use an HTML5 AUDIO element?

Code: Select all

<audio controls>
    <source src="L03HW02.mp3" type="audio/mpeg">
</audio>


The challenge
Now, that is all well and good, but assuming you liked the idea as much as I do, and you were willing to create such exercises, ask yourself: how much work would that imply? What skills would you need to acquire first? HTML and javascript, anyone? I understand that all (or any!) of that might put quite some people off, so that's exactly where this project should come in handy: nearly no special skills needed for that with it.

The goal, in more detail
If everything goes as planned, to create something like the first exercise you will find above with this tool, all you will need to do is visit some webpage with your browser, type something similar to:

*{mch:Фо́лнея|Го́лнер|Фу́лкнер|*Фо́лкнер}

I'd recommend a slightly more visually friendly format. I use txt2qti from time-to-time for generating quizzes for use on the VLE and I think the question format it uses strikes a good balance between being quick to type and being easy to look at and understand. There's some things I don't like about it, like how it gets you to number questions. Why? Surely the number is implicit in the ordering?

I'd also suggest taking a look at Auto Multiple Choice. I never used it much (because it requires colour printing and schools won't pay for that on a regular basis) but the format it uses is slightly superior.

OK, actually: we'll be simply exchanging the 'complicated' stuff (HTML+js) for the few special characters, constructs and keywords that you must type (see the example above, and think something very similar to how you write posts on the forum). These will be both simple and stuff that you wouldn't type except on purpose.

I've highlighted constructs, because what you've created is something that is terse and powerful, but it obscures the logic somewhat, which is going to be a hurdle to uptake. The approach of newlines and double-newlines used in txt2qti and AMC is much less intimidating to less technically-inclined users, and also more maintainable for even the technically inclined.
A terse code has to be used very frequently to be worthwhile, and a lot of people would only use the likes of this sporadically.
2 x

User avatar
mrwarper
Orange Belt
Posts: 106
Joined: Sat Jul 18, 2015 4:06 pm
Languages: A bunch, in various stages
Language Log: http://how-to-learn-any-language.com/fo ... ?TID=39905
x 149
Contact:

Re: MrWarper's self-checking exercise generator

Postby mrwarper » Sun May 01, 2022 6:19 pm

Hi, long time no read ^^
Cainntear wrote:Absolutely agree with you on the concept.
Thank you!
I have my own question engine [...] for now I'm keeping it to myself (which is why I didn't respond to earlier messages -- feel kind of selfish in a way....)
Sure, I just wrote a short license of free use for code I will publish on the forum but that does not mean that I won't write additional code that won't even be publicly available : )
Are you aware you've only zipped the HTML file? The audio files aren't included and I wasn't sure if that was a mistake or not.
Yes, I am. From the now-amended first post: "please ignore links to missing audio. This sample is taken straight out of real materials, and I didn't want to spend much time editing it. In real life, audios would give the course takers answers to the gaps, a reason to choose an option within each multiple choice, and the like, which you don't need to see how each element works. All the 'magic' in here knows is what the right answers are (which must be embedded in the HTML code), it knows nothing about the audio, or even that it exists."
Also, why link to the audio files ( <a href="L03HW2.mp3">Exercise 2.</a> )?
Why not use an HTML5 AUDIO element?
Dealing with external stuff is out of my intended scope for the generator, that link was just left in. (But also I imagine <audio> must be much less widely supported than simple links --it sure was back then--, and I am not aware of any significant advantages.)

I want to make the exercise generator scope quite narrow, to facilitate later integration with other tools. In my vision, it should process only the smallest bits of text and generate the smallest bits of HTML, so it won't destroy stuff it does not know about, nor impede additional processing of its input/output files (f.e. with a wiki processor or real HTML editors).
*{mch:Фо́лнея|Го́лнер|Фу́лкнер|*Фо́лкнер}
I'd recommend a slightly more visually friendly format.
I agree, but as I have added in another amendment to the first post, all of this is to be considered in a state of flux. The reason why I did put everything between the curly braces above in one line is because each of the multiple choice in the exercise is a single text line as well. The asterisk preceding the braces merely reflects that the whole multiple choice was contained in a <LI>, and I lifted that from standard wiki syntax.

We'll probably need an additional multiple choice construct that puts every option on a different line, or list item or the like. Quite possibly some variation of the simple wiki-code:

* Option 1
...
* Option n

that somehow marks the beginning and end of the multiple choice, and which option is the right one.
Will be having a look for additional ideas, thank you.
OK, actually: we'll be simply exchanging the 'complicated' stuff (HTML+js) for the few special characters, constructs and keywords [...].
I've highlighted constructs, because what you've created is something that is terse and powerful, but it obscures the logic somewhat, which is going to be a hurdle to uptake. The approach of newlines and double-newlines used in txt2qti and AMC is much less intimidating to less technically-inclined users, and also more maintainable for even the technically inclined.
A terse code has to be used very frequently to be worthwhile, and a lot of people would only use the likes of this sporadically.
Again: state of flux. Suggestions on making our new language as clear as possible are welcome, once we have a reasonably complete set of primitives and elements, and start fleshing it out for real. It will probably be a good idea to let construct markers be user-definable anyway, so obscurity would be a non-issue.

However, I concur with handling single and double line breaks as you say -- or as I interpret it. That is newline = <br>, or </li><li> as appropriate, and such, and double breaks for paragraphs, right? I would probably not want to do it any other way, I definitely had a bad idea writing the 'code' in the first post like I did.
0 x
MrWarper while HTLAL is offline.

Cainntear
Black Belt - 3rd Dan
Posts: 3468
Joined: Thu Jul 30, 2015 11:04 am
Location: Scotland
Languages: English(N)
Advanced: French,Spanish, Scottish Gaelic
Intermediate: Italian, Catalan, Corsican
Basic: Welsh
Dabbling: Polish, Russian etc
x 8657
Contact:

Re: MrWarper's self-checking exercise generator

Postby Cainntear » Sat May 07, 2022 2:02 pm

mrwarper wrote:
Also, why link to the audio files ( <a href="L03HW2.mp3">Exercise 2.</a> )?
Why not use an HTML5 AUDIO element?
Dealing with external stuff is out of my intended scope for the generator, that link was just left in. (But also I imagine <audio> must be much less widely supported than simple links --it sure was back then--, and I am not aware of any significant advantages.)

AUDIO is almost universal now, and you can always stick a link inside it in case someone's on a really old browser:

Code: Select all

<audio controls>
    <source src="https://whatever.com/whatever.mp3">
    <a href="https://whatever.com/whatever.mp3">Link that only shows if your browser doesn't support the audio tag</a>
</audio>


I want to make the exercise generator scope quite narrow, to facilitate later integration with other tools. In my vision, it should process only the smallest bits of text and generate the smallest bits of HTML, so it won't destroy stuff it does not know about, nor impede additional processing of its input/output files (f.e. with a wiki processor or real HTML editors).

Fair enough, but I think there's a lot to be gained from automating audio/video embedding, as otherwise you're leaving more work for the person making the activities.

However, I concur with handling single and double line breaks as you say -- or as I interpret it. That is newline = <br>, or </li><li> as appropriate, and such, and double breaks for paragraphs, right? I would probably not want to do it any other way, I definitely had a bad idea writing the 'code' in the first post like I did.

I'm not thinking in terms of output formatting, but in terms of the semantics of where a question begins and ends. I personally prefer to think of activities that way, and let the formatting deal with itself. If there's a separate way of styling, that's fine too, but first and foremost for me is the conceptual content.
1 x

User avatar
mrwarper
Orange Belt
Posts: 106
Joined: Sat Jul 18, 2015 4:06 pm
Languages: A bunch, in various stages
Language Log: http://how-to-learn-any-language.com/fo ... ?TID=39905
x 149
Contact:

Re: MrWarper's self-checking exercise generator

Postby mrwarper » Sun May 08, 2022 6:55 pm

I was about to announce that I have expanded the initial posts now (up to "what I need help with"), enough for everyone to get a reasonably complete picture of this and start giving me useful input. As they say, everyone has a plan until they get punched in the face.
Cainntear wrote:AUDIO is almost universal now [...]
mrwarper wrote:I want to make the exercise generator scope quite narrow, to facilitate later integration with other tools. In my vision, it should process only the smallest bits of text and generate the smallest bits of HTML, so it won't destroy stuff it does not know about, nor impede additional processing of its input/output files (f.e. with a wiki processor or real HTML editors).
Fair enough, but I think there's a lot to be gained from automating audio/video embedding, as otherwise you're leaving more work for the person making the activities.
You mean me? ; )

While I don't intend to start making activities for the general public, I do plan to use the generator myself, so anything it won't generate I will have to make some other way, won't I?

You just bumped again into something else that I didn't make clear enough, because it is/was all so obvious to me -- but naturally this is exactly what happens all the time when you work alone in your cave :(

-----
So far, I write most of my (squeaky clean) HTML in a text editor that uses custom macros. This makes writing HTML almost as fast as if I were writing plain text -- if you think pushing buttons, or selecting menus, or pressing shortcut keys in Word or the like is fast, it is exactly as fast for me, with the difference that I have full control over the result. I wrote a few macros to speed up writing exercises like the Russian ones you have in the first post. However, that is not a complete solution, and certainly it is not suitable for consumption by your average exercise writer.

There are quite a few wiki-like HTML editor components out there that are more user-friendly than plain text editors and let normal people write reasonably good code fast. But I have found none that will let the user type and get ready-to-go exercises. On the other hand, I have checked a few 'questionnaire engines' and they more or less work, but generate, without any flexibility, all sorts of HTML that you may be forced to get rid of later because they try to be too 'complete'. That is where the exercise generator as a user-friendly tool project was born.

What I wanted to discuss here, but failed to outline properly, is my part of the generator, which will again generate just enough HTML to embed answers in exercises and let students check them, all while simplifying and minimizing creator input; any other stuff (italics, links, headers, lists, you name it) will be generated by other tools integrated with the generator itself, so as to avoid reinventing any wheel, and/or interfering.

Those "other tools", and the integration specifics are TBD but I will aim at a compromise between simplicity and completeness, with an eye on replacing components easily as new needs arise. For now you can think of the integrator as a whole as something most likely resembling a wiki text editor, with a few extra activity-oriented features you won't find in existing ones.

But naturally, an activity-oriented features 'engine' must be written before being integrated into a user-friendly environment of any kind. This is our first stop.

Next round of clarifications, anyone? :D

----
Cainntear wrote:
However, I concur with handling single and double line breaks as you say -- or as I interpret it.
I'm not thinking in terms of output formatting, but in terms of the semantics of where a question begins and ends. I personally prefer to think of activities that way, and let the formatting deal with itself. If there's a separate way of styling, that's fine too, but first and foremost for me is the conceptual content.
I am afraid it may be your turn to clarify then, for it is obvious that I am not having my brightest moment. Did you mean that for the code I wrote to be more clear, each question should be separated from the next with an empty line (double line break), and single line breaks, instead of "|", should separate options within a single multiple choice? If not:

What do you think was wrong exactly with semantics in what I wrote, and why? How would you have written it instead?

Thank you for your input. Please keep it coming.
0 x
MrWarper while HTLAL is offline.

User avatar
zenmonkey
Black Belt - 2nd Dan
Posts: 2528
Joined: Sun Jul 26, 2015 7:21 pm
Location: California, Germany and France
Languages: Spanish, English, French trilingual - German (B2/C1) on/off study: Persian, Hebrew, Tibetan, Setswana.
Some knowledge of Italian, Portuguese, Ladino, Yiddish ...
Want to tackle Tzotzil, Nahuatl
Language Log: viewtopic.php?f=15&t=859
x 7030
Contact:

Re: MrWarper's self-checking exercise generator

Postby zenmonkey » Mon May 09, 2022 10:25 am

Aren't there a lot of existing open-source computer-based assessment or exam and quiz management packages?
I've seen more than a few on Github.

However, many of these do have a slow graphic interface for quiz creation. You could extend something like https://github.com/justEhmadSaeed/quizdom

to simplify the quiz creation by upload/dowload a structured text quiz file.

Or am I misunderstanding the scope of your project?
0 x
I am a leaf on the wind, watch how I soar

User avatar
mrwarper
Orange Belt
Posts: 106
Joined: Sat Jul 18, 2015 4:06 pm
Languages: A bunch, in various stages
Language Log: http://how-to-learn-any-language.com/fo ... ?TID=39905
x 149
Contact:

Re: MrWarper's self-checking exercise generator

Postby mrwarper » Mon May 09, 2022 8:00 pm

zenmonkey wrote:Or am I misunderstanding the scope of your project?

Maybe, or maybe I was unclear as usual. The project aims at making it possible for the non-tech-savvy to write stuff for learners: HTML text that includes exercises such as the examples I attached to the first post, not just to create 'quizzes'. I already have partial solutions for the text part, to be integrated later, so I decided to focus on the exercises here.

Anyway, what's so special about the linked examples again? In short, that they are not 'special' at all, which enables nearly universal usage: they can be read, emailed, printed and handed out normally, and used interactively too for the exercise bits, whether as part of a website or offline or as local files, on any device with a browser. I don't target particular device classes or models, and I don't use any 'cutting (bleeding!) edge' stuff, so for example they even work on my old(ish) Sony/Ericsson pre-Android shell phone, my 'smart' TV, or my eBook reader (~10 years old IIRC). This is how I ensure that my students have absolutely no excuse not to work at home.

If any existing solutions are known to provide this kind of coverage, I'll be happy to use and recommend them myself, instead of writing any code anywhere :)

I would be happy if I can get my generator here to a state where it would be my tool of choice if I were to rewrite most of the Princeton course examples from scratch.
0 x
MrWarper while HTLAL is offline.

User avatar
zenmonkey
Black Belt - 2nd Dan
Posts: 2528
Joined: Sun Jul 26, 2015 7:21 pm
Location: California, Germany and France
Languages: Spanish, English, French trilingual - German (B2/C1) on/off study: Persian, Hebrew, Tibetan, Setswana.
Some knowledge of Italian, Portuguese, Ladino, Yiddish ...
Want to tackle Tzotzil, Nahuatl
Language Log: viewtopic.php?f=15&t=859
x 7030
Contact:

Re: MrWarper's self-checking exercise generator

Postby zenmonkey » Mon May 09, 2022 9:14 pm

Ok, I get now that you want to have code that is light, transportable, and device or connection agnostic.
I understand now better the scope of the project.

I do hope you figure out how to include audio files because a lot of useful exercises are based on that.

And I'm curious, do you plan to manage languages that typically did not show up correctly in those old devices because the codepages were not installed and required some sort of in-line font declaration? I remember running into issues with Tibetan, Urdu and Assyrian in 2014. I never did get an old phone to show Arabic natively.

BTW, should you be declaring your DTD?
I thought that the current standard is that if it is undeclared it will be read as HTML5 and then you may have some obsolete identifiers.
0 x
I am a leaf on the wind, watch how I soar

Cainntear
Black Belt - 3rd Dan
Posts: 3468
Joined: Thu Jul 30, 2015 11:04 am
Location: Scotland
Languages: English(N)
Advanced: French,Spanish, Scottish Gaelic
Intermediate: Italian, Catalan, Corsican
Basic: Welsh
Dabbling: Polish, Russian etc
x 8657
Contact:

Re: MrWarper's self-checking exercise generator

Postby Cainntear » Tue May 10, 2022 9:29 pm

mrwarper wrote:
Cainntear wrote:
However, I concur with handling single and double line breaks as you say -- or as I interpret it.
I'm not thinking in terms of output formatting, but in terms of the semantics of where a question begins and ends. I personally prefer to think of activities that way, and let the formatting deal with itself. If there's a separate way of styling, that's fine too, but first and foremost for me is the conceptual content.
I am afraid it may be your turn to clarify then, for it is obvious that I am not having my brightest moment. Did you mean that for the code I wrote to be more clear, each question should be separated from the next with an empty line (double line break), and single line breaks, instead of "|", should separate options within a single multiple choice? If not:

What do you think was wrong exactly with semantics in what I wrote, and why? How would you have written it instead?

What I mean is about making it "semantic" in the sense that the file tells us the information, not the formatting. You said this:

However, I concur with handling single and double line breaks as you say -- or as I interpret it. That is newline = <br>, or </li><li> as appropriate, and such, and double breaks for paragraphs, right? I would probably not want to do it any other way, I definitely had a bad idea writing the 'code' in the first post like I did.


If you look at the likes of text2qti, the AMC-text format or the format used in various other tools, double breaks don't mean anything in terms of formatting, so not a paragraph. The double break delineates/delimits individual questions (or blocks of metadata).

Code: Select all

...
d) 93

11. Answer the
   following question
*a) Answer
b) nonsense
c) wibble

12. Which of these has two legs?
[*] a bird
[] a dog
[*] a human
[] a crocodile
[*] half a table

13. Next question...?
...

text2qti is used to make an import file (in QTI format) for virtual learning environments and learning management systems, so it doesn't concern itself with formatting at all -- that's for the VLE/LMS to deal with (although it allows the use of markdown where the Canvas LMS allows it -- tha guy who wrote it uses Canvas professionally so targeted it primarily at that.

In theory the same format could be used to import directly into anything (including the likes of your and my apps) without going through QTI as an intermediate step.

If I choose to render this as a numbered list of questions, each block between the double-breaks would end up being a <li></li> rather than <p></p>. Or maybe I stick them in a table so that I get columns to print out.
I try to think of my data in these format-agnostic ways.

In text2qti and most similar things, a single line break doesn't have any independent meaning -- instead it's having specific characters at the start of the line that counts. This means you can break a line if you need to to stop it getting too long -- see question 11 above (text2qti treats any line starting with space or tab as being a continuation of the previous line, and it replaces the newline and all initial space with a single space in the output).
1 x


Return to “General Language Discussion”

Who is online

Users browsing this forum: Google [Bot], Tumlare and 2 guests