print "
";
print start_form (-name=>'makequiz', -method=>'POST', -action=>"http://ist221.nsm.tridenttech.edu/perl/gradequiz.cgi");
chdir("/perl/web");
open FILE, "$file" || die "Cannot open $file: $!";
while ( ";
}elsif ($type =~ m/q/i) { # ** CHECKS FOR QUESTION LINE & PRINTS QUESTION
$questionno++;
print "$questionno. $value ";
# ************************* END SUBROUTINE MAKEEXAM
print end_html;
";
print "
";
push(@allquestions, $value);
}elsif ($type =~ m/a/i) { # ** CHECKS FOR ANSWER LINE
@answers = split (/`\s*/, $value);
$anslength = @answers; # ** LENGTH OF @ANSWERS
push(@allanswers, $value);
}elsif ($type =~ m/s/i) { # ** CHECKS FOR SELECTION LINE
$buttonname = $type . $questionno;
push(@allselections, $value);
%selections = split (/`\s*/, $value);
@options = keys (%selections);
if ($anslength > 1) { # ** DETERMINES TO USE RADIO OR CHECKBOX
print "
";
print checkbox_group(-name=>$buttonname, -values=>\@options, -linebreak=>'true', -labels=>\%selections);
}else {
print "
";
print radio_group(-name=>$buttonname, -values=>\@options, -linebreak=>'true', -labels=>\%selections, -default=>'-');
}
print "
";
}elsif ($type =~ m/e/i) {# ** CHECKS FOR EXPLAINATION LINE
push (@explain, $questionno, $value);
} # END ELSIF STATEMENTS
} # ** END WHILE STATEMENT
close (FILE);
print "