Re: some remarks to mod_survey

Joel Palmius <[email protected]> Tue, 6 Feb 2007 19:15:15 +0100 (CET)
Newsgroups gmane.comp.apache.mod-survey.general
Message-ID <[email protected]>
On Tue, 6 Feb 2007, Clemens Gruber wrote:

> Hi,
>
> we are using mod_survey now for some months and it is an amazing
> flexible tool. For instance it was - with your help, thanks! - possilble
> to create a multilanguage questionaire. Nevertheless there are some
> questions or remarks to make mod_survey still better.
>
> First some "cosmetic" things:

> - After filling out the last page, you submit the survey. Now the
> unlovely thing happends that you get a individual message (this is good
> ;-) but in an entire other design. I've used this suboptimal workaround:
> <SURVEY ... CONTINUE="http://my-last-page" REDIRECT="yes"> on the last
> page. So I have a customizable but static page, without the success or
> error message. Is there another way to use a template or an include
> directive to get the last page in an adapted design with the dynamic
> messages?

Hmm.. It's possible to set a cookie using a submit-time perl snippet in 
the last page. Then you could re-direct to a script to get a dynamic page. 
But that seems cumbersome. Isn't this good enough?

<SURVEY TITLE="hello">

   <TEXT NAME="test" CAPTION="test" />

   <SUBMIT VISIBLE="yes">
     <html>
     <head>
     <title>Success!!</title>
       <style>
         .good { color: #009900; }
       </style>
     </head>
     <body>
     <h1 class="good">Success!!</h1>
     You've managed to commit your data!! Wheee!!
   </SUBMIT>

</SURVEY>

You can also use a submit-time perl snippet to get dynamic contents:

<SURVEY TITLE="hello">

   <TEXT NAME="test" CAPTION="test" />

   <SUBMIT VISIBLE="yes">
     {|
       print "Hello";
     |}
   </SUBMIT>

</SURVEY>


> - It is a problem to use a dynamic footer. Even if you include a CUSTOM
> section after the last question, the submit button will ever be the last
> item in the sourcecode. How can I insert code after the submit button?

That's hard-coded, so within the survey you can't really do anything about 
it. If you want to change the footer, look in Survey/Slask.pm. There's a 
sub called htmlFoot() there, which only contains print statements and 
which should be easy to change without consequences.


> Next a remark relating to mandatory fields
>
> - The implementation of <CHOICE .. MUSTANSWER="yes"> is a problem. You
> get the message that an input is missing on the next page (btw. in a
> different design, is it customizable?). You have to go back (by browser
> function) and you have to search "by hand" the missing fields. Would it
> be possible to present the "normal" page with an additional text on top
> "mandatory fields are empty" and a message "pleas fill out" next the
> empty but mandatory fields? It would improve the usability for the
> mandatory fields a lot.
>
> Last a thing concerning data export:
>
> - On questions with <CHOICE ... OTHERFIELD="Other"> you can export data
> in one variable. But it would be nice to write the given alternatives in
> one variable and all answers typed in, in a second variable.

Concerning both these, initial code for it exists in the development 
branch. The work-around for the second issue can be managed in the 
exports: in several exports (among others the SPSS) you can choose to 
split the CHOICE variable into separate fields.

   // Joel

> Best regards
> Clemesn
>
> -- 
> Clemens Gruber (Dipl.-Psychologe)
>  Zentrum fuer Informationsmanagement
>  und virtuelle Lehre der Universitaet Osnabrueck (virtUOS)
>
> Schloss-Strasse 9, Raum E07, D-49074 Osnabrueck
>
> E-Mail:  [email protected]
> URL:     http://www.virtuos.uni-osnabrueck.de
>
> Telefon: (05 41) 969-6505 oder
>         (05 41) 969-6501 (Sekretariat)
> Fax:     (05 41) 969-16505
>
> Skickat av Clemens Gruber <[email protected]>
> till survey-discussion
>
Skickat av Joel Palmius <[email protected]>
till survey-discussion