--- db/prgsrc/db.cgi 2002/05/13 23:59:42 1.65 +++ db/prgsrc/db.cgi 2002/06/15 02:20:23 1.69 @@ -110,7 +110,7 @@ sub GetTourQuestions { my (@arr, @Questions); my ($sth) = $dbh->prepare("SELECT QuestionId FROM Questions - WHERE ParentId=$ParentId"); + WHERE ParentId=$ParentId order by Number"); $sth->execute; @@ -821,7 +821,8 @@ sub PrintTournament { } } else { my ($qnum) = GetQNum($dbh); - $output .= h2("Банк Вопросов: $qnum вопросов") . p . "\n"; + $output .= h2("Банк Вопросов: $qnum вопрос".&Suffix($qnum)) + . p . "\n"; } for ($i = 0; $i <= $#Tours; $i++) { @@ -1051,7 +1052,7 @@ sub PrintQuestion { $output .= &PrintField("Вопрос $qnum", $Question{'Question'}, $text); - if ($answer) { + if ($answer==1) { $output .= &PrintField("Ответ", $Question{'Answer'}, $text); @@ -1097,6 +1098,38 @@ sub PrintQuestion { $output .= &PrintField("Комментарии", $Question{'Comments'}, $text); } } + elsif ($answer==2) { + my $text=$Question{'Answer'}; + $text=~s/\n/