PDA

View Full Version : Creating a macro to mark correct answers on a quiz



AJohnson
02-16-2022, 02:01 PM
I am working on converting paper quizzes into a format that can be uploaded to our LMS. I have worked out a VBA code that already corrects all the formatting, the only part that I cannot figure out is how to take the line of text that has the correct answer(s) and find the corresponding lines above it and add an asterisk to the beginning of that line, then remove the line with the correct answer.

Here is how the document currently formatted:

Category: Cognitive Level/Understand, Question Type/Multiple Choice 1. Question stem listed here for traditional 4 answer multiple choice question.
A. Choice 1
B. Choice 2
C. Choice 3
D. Choice 4
ANS: B
~Rationale:

Category: Cognitive Level/Apply, Question Type/Select All That Apply 2. Question stem for a question that has 4-6 answer choices and students select all that apply.
A. Choice 1
B. Choice 2
C. Choice 3
D. Choice 4
E. Choice 5
F. Choice 6
ANS: A, C, E
~Rationale:


And this is what I need it to look like when answers have been marked:

Category: Cognitive Level/Understand, Question Type/Multiple Choice 1. Question stem listed here for traditional 4 answer multiple choice question.
A. Choice 1
*B. Choice 2
C. Choice 3
D. Choice 4
~Rationale:

Category: Cognitive Level/Apply, Question Type/Select All That Apply 2. Question stem for a question that has 4-6 answer choices and students select all that apply.
*A. Choice 1
B. Choice 2
*C. Choice 3
D. Choice 4
*E. Choice 5
F. Choice 6
~Rationale:

Any help with how I can do this with VBA is greatly appreciated!

arnelgp
02-16-2022, 06:44 PM
there is an easier off-the-shelf program for this (Schoolhouse Test V.5).
pm me if you need a free copy.

AJohnson
02-17-2022, 01:32 PM
Thank you, this looks like a decent program. I was able to access the free download when I searched the program, but it is not exporting it in the format I need.

arnelgp
02-17-2022, 08:56 PM
i have a program and it export to:

1. delimited text (Blackboard, Excel, etc)
2. Standard format text (Respondus) --> this is what you want (correct answers are marked with asterisk (*) in front).
3. GIFT format text (Moodle, Adobe Captiva)
4. Aiken format text (Moodle and other)
5. Aiken format text (modified)
the program conforms with LMS (in the US, i think).

kateSZ
05-23-2023, 01:16 AM
By accident I have found this article https://startup.info/the-one-stop-tool-for-building-online-quiz-kwiga-review/ for creating online quiz. I hope it helps.