Re: Strange survey input
Joel Palmius <[email protected]> Fri, 7 Apr 2006 14:40:31 +0200 (CEST)
| Newsgroups | gmane.comp.apache.mod-survey.general |
|---|---|
| Message-ID | <[email protected]> |
Thanks for patch. :-) The basic thing is sound, and I will cut and paste some things from your patch to implement an equivalent. For some reason it seems the patch is in reverse though, and the lprint() should only be used for hardcoded constants (it's the translation functionality). The DTD is horribly out of date. It was written for like 3.0.4 and has not been updated since. Better look in the syntax reference. // Joel On Wed, 5 Apr 2006, George Clark wrote: > ** Reply to message from Joel Palmius <[email protected]> on Wed, 5 Apr 2006 > 12:25:47 +0200 (CEST) > > > Hi Joel, > >> The 999 thing is probably a session timeout. > > Thanks, that must explain what I've been seeing. > >> The CUSTOM mustanswer thing.. Currently, I don't see any way to modify >> that error message. > > I did a bit of hacking on the Custom.pm. It was pretty simple to add a new > parameter MUSTMSG. In the must answer processing, I test if MUSTMSG exists and > if it does, I supply it instead of the generic error. It was only a couple of > lines to change. It all seems to work, but I may have missed something. > Would something like this be in line with your plans for mod_survey? > > mod_survey # diff /usr/lib/mod_survey/Survey/Component/Custom.pm ~gac/Custom.pm > 39c39 > < ("ESCAPED", "VARIABLES", "NUMERICAL", "MUSTANSWER", "MUSTMSG", > "ILLEGALVAL",); > --- >> ("ESCAPED", "VARIABLES", "NUMERICAL", "MUSTANSWER", "ILLEGALVAL",); > 54d53 > < $self->{"CUSTOM_MUSTMSG"} = ""; > 264,274c263,264 > < my ($mmsg) = $doc->GetTagParam($tagno, "MUSTMSG"); > < if ($mmsg ne "") > < { > < $sub->{ERROR} = lprint($mmsg); > < $sub->{ERRORCODE} = 2; > < } > < else > < { > < $sub->{ERROR} = lprint("A CUSTOM question must be > answered."); > < $sub->{ERRORCODE} = 99; > < } > --- >> $sub->{ERROR} = lprint("A CUSTOM question must be answered."); >> $sub->{ERRORCODE} = 99; > > > Note that the CUSTOM tag does not seem to be fully defined in the dtd file - > survey-v3.0.0.dtd. However, I don't know much about what is required for a > dtd, so is it significant that the CUSTOM tags are not defined there? > > Thanks, > George > Skickat av "George Clark" <[email protected]> > till survey-discussion > Skickat av Joel Palmius <[email protected]> till survey-discussion