Batch generation of calculation problems

 QuizGenerator

おはようございます。QuizGenerator作り出しッペの西村です。 今回は、Create calculation problems at once with QuizGeneratorMethods.

Let's make a question file for QuizGenerator.

SCORMI thought about writing an article about how to make teaching materials of SCORM format, but it is quite difficult to make SCORM format teaching materials from scratch. So, this time, I'd like to try to generate QuizGenerator question files automatically.(If I made it from scratch, it wouldn't be appropriate for an article on this site.)

Create with JavaScript

To make a problem file in one go, you can use Excel, PHP, Python, etc., but it's better to do it easily in a browser, so this time we'll try making it in JavaScript.

What is a calculation problem?

A calculation problem is one in which you are asked to answer the result of a mathematical equation, but we don't want to make it too complicated, so in this case we will use a problem in which two numbers are connected by one of the symbols +-✕. We will also adjust the difficulty level by specifying the range of the two numbers.

Create a function

計算問題を生成する関数を作ります。 1問分のデータを作る関数をmakeQuiz(min,max,op)とし、n問分作る関数をmakeQuizN(min,max,op,n)とします。 makeQuizNの引数は、それぞれ以下の通りです。
  • min: lower limit of values: specified as an integer
  • max: Upper limit of values: as an integer
  • op: type of operator: specified by one of "+", "*".
  • n: number of questions: specify a number greater than or equal to 1
  • The code is as follows

    Turn on the UI

    Vue and React are very popular these days, but let's try jQuery.

    It's done!

    Number of questions : Minimum : Max : operator:    

    Let's go public!

    You can use the created teaching material file in QuizGenerator'sconversion screenYou can upload and publish to

    Sign me up for the learningBOX!

    You can register QuizGenerator as a learning tool in your learningBOX, where you can assign it only to the learners you specify and keep a record of their learning.

    Next Article.

    This time, I made one specializing in addition and multiplication, but since it is more convenient to have subtraction and division, I will make it include all four arithmetic operations. Also, since it's a calculation problem, I'm planning to make it so that you can choose not only a choice, but also a descriptive question. After that, I plan to write an article that is a little more similar to SCORM.

    Summary

    今回は、javaScriptでQuizGeneratorの問題ファイルを作りました。QuizGeneratorはテキストファイルで問題を作成できるので、JavaScriptに限らすExcelやなにかしらのプログラミング言語を使うことで、既存コンテンツをSCORM教材化したり、一定のルールに基づいて問題を大量生成できます。なにかを作るにあたって、1から全部自分で作るのではなく、既存の仕組みとつながるものにすることで、最小限の労力で最大の成果を出せます。再利用していきたいですね! 今回作成したソースコードについては、完全版をGitHubPlease feel free to use it as it is open to the public.