Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /***
- * MULTIPLE CHOICE SINGLE ANSWERS
- * @type {[*]}
- */
- // Case: Single answer
- var item = [
- {
- showText: true,
- showImage: false,
- allowMultiple: true,
- question: 'What is the Pikachu number?',
- answers: [
- {text: '25'},
- {text: '50'},
- {text: '150'}],
- correct: 0 // If is multiple, must be validate than correct.length == 1
- }
- ];
- // Case: Multiple answer
- var item2 = [
- {
- showText: true,
- showImage: false,
- allowMultiple: true,
- question: '4+5 = ?',
- answers: [
- {text: '9'},
- {text: '(10-1)'},
- {text: '-1'}],
- correct: [0, 1]
- }
- ];
- // Case: Including images
- var item3 = [
- {
- showText: true,
- showImage: true,
- allowMultiple: true,
- question: '4+5 = ?',
- answers: [
- {text: '9', src: '3030303.png'},
- {text: '(10-1)', src: '3030302.png'},
- {text: '-1', src: '3030304.png'}],
- correct: [0, 1]
- }
- ];
- /***
- * MULTIPLE CHOICE WITH MULTIPLE ANSWERS
- * @type {[*]}
- */
- // Diferencias respecto a MULTIPLE CHOICE WITH SINGLE ANSWER
- // - correct no es un array, es un entero (que indica la posiciΓ³n del array).
- var item = [
- {
- showText: true,
- showImage: false,
- allowMultiple: true,
- question: 'What is the Pikachu number?',
- answers: [
- {text: '25'},
- {text: '50'},
- {text: '150'}],
- correct: 0 // If is multiple, must be validate than correct.length == 1
- }
- ];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement