Testing instructions:
Automatic tests:
Run unit tests for /lib/formslib.php (class core_formslib_testcase)
Manual checking that all calls of function repeat_elements working correctly with new interface (optional, do as much as you want)
Preparation:
0. Log in as editing teacher.
1. Create 1 course with the name ‘course1’.
2. Go to 'course1'
3. Go to 'Question bank'
Test for question "Multiple choice":
0. Press button 'Create a new question ...'
1. Choose 'Multiple choice'
2. Press button 'Add'
3. Make sure you can see a list of 'Answers' and button 'Add 3 choice(s) to form'
4. Press button 'Add 3 choice(s) to form'
5. Make sure you can see 3 new answers
6. Make sure you can see a list of 'Multiple tries' and button 'Add 1 hint(s) to form'
7. Press button 'Add 1 hint(s) to form'
8. Make sure you can see a new hint
Test for question "Matching":
0. Press button 'Create a new question ...'
1. Choose 'Matching'
2. Press button 'Add'
3. Make sure you can see a list of 'Answers' and button 'Add 3 choice(s) to form'
4. Press button 'Add 3 choice(s) to form'
5. Make sure you can see 3 new answers
6. Make sure you can see a list of 'Multiple tries' and button 'Add 1 hint(s) to form'
7. Press button 'Add 1 hint(s) to form'
8. Make sure you can see a new hint
Test for question "Short answer":
0. Press button 'Create a new question ...'
1. Choose 'Short answer'
2. Press button 'Add'
3. Make sure you can see a list of 'Answers' and button 'Add 3 choice(s) to form'
4. Press button 'Add 3 choice(s) to form'
5. Make sure you can see 3 new answers
6. Make sure you can see a list of 'Multiple tries' and button 'Add 1 hint(s) to form'
7. Press button 'Add 1 hint(s) to form'
8. Make sure you can see a new hint
Test for question "Numerical":
0. Press button 'Create a new question ...'
1. Choose 'Numerical'
2. Press button 'Add'
3. Make sure you can see a list of 'Answers' and button 'Add 3 choice(s) to form'
4. Press button 'Add 3 choice(s) to form'
5. Make sure you can see a 3 new answers
6. Make sure you can see a list of 'Multiple tries' and button 'Add 1 hint(s) to form'
7. Press button 'Add 1 hint(s) to form'
8. Make sure you can see a new hint
9. Make sure you can see a list of 'Units' and button 'Add 2 unit(s) to form'
10. Press button 'Add 2 unit(s) to form'
11. Make sure you can see 2 new units
Test for question "Calculated":
0. Press button 'Create a new question ...'
1. Choose 'Calculated'
2. Press button 'Add'
3. Make sure you can see a list of 'Answers' and button 'Add 3 choice(s) to form'
4. Press button 'Add 3 choice(s) to form'
5. Make sure you can see 3 new answers
6. Make sure you can see a list of 'Multiple tries' and button 'Add 1 hint(s) to form'
7. Press button 'Add 1 hint(s) to form'
8. Make sure you can see a new hint
9. Make sure you can see a list of 'Units' and button 'Add 2 unit(s) to form'
10. Press button 'Add 2 unit(s) to form'
11. Make sure you can see 2 new units
Test for question "Calculated multichoice":
0. Press button 'Create a new question ...'
1. Choose 'Calculated multichoice'
2. Press button 'Add'
3. Make sure you can see a list of 'Answers' and button 'Add 3 choice(s) to form'
4. Make sure you can see a list of 'Multiple tries' and button 'Add 1 hint(s) to form'
4. Press button 'Add 3 choice(s) to form'
5. Make sure you can see 3 new answers
6. Make sure you can see a list of 'Multiple tries' and button 'Add 1 hint(s) to form'
7. Press button 'Add 1 hint(s) to form'
8. Make sure you can see a new hint
Test for question "Calculated simple":
0. Press button 'Create a new question ...'
1. Choose 'Calculated simple'
2. Press button 'Add'
3. Make sure you can see a list of 'Answers' and button 'Add 3 choice(s) to form'
4. Press button 'Add 3 choice(s) to form'
5. Make sure you can see 3 new answers
6. Make sure you can see a list of 'Multiple tries' and button 'Add 1 hint(s) to form'
7. Press button 'Add 1 hint(s) to form'
8. Make sure you can see a new hint
9. Make sure you can see a list of 'Units' and button 'Add 2 unit(s) to form'
10. Press button 'Add 2 unit(s) to form'
11. Make sure you can see 3 new units
Test for question "Drag and drop into text":
0. Press button 'Create a new question ...'
1. Choose 'Drag and drop into text'
2. Press button 'Add'
3. Make sure you can see a list of 'Choices' and button 'Add 3 choice(s) to form'
4. Press button 'Add 3 choice(s) to form'
5. Make sure you can see 3 new answers
6. Make sure you can see a list of 'Multiple tries' and button 'Add 1 hint(s) to form'
7. Press button 'Add 1 hint(s) to form'
8. Make sure you can see a new hint
Test for question "Drag and drop markers":
0. Press button 'Create a new question ...'
1. Choose 'Drag and drop markers'
2. Press button 'Add'
3. Make sure you can see a list of 'Markers' and button 'Add 3 marker(s) to form'
4. Press button 'Add 3 marker(s) to form'
5. Make sure you can see 3 new markers
6. Make sure you can see a list of 'Drop zones' and button 'Add 3 drop zone(s) to form'
7. Press button 'Add 3 drop zone(s) to form'
8. Make sure you can see 3 new drop zones
9. Make sure you can see a list of 'Multiple tries' and button 'Add 1 hint(s) to form'
10. Press button 'Add 1 hint(s) to form'
11. Make sure you can see a new hint
Test for question "Drag and drop image":
0. Press button 'Create a new question ...'
1. Choose 'Drag and drop image'
2. Press button 'Add'
3. Make sure you can see a list of 'Markers' and button 'Add 3 marker(s) to form'
4. Press button 'Add 3 marker(s) to form'
5. Make sure you can see 3 new markers
6. Make sure you can see a list of 'Drop zones' and button 'Add 3 drop zone(s) to form'
7. Press button 'Add 3 drop zone(s) to form'
8. Make sure you can see 3 new drop zones
9. Make sure you can see a list of 'Multiple tries' and button 'Add 1 hint(s) to form'
10. Press button 'Add 1 hint(s) to form'
11. Make sure you can see a new hint
Test for question "Embedded answers":
0. Press button 'Create a new question ...'
1. Choose 'Embedded answers'
2. Press button 'Add'
3. Make sure you can see a list of 'Multiple tries' and button 'Add 1 hint(s) to form'
4. Press button 'Add 1 hint(s) to form'
5. Make sure you can see a new hint
Test for question "Random short-answer matching":
0. Press button 'Create a new question ...'
1. Choose 'Random short-answer matching'
2. Press button 'Add'
3. Make sure you can see a list of 'Multiple tries' and button 'Add 1 hint(s) to form'
4. Press button 'Add 1 hint(s) to form'
5. Make sure you can see a new hint
Test for question "Select missing words question":
0. Press button 'Create a new question ...'
1. Choose 'Select missing words question'
2. Press button 'Add'
3. Make sure you can see a list of 'Choices' and button 'Add 3 choice(s) to form'
4. Press button 'Add 3 choice(s) to form'
5. Make sure you can see 3 new choices
6. Make sure you can see a list of 'Multiple tries' and button 'Add 1 hint(s) to form'
7. Press button 'Add 1 hint(s) to form'
8. Make sure you can see a new hint