#!/usr/bin/perl -w use CGI qw(:cgi-lib); #require "cgi-lib.pl"; &ReadParse; $answer1 = $in{'rq2'}; $player = $in{'plyrName'}; $beginscore = 40; $numcorrect = 0; $totalquest = 4; @wronganswers = (); if($answer1 eq undef){ &pgeErrTop(); &errmessage(); &pgeErrBottom(); } elsif($player eq undef){ &pgeErrTop(); &errmessage(); &pgeErrBottom(); } if($answer1 ne undef && $player ne undef){ if($answer1 eq "780"){ $numcorrect = 1; } elsif($answer1 ne "780"){ $beginscore = $beginscore - 10; $q1 = "Question 1 from Speech 2"; push(@wronganswers, $q1); } if($beginscore == 40){ &pgeTop(); print "

\n"; print "

Well done $player.

\n"; print "You completed the question for Speech 2. You gave $numcorrect correct response out of one question.\n"; $gameresults = "1948 campaign results for $player for Speech 2. $player gave $numcorrect correct responses out of one question.\n"; print "

To send a copy of this report to your teacher, please enter:

Name of Class:

Teacher's E-Mail Address:
\n"; &pgeBottom(); } if($beginscore < 40){ &pgeTop(); print "
Hello $player.

\n"; print "You completed the question for Speech 2. You gave an incorrect response to the question.\n"; $gameresults = "1948 campaign results for $player for Speech 2. $player gave an incorrect response to the question.\n"; print "

\n"; print "To correct your incorrect response or to review the speech and question press the BACK button on your browser.

\n"; print "

To send a copy of this report to your teacher, please enter:

Name of Class:

Teacher's E-Mail Address:
\n"; &pgeBottom(); } } sub errmessage { print "

Error

        The question set is incomplete.

Please:

1) Press the back button on your browser to return to the question set 2) Complete any unanswered questions 3) Fill in your name 4) Press the Send button

Thank you.

\n"; } sub pgeErrTop { print "Content-type: text/html\n\n"; print " Results\n"; print "\n"; print "\n"; } sub pgeErrBottom { print "\n"; print "\n"; } sub pgeTop { print "Content-type: text/html\n\n"; print " Results\n"; print "\n"; print "\n"; print "\n"; print "

results

\n"; print "

\n"; } sub pgeBottom { print "\n"; print "\n"; print "\n"; }