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
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!
-------------------- Get the latest information YIDA, welcome to follow US--------------------