Skip to main content

How to randomly extract questions

In the process of recruitment written examination and school examination, in order to prevent examinees from cheating each other due to the small seat spacing, the examiners usually have many questions, randomly assigned to candidates.

Next, let's explain how to randomly extract topics by one line of code.

1. Video demonstration

此处为语雀视频卡片,点击链接查看:如何随机抽取题目.mov

Video demonstration of random topic extraction

2. Create a question bank

First, create a question bank table, which includes the name of the test paper, the number of the test paper, and the title.

Question Bank form design

3. Enter the question bank data

Input data
Here, take five data entries as an example. You can add them yourself.

5 pieces of data have been entered

4. Use a line of code to randomly extract questions

Create a new oneExam paper 」The form contains the contents of the question bank and preparer basic information. After each question, add one or more lines of text for the examinees to answer the question.

Examination paper form design

The test paper number is randomly extracted with the code. Since there are five questions in the question bank created, the code is used.Math.floor(Math.random() * 5 + 1)Generates a random integer greater than or equal to 1 and less than 6.

The following code can be directly copied in the js panel,Note replace the Unique Identification field.

var num = Math.floor(Math.random() * 5 + 1);
this.$("组件的唯一标识").setValue(num)

Copy the code and replace the unique identifier

Then passData Linkage 」Associate the contents related to the number in the question bank one by one.

Set data linkage

When the Examinees enter the data table filling interface from the form link, the system will randomly select a test paper question from the question bank to the examinees.

YIDA in order to better optimize the content and quality of YIDA user manual, it takes you 3-5 minutes to fill in the document feedback questionnaire. The document feedback questionnaire is submitted anonymously, and the questionnaire information is only used for YIDA document experience feedback collection. Thank you for your support for YIDA!

Click here to fill in the questionnaire


-------------------- Get the latest information YIDA, welcome to follow US--------------------

This doc is generated using machine translation. Any discrepancies or differences created in the translation are not binding and have no legal effect for compliance or enforcement purposes.
Copyright © 2024钉钉(中国)信息技术有限公司和/或其关联公司浙ICP备18037475号-4