Quiz Components
<ArlinearQuiz> Component
Input Parameters
quizKey
String
The unique identifier for the quiz.
primaryKey
String
The primary key associated with the student. If empty, grades are not saved.
questionsPerPageOverride
Number
Control how many questions to show per page.
onSubmit
Function
A function to run when the user submits the quiz.
submission
Object
(Optional) If passing in a submission, it will show the corrected quiz with the student's inputs.
Example usage:
<ArlinearQuiz
quizKey="ba777045-7033-4701-b17b-da9e90dcd41e"
primaryKey="emily@school.com" // if empty, this does not save grades
questionsPerPageOverride={1} // control how many questions to show per page
onSubmit={submit}
submission={submission} // Note: if passing in a submission, it show the corrected quiz with student's inputs
/>
<ArlinearQuizWithResult>
Input Parameters
quizKey
String
The unique identifier for the quiz.
primaryKey
String
The primary key associated with the student. If empty, grades are not saved.
questionsPerPageOverride
Number
Control how many questions to show per page.
onSubmit
Function
A function to run when the user submits the quiz.
onTryAgain
Function
A function to run when the user clicks the "Try again" button at the end of the quiz.
Example usage:
/* Render Quiz & Displays results on quiz submit */
<ArlinearQuizWithResult
quizKey="ba777045-7033-4701-b17b-da9e90dcd41e"
primaryKey="emily@school.com" // if empty, this does not save grades
questionsPerPageOverride={1} // control how many questions to show per page
onSubmit={submit} // function to run onSubmit
onTryAgain={tryAgain} // function to run onTryAgain (at the end there is a "Try again button")
/>
Last updated