My first attempt to create a plugin - a dismal failure :-)

My first attempt to create a plugin - a dismal failure :-)

by Dominique Bauer -
Number of replies: 0
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I'm not saying this would have been a useful plugin, but I wanted to do it just as a first try. I thought it would be easy.

My idea was to modify the Short Answer question and change the main tag of the input box from <input> to <textarea></textarea> so that the input box would be multi-line. I edited the renderer.php file and, after some trial and error, I quickly arrived at the expected result!

I was very excited, until I tried to create a separate plugin, not just edit the Short Answer question, because that's when I noticed that the word "shortanswer" appeared in 457 places in 124 files other than those in the directory "question\type\shortanswer", and I had no idea what to do.

I saw that the Short Math plugin was based on the Short Essay question, but it hardly helped me because I didn't understand the code.

So writing a new plugin now seems even more difficult than I imagined. Respect to programmers! For me, it looks like I still have a lot of learning on the way.

Average of ratings: -