#!/usr/local/bin/perl
##############################################################
# This was written by Kevin Epperson for credit in
# INFS-5510 at the Univesity of Colorado at Boulder. I can
# be reached for any question you might have via e-mail at
# epperson@colorado.edu or epperson@us1.ibm.com
##############################################################
# Get initial information from user
print "This program will assist in setting a survey for you.\n";
print "Please enter the title of your survey:\n";
$title = \n";
print NEWSURVEY "Please read the following questions and answer them to the best of your abilities. If there is a question you have no opinion on please choose N/A. When you have finished the survey click on the \"Submit Survey\" button to submit \n";
print NEWSURVEY "your answers. If you would like to clear your answers at any time click the \"Clear Survey\" button. \n";
print NEWSURVEY "\n\n";
##############################################################
# Gets question type and question text for 1 to numquest
# Write questions to file
for ($x = 1; $x <= $numquest; $x++) {
print "Would you like question $x to be a (Y)es/No question or\n";
print "a (S)caler question? Please enter (Y) or (S).\n";
$q_type = $q_text \n";
print NEWSURVEY "Please rate on a scale of 1 to 10. With 1 being least important and 10 being most important.\n";
print NEWSURVEY "If you have no opinion on the question please choose N/A.\n";
print NEWSURVEY " \n";
print NEWSURVEY "$q_text \n";
print NEWSURVEY "Please answer the question either Yes or No. If you have no opinion on the question please choose N/A\n";
print NEWSURVEY "$title
Question $x
\n";
print NEWSURVEY " \n";
print NEWSURVEY "Least \n";
print NEWSURVEY "
ImportantModerately \n";
print NEWSURVEY "
ImportantMost \n";
print NEWSURVEY "
Important1 \n";
print NEWSURVEY "2 \n";
print NEWSURVEY "3 \n";
print NEWSURVEY "4 \n";
print NEWSURVEY "5 \n";
print NEWSURVEY "6 \n";
print NEWSURVEY "7 \n";
print NEWSURVEY "8 \n";
print NEWSURVEY "9 \n";
print NEWSURVEY "10 \n";
print NEWSURVEY "N/A \n";
print NEWSURVEY "Question $x
\n";
print NEWSURVEY "
Yes \n";
print NEWSURVEY "No \n";
print NEWSURVEY "N/A \n";
print NEWSURVEY "
\n"; print NEWSURVEY "
\n"; print NEWSURVEY " | \n"; print NEWSURVEY " |