Actions

Question type - Long free text/sl: Difference between revisions

From LimeSurvey Manual

(Created page with "{{QS:time_limit/sl}}")
(Created page with "{{QS:time_limit_action/sl}}")
Line 32: Line 32:
{{QS:time_limit/sl}}
{{QS:time_limit/sl}}


{{QS:time_limit_action}}
{{QS:time_limit_action/sl}}


{{QS:time_limit_disable_next}}
{{QS:time_limit_disable_next}}

Revision as of 20:34, 5 September 2013

Kratek opis

Ta tip vprašanja zbira odgovor preko večjega polja za besedilo.

Glavne nastavitve

Obvezno

Opis

Ta možnost skrbnikom ankete omogoča, da od svojih anketirancev zahtevajo, da odgovorijo na določena anketna vprašanja. Če na obvezna vprašanja ne odgovorijo, anketiranci ne bodo mogli nadaljevati. Če imate vprašanje z več podvprašanji in zahtevate odgovor le na določena podvprašanja, uporabite atribut minimalni odgovor, ki se nahaja pod zavihkom Logika.

Template:Opomba


Razpoložljive možnosti

  • Vklopljeno - na vprašanje je treba odgovoriti, preden lahko udeleženec nadaljuje na naslednjo stran - možnost odgovora 'Brez odgovora' ni nikoli prikazana.
  • Soft - Če na vprašanje ni odgovorjeno, se ob poskusu nadaljevanja prikaže opozorilo naslednja stran - vendar se lahko udeleženec odloči, da opozorilo prezre in nadaljuje. Upoštevajte, da je možnost 'Brez odgovora' še vedno prikazana (če je aktivirana v nastavitvah predstavitve ankete)
  • Izklopljeno (privzeto) - Vprašanje lahko ostane brez odgovora


Preverjanje (z uporabo regularnih izrazov) (preg_validation)

Opis

Ta možnost vam omogoča, da določite regularni izraz, s katerim lahko potrdite vse dele vprašanja.

Če vrednost katerega koli vprašanja ali podvprašanja ne izpolnjuje zahtev za preverjanje veljavnosti, bo barva ozadja polja za vnos besedila spremenjena v rdečo, tako da lahko uporabniki zlahka vidijo, katere dele vprašanja je treba popraviti. Tako lahko opravite preverjanje na strani. Na ta način vam 'ne bo treba čakati, da uporabnik klikne na gumb za oddajo, da potrdi zadevno vprašanje.

'Veljavne vrednosti

  • Vsak veljaven regularni izraz

Primer


QS:Defaults/sl


Pogoj (prej "Enačba ustreznosti")

Opis

Če je rezultat pogoja »1« ali »true«, je vprašanje v kontekstu ankete »relevantno«, torej se prikaže anketirancu. Če ne, je vprašanje skrito. Vsako anketno vprašanje vam omogoča, da določite enačbo pomembnosti. Ta funkcija je naslednica pogojev in podpira veliko bolj zapleteno pogojno logiko.

Označevanje sintakse

Kadarkoli shranite pogoj, je ovrednoten in sintaktično poudarjen. Morebitne napake bodo označene z barvami, da jih boste lahko hitro odkrili in odpravili.

 Hint: Če želite preveriti, ali so vsi pogoji v vaši anketi pravilno uporabljeni, preberite o naši funkciji prikaži logično datoteko.


Veljavne vrednosti

  • Kateri koli pogoj, ki uporablja sintakso ExpressionScript brez okoliških zavitih oklepajev.

Primeri

Tu so dobri primeri označevanja sintakse.


Napredne nastavitve

Širina vnosnega polja (text_input_width)

Opis

Ta atribut nastavi širino polj za vnos besedila ("ovija" polj za vnos besedila). V polje za vnos vnesemo odgovor na (pod)vprašanje. Če je vrednost širine dovolj visoka, se polje za vnos besedila prikaže v naslednji vrstici. Upoštevajte, da ta možnost ne nastavi velikosti vnosa ali širine celotnega stolpca!

Razpoložljive možnosti

  • Privzeto: če je izbrano, bo temu atributu dodeljena privzeta vrednost tako, da sta oznaka in njeno ustrezno polje za vnos besedila v isti vrstici. Če je na primer širina polja za vnos besedila 41 %, bo vrednost širine polja za vnos besedila vrednost, ki omogoča, da sta oznaka in polje za vnos v isti vrstici (v tem primeru 58 %). Če bi bila širina polja za vnos besedila višja od 58 %, bi bilo polje za vnos besedila prikazano v naslednji vrstici.
  • 8%; 17 %...92% , 100 %: večja kot je izbrana vrednost, večja je širina polja za vnos besedila.

Primer

  • Če želite, da se vnosni del prikaže pod podvprašanjem/oznako, na spustnem seznamu izberite možnost 100 %.



Prikaži vrstice (display_rows)

Opis

Nastavi število vrstic, ki so prikazane brez uporabe drsnega traku za preverjanje celotne vsebine. Če je več vrstic, kot je navedeno v tem polju, se prikaže drsni trak. Privzeta vrednost za "Vrsta vprašanja z dolgim prostim besedilom" je 5, medtem ko je za "Vrsta vprašanja z ogromnim prostim besedilom" 30.

'Veljavne vrednosti

  • Kakršno koli pozitivno celo število, večje od 0



Vedno skrij to vprašanje (skrito)

Opis

Če je omogočeno, bo vprašanje vedno skrito – ne bo prikazano udeležencem ankete. To funkcijo je mogoče uporabiti v naslednjih scenarijih:

  • Če želite vprašanje vnaprej izpolniti z URL-jem in ne želite, da se prikaže na zaslonu. To preglasi vse pogoje, uporabljene v anketi, ker zadevno vprašanje sploh ne bo vdelano na stran.
  • Če želite sproti shraniti ali izračunati vrednost prek ExpressionScript - Presentation.
Opomba: Pogosta vrsta vprašanja, ki se uporablja s to funkcijo, je Equation.

'Razpoložljive možnosti

  • Vklopljeno
  • Izklopljeno (privzeto)



Največje število znakov (maximum_chars)

Opis

To vam omogoča, da nastavite največje število znakov, ki jih lahko vnesete za besedilno vprašanje. Vnos vrednosti, na primer 20, pomeni, da udeleženec ne more vnesti več kot 20 znakov.

'Veljavne vrednosti

  • Katera koli cela vrednost nad 0



Vstavi prelom strani v pogledu za tiskanje (page_break)

Opis

Ta atribut je aktiven le, ko dejansko natisnete anketo iz »Pogleda za tiskanje«. Vsili prelom strani pred vprašanjem.

Razpoložljive možnosti

  • Vklopljeno
  • Izklopljeno (privzeto)


Časovna omejitev (time_limit)

Opis

Nastavitev atributa time_limit za vprašanje bo povzročila, da bo odštevalnik začel odštevati takoj, ko se to vprašanje/stran naloži. Po izteku odštevalnika se bo vprašanje samodejno premaknilo na naslednjo stran ali pa bo postalo samo za branje.

'Veljavne vrednosti

  • Katero koli pozitivno celo število

Primer

Nastavite na 240 za odštevanje od 4 minut (240 sekund).


<onlyinclude>

Dejanje časovne omejitve (time_limit_action)

Opis


Nastavi dejanje, ki se izvede, ko time_limit poteče. Privzeto je dejanje za časovno omejitev »Opozori in pojdi naprej«, kar pomeni, da bo sistem izdal kratko opozorilo, da je časovna omejitev potekla, preden shrani vprašanje in dejansko samodejno klikne »Naprej >>«. Nadomestne možnosti so:

  • »Naprej brez opozorila«, ki samodejno klikne gumb »Naprej >>«, ko se časovnik konča, vendar brez kakršnega koli opozorilnega sporočila.
  • »Samo onemogoči«, ki onemogoči spremembe v vprašanju, tako da udeleženec ne more ničesar spremeniti, vendar samodejno ne klikne gumba »Naprej >>«.

Ta nastavitev je uporabna le, če je aktivirana splošna nastavitev časovna omejitev.

'Razpoložljive možnosti

  • Opozori in pojdi naprej (privzeto): udeleženca bo opozoril, da je čas potekel, nato pa kliknil gumb Naprej
  • Nadaljuj brez opozorila: takoj kliknil Naslednji gumb po poteku časovne omejitve
  • Samo onemogoči: onemogoči odgovor po poteku časovne omejitve, vendar ne bo samodejno kliknil naprej


Dodatne informacije


  Pozor : Če je vprašanje obvezno ali je vprašanje v skupini obvezno, bo ustvarjena zanka JavaScript, če na obvezno vprašanje(a) ni odgovor(a). Posledično se bo na zaslonu izpisala napaka, da določena vprašanja niso bila izpolnjena, kar bo sprožilo osvežitev strani.
Namesto da bi se zanašali na obvezna vprašanja, lahko uporabite izraze (preberite več o vprašanju in podvprašanju validacijskih enačbah), da uporabnik ne polja za odgovore pustite prazna. Če si želite ogledati, kako delujejo validacijske enačbe, preverite naslednji primer.



V primeru, da želite uporabiti časovnik za skupino vprašanj, aktivirajte način anketiranja po skupinah, nastavite vprašanje za uporabo funkcije časovne omejitve in izberite možnost opozorila in nadaljevanja (privzeto) kot dejanje časovne omejitve. Ko poteče časovnik za vprašanja, se anketa premakne na naslednjo stran.


Kategorija:Nastavitve vprašanjKategorija:Možnosti časovnika vprašanj


Time limit disable next (time_limit_disable_next)

Description

It allows disabling the "next" button while a time_limit countdown is occurring. Normally, even if the time limit countdown is active, if the participant wants to click "Next" and move on to the next question or question group, they can simply click on the "Next" button (thus cutting short the time spent on the question or question group). By activating this function, the next button will appear greyed out and will not be available until the countdown timer has finished.

This settings is only applicable if the general time limit setting is activated.

Available options

  • On - The "Next" button will be disabled until the time limit countdown is complete.
  • Off (default)
Note: If your survey uses the group by group format, this function applies to the whole group this question belongs to.



Time limit disable prev (time_limit_disable_prev)

Description

It allows disabling the "previous" button while a time_limit countdown is occurring. Normally, even if a time limit countdown is active, if the participant wants to click on "Previous" and move to the previous question or question group, they can simply click on the "Previous" button (thus cutting short the time spent on the question or question group). By activating this function, the previous button will appear greyed out and will not be available until the countdown timer has finished.

This settings is only applicable if the general time limit setting is activated.

Available options

  • On - the "Previous" button will be disabled until the time limit countdown is complete.
  • Off (default)
Note: If your survey uses the group by group format, this function applies to the whole group this question belongs to.



Time limit countdown message (time_limit_countdown_message)

Description

Write in this field the text message you wish to be displayed in the countdown timer during the countdown. This setting is applicable only if the general time limit setting is activated. If nothing is written, the the field will use the default value: "Time remaining".



Time limit timer CSS style (time_limit_timer_style)

Description

It allows (and overrides the default) css styling used to display the countdown timer. The default style value for this attribute will be used if it does not exist, which is: 'width: 150px; margin-left: auto; margin-right: auto; border: 1px solid #111; text-align: center; background-color: #EEE; margin-bottom: 5px; font-size: 8pt;'.

Any text entered into this attribute will overwrite the entire default css style, so you should ensure that care is taken when entering a value for this attribute. A simple way to hide this is to copy the default style into this attribute and add 'display: none;' to the end.

This settings is only applicable if the general time limit setting is activated.



Time limit expiry message display time (time_limit_message_delay)

Description

This attribute sets how many seconds the time_limit_message is displayed before the time_limit_action occurs. If this attribute is not set, it defaults to a value of 1 (1 second).

This settings is only applicable if the general time limit settings is activated.

Example

time_limit_message_delay: 5 = the message displays for 5 seconds



Time limit expiry message (time_limit_message)

Description

This is the text of the message that appears to the participant when the time_limit has expired. By default, this message is "Your time to answer this question has expired". If the time_limit_action attribute is set to "Move on without warning" this message is not displayed. You can set the CSS style for this text in the time_limit_message_style attribute (see below).

This settings is only applicable if the general time limit settings is activated.

Example

time_limit_message: The time limit on answering this question is now up.



Time limit message CSS style (time_limit_message_style)

Description

It allows (and overrides the default) css styling used to display the time limit message. The default style value for this attribute will be used if it does not exist, which is: 'top: 10px; left: 35%; width: 30%; height: 60px; padding: 16px; border: 8px solid #555; background-color: white; z-index: 1002; text-align: center; overflow: auto'.

Any text entered into this attribute will overwrite the entire default css style, so you should ensure that care is taken when entering a value for this attribute. It is strongly recommended that you re-use the z-index value, or that, at least, the z-index value is higher than that used for the time_limit_warning_message_style attribute (which defaults to 1001).

Example

Set to: top: 10px; left: 35%; width: 30%; height: 60px; padding: 16px; border: 8px solid #555; background-color: black; color: white; z-index: 1010; text-align: center; overflow: auto



Time limit warning message timer (time_limit_warning)

Description

With the help of this attribute, you can set the time (in seconds) when the time_limit_warning_message will be displayed before the time limit expires. Setting a value for this attribute activates the time limit warning message.

This settings is only applicable if the general time limit settings is activated. This setting also exists for a second warning message.

Example

If you set this to '20', then the time limit warning message will appear 20 seconds before the time limit countdown reaches zero.



Time limit warning message display time (time_limit_warning_display_time)

Description

It sets for how long the time_limit_warning_message is displayed before it is removed/hidden from the screen. By default, if the time_limit_warning_message appears, it will remain visible until the countdown timer has completed the countdown. If a value greater than zero is introduced in this field, the message will be hidden after that many seconds.

This setting is applicable only if the general time limit setting is activated. This setting also exists for a second warning message.

Example

time_limit_warning_display_time: 10 = The time limit warning message will disappear 10 seconds after its moment of appearance.



Time limit warning message (time_limit_warning_message)

Description

If set up, it displays the text of the warning message which is displayed for a fixed period of time before a time limit expires. The default text is "Your time to answer this question has nearly expired. You have {TIME} remaining." {TIME} is replaced by a formatted description which represents the amount of time left (i.e. "30 seconds", "1 minute or 5 seconds"). This message only appears if the time_limit_warning attribute exists. You can set from the time_limit_warning attribute when the message (time_limit_warning_message) appears.

This question attribute is only applicable if the time limit setting is activated and you set some text in the time limit warning message field. This setting also exists for a second warning message.

Example

Attention: In {TIME} the time limit to answer question will expire.



Time limit warning CSS style (time_limit_warning_style)

Description

It allows (and overrides the default) css styling used to display the time limit warning message. The default style value for this attribute will be used if it does not exist, which is: 'top: 10px; left: 35%; width: 30%; height: 60px; padding: 16px; border: 8px solid #555; background-color: white; z-index: 1001; text-align: center; overflow: auto'.

Any text entered into this attribute will overwrite the entire default css style for the warning message, so you should ensure that care is taken when entering a value for this attribute. It is strongly recommended that you re-use the z-index value, or that, at least, the z-index value be lower than that used for the time_limit_message_style attribute (which defaults to 1002).

This settings is only applicable if the general time limit setting is activated. This setting also exists for a second warning message.

Example

top: 10px; left: 35%; width: 30%; height: 60px; padding: 16px; border: 8px solid #555; background-color: gray; color: white; z-index: 1001; text-align: center; overflow: auto



Question validation equation (em_validation_q)

Description

This is an equation that is used to validate the entire question (e.g, all of its parts collectively for a multi-answer question). If the question fails the validation criteria, then em_validation_q_tip message will be displayed (it uses the CSS style .error). This tip uses the .em_q_fn_validation CSS style, which is hidden by default within template.css.

The main difference between this feature and the subquestion validation equations (em_validation_sq option) is that for this feature, if the question (or question parts) fail validation, then an error message could be shown. For the subquestion validation, each text entry cell (e.g., in an array question type, but it can also be applied to single entry question types) will be styled so that the background color is (light) red.

Valid values

  • Any equation that makes use of the ExpressionScript syntax, without surrounding curly braces.

Example

  • You want to collect demographic information from users via a multiple short text question, and you want to validate that the user has entered a valid email address and phone number.

This example shows how the question looks with invalid answers:

And here is what it looks like with one invalid answer:

Here is how you edit a question to enter that information:

And here is part of the Show Logic File output that lets you check the accuracy of your expression and ensure that there are no syntax errors:

As you can see, the validation equation tests that both the email and phone number are either empty or match a regular expression filter.

The validation tip only shows the warning message if the phone or email appears invalid.

 Hint: In order to create complex validation messages, read about the usage of the ExpressionScript.


If you wish to import the example from above into your LimeSurvey installation, download the following .lsq file: Em_validation_q_example.zip.

 Hint: Remember, LimeSuvey uses the Perl syntax for regular expressions, so they should start and end with / (slash character)!



Tip for whole question validation equation (em_validation_q_tip)

Description

If you are using the question validation equation, you can use this box in order to display an optional message as question tip on how the question has to be filled out.

Valid values

Example

See the example from the question validation equation wiki section- it shows how the tip can be tailored to show which parts of a multiple short text question fail the validation criteria.



Sub-question validation equation (em_validation_sq)

Description

This is an equation that is used to validate each subquestion (text field) individually. Any text field that does not pass these validation conditions will have its background color turned pink (using the .em_sq_fn_validation CSS style) to highlight the error. Note that this is available in addition to the regular expression-based validation option.

Valid values

Any equation that makes use of the ExpressionScript syntax, without surrounding curly braces.

Examples

For example, if you want to allow only numbers that are a multiple of 3 as answers, the equation would be:

(this / 3) == floor(this/3)

The reserved variable this is automatically replaced by a reference to the active text entry cell.



Tip for sub-question validation equation (em_validation_sq_tip)

Description

If you are using em_validation_sq, this is an optional message/tip that will be displayed if the introduced answer is incorrect.

Valid values

  • Any string

Example

  • Continuing the example of validating emails, the tip might be "Please enter valid email addresses."