Any help appreciated on a small perl project I need to write for
educator/teaching purposes. I have not programmed perl for some time, need
to get up to speed, maybe some kind souls hrere will help me on
this project? It looks to be a simple project, and I will start relearning
pearl, but any help appreciated!
I need to read and parse a simple text file (INPUT) containing multiple
choice quiz questions (with titles) and answers, and convert to a special
comma separated value (csv) format (for importing into a special
application). Here is a sample of a couple of questions from the input
file, and how it needs to be written to the output (csv) text file:
//INPUT plain vanilla text file of questions. Each question has a
//Title, a number for the question followed by a space, an optional
//img tag as seen below to specify an images for a question, and
//possible multiple choice answers, correct answer maked with *
//Might be a..b, a..c, a..d, or a..e possible number of choices.
Title:fibula bone
1. What bone is seen here?
[img:"/images/fibulahead.gif"]
*a. head of fibula,
b. tibia diaphysis,
c. sacrum bone,
d. hip bone,
Title:Sun color
2. What is the color of the sun?
a. red
*b. yellow
c. blue
//OUTPUT file needed after conversion program is written.
//Points and Difficulty always will be '1'. Hint and Feedback
//lines always will be blank as seen below. Correct answer for
//a question has Option,100 associated with it as seen here.
NewQuestion,MC,
Title,fibula bone,
QuestionText,Wh at bone is seen here?,
Points,1,
Difficulty,1,
Image,/images/fibulahead.gif,
Option,100,head of fibula,
Option,0,tibia diaphysis,
Option,0,sacrum bone,
Option,0,hip bone,
Hint,,,
Feedback,,,
NewQuestion,MC,
Title,Sun color,
QuestionText,Wh at is the color of the sun?,
Points,1,
Difficulty,1,
Option,0,red,
Option,0,yellow ,
Option,100,blue ,
Hint,,,
Feedback,,,
educator/teaching purposes. I have not programmed perl for some time, need
to get up to speed, maybe some kind souls hrere will help me on
this project? It looks to be a simple project, and I will start relearning
pearl, but any help appreciated!
I need to read and parse a simple text file (INPUT) containing multiple
choice quiz questions (with titles) and answers, and convert to a special
comma separated value (csv) format (for importing into a special
application). Here is a sample of a couple of questions from the input
file, and how it needs to be written to the output (csv) text file:
//INPUT plain vanilla text file of questions. Each question has a
//Title, a number for the question followed by a space, an optional
//img tag as seen below to specify an images for a question, and
//possible multiple choice answers, correct answer maked with *
//Might be a..b, a..c, a..d, or a..e possible number of choices.
Title:fibula bone
1. What bone is seen here?
[img:"/images/fibulahead.gif"]
*a. head of fibula,
b. tibia diaphysis,
c. sacrum bone,
d. hip bone,
Title:Sun color
2. What is the color of the sun?
a. red
*b. yellow
c. blue
//OUTPUT file needed after conversion program is written.
//Points and Difficulty always will be '1'. Hint and Feedback
//lines always will be blank as seen below. Correct answer for
//a question has Option,100 associated with it as seen here.
NewQuestion,MC,
Title,fibula bone,
QuestionText,Wh at bone is seen here?,
Points,1,
Difficulty,1,
Image,/images/fibulahead.gif,
Option,100,head of fibula,
Option,0,tibia diaphysis,
Option,0,sacrum bone,
Option,0,hip bone,
Hint,,,
Feedback,,,
NewQuestion,MC,
Title,Sun color,
QuestionText,Wh at is the color of the sun?,
Points,1,
Difficulty,1,
Option,0,red,
Option,0,yellow ,
Option,100,blue ,
Hint,,,
Feedback,,,
Comment