# This source code file is part of the "mod_survey" package.
#
# Copyright (C) 2004 Joel Palmius
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program (probably in a file named "LICENSE.txt" or the like);
# if not, write to:
#
# Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#!/usr/bin/perl
package Survey::Slask;
use strict;
use Survey::Document;
use Survey::Argument;
use Survey::Display;
use Survey::System;
use Survey::Submit;
use Survey::Admin;
use Survey::Language;
use Encode;
use Encode::Guess qw/latin1 utf8 ascii/;
sub VersionString
{
my ($style) = "style=\"color: #777799; font-weight: bold; text-decoration: none;\"";
my ($href) = "href=\"http://www.modsurvey.org/\"";
return "Mod_Survey v3.2.7-pre1 (testing)";
}
sub IsError
{
my ($crap, $obj) = @_;
my ($errname, $iserror);
if ($obj->Error())
{
$iserror = 1;
($crap, $errname) = split("::", $obj, 2);
($errname, $crap) = split("=", $errname, 2);
if ($errname eq "Submit")
{
if (defined($obj->{DOCUMENT}->{ "SUBMITERROR_" . $obj->{ERRORCODE} }))
{
my ($tagno) = $obj->{DOCUMENT}->{ "SUBMITERROR_" . $obj->{ERRORCODE} };
my ($raw) = $obj->{DOCUMENT}->GetTagParam($tagno, "RAW");
my ($realtagno) = $obj->{ERRORTAG};
# Parse dynamics
my ($caption) = $obj->{DOCUMENT}->GetTagParam($realtagno, "CAPTION");
my ($rowcaption) = $obj->{MATRIXWORKAROUND};
my ($tagnumber) = $realtagno;
my ($name) = $obj->{DOCUMENT}->GetTagParam($realtagno, "NAME");
my ($shortdesc) = $obj->{ERROR};
$raw =~ s/\$caption/$caption/g;
$raw =~ s/\$rowcaption/$rowcaption/g;
$raw =~ s/\$tagnumber/$tagnumber/g;
$raw =~ s/\$name/$name/g;
$raw =~ s/\$shortdesc/$shortdesc/g;
print $raw;
$obj->{ERRORHANDLED} = 1;
return $iserror;
}
}
print "
\n";
print " "
. lprint("Did the above not help you ? You can find documentation and examples for the mod_survey system at");
print " http://www.modsurvey.org.\n";
print " " . lprint("There you can also find instructions for joining the survey-discussion mail list, ");
print " " . lprint("which might provide some support") . ".";
print " "
. lprint("You can also check the")
. " ";
print lprint("local documentation") . ".