Actions

Question type - Equation/sl: Difference between revisions

From LimeSurvey Manual

(Created page with "Ta tip vprašanja dovoljuje avtorju, da izdela enačbo (npr.: izračun ali prilagojeno poročilo) ter jo shrani v podatkovno bazo kot spremenljivko. Za enačbo lahku uporabite...")
(Updating to match new version of source page)
(17 intermediate revisions by 3 users not shown)
Line 3: Line 3:


=Kratek opis=
=Kratek opis=
<onlyinclude>{{#ifeq:{{{transcludesection|short_description}}}|short_description|
<div class="simplebox">Opomba: Ta tip vprašanja je mogoč od verzije 1.92 dalje</div>


<div style="display:none;"></div>
<onlyinclude>{{#ifeq:{{{transcludesection|short_description}}}|short_description|<div style="display:none;"></div>
{{Hint|Text=Unlike all other question types, if an equation is hidden, it is still computed, its value being stored in the database.}}
{{Hint|Text=Equation question type allow to assign a value to another Question. See how to [[ExpressionScript - Presentation#Using assignment operator|use assignment Operator]].}}
{{Alert|No HTML tag can be saved in the database due to security concerns.}}
<div class="mw-translate-fuzzy">
Ta tip vprašanja dovoljuje avtorju, da izdela enačbo (npr.: izračun ali prilagojeno poročilo) ter jo shrani v podatkovno bazo kot spremenljivko. Za enačbo lahku uporabite sintakso, ki jo podpirac [[Expression Manager/sl|Urejevalnik izrazov]]. V primeru, da upravljate s številčnimi vrednostmi morate uporabiti napredne nastavitve "Samo števila", kot je opisano.
Ta tip vprašanja dovoljuje avtorju, da izdela enačbo (npr.: izračun ali prilagojeno poročilo) ter jo shrani v podatkovno bazo kot spremenljivko. Za enačbo lahku uporabite sintakso, ki jo podpirac [[Expression Manager/sl|Urejevalnik izrazov]]. V primeru, da upravljate s številčnimi vrednostmi morate uporabiti napredne nastavitve "Samo števila", kot je opisano.
}}</onlyinclude>
</div>
=Core settings=
 
You may find below an example on how to use this question type:
 
 
<center>[[FIle:Equation q ex 01.png]]</center>
 
 
<center>[[File:Equation q ex 02.png]]</center>
 
 
'''Example:''' [[Media:Limesurvey_survey_BMIsample.lss.zip|Limesurvey_survey_BMIsample.lss.zip]].
 
<div style="display:none;"></div>}}</onlyinclude><div style="display:none;"></div>
 
=Editing an equation=
 
== Using dedicated setting==
 
The best way to edit equation is to use dedicated setting : this allow using same equation for different languages, and to be sure than no HTML is integrated in equation. This allow you to show a complete sentence to user but save only the needed value in database : for example put {weightkg/tall} in equation setting and show “Your BMI is {self.NAOK}”.
 
If you need Expression inside : you have to add the curly brace.
 
== Using Question text==
 
You can do edits via the HTML/WYSIWYG editor or from the HTML source:
 
* Using the WYSIWYG editor:
 
 
<center>[[File:Equation-01.png]]</center>
 
 
*From the HTML source:
 
 
<center>[[File:Equation-02.png]]</center>
 
 
The edits in the source code are recommended when you wish to record in your response table a clean text or a clean numeric value. By editing the source, you can remove/delete any HTML code that can affect the storing process.
 
 
<center>[[File:Equation-03.png]]</center>
 
 
<div class="simplebox">[[File:help.png]] '''Hint:''' To check different HTML editors, please see the wiki section on the [[First_login_-_your_user_preferences#HTML_editor_mode|HTML editor mode]].</div>
 
<div class="mw-translate-fuzzy">
=Glavne nastavitve=
</div>
 
{{QS:mandatory/sl}}
 
{{QS:relevance/sl}}
 
=Display=
 
{{QS:Hidden/sl}}
 
{{QS:CSS_Class}}
 
{{QS:Printable_survey_relevance_help}}
 
=Logic=
 
{{QS:Equation}}


{{QS:mandatory}}
=Other=


{{QS:relevance}}
{{QS:Page_break/sl}}


=Advanced settings=
{{QS:scale_export/sl}}


{{QS:Hidden}}
{{QS:numbers_only/sl}}


'''Note:''' unlike all other question types, if an equation is hidden, it is still computed and its value is still stored in the database.
=Statistics=


{{QS:numbers_only}}
{{QS:Public_statistics/sl}}


{{QS:Page_break}}
{{QS:Display_chart}}


{{QS:Public_statistics}}
{{QS:Chart_type}}


{{QS:scale_export}}
[[Category:Question types]][[Category:Mask questions]]

Revision as of 18:30, 20 May 2020

Kratek opis

 Hint: Unlike all other question types, if an equation is hidden, it is still computed, its value being stored in the database.


 Hint: Equation question type allow to assign a value to another Question. See how to use assignment Operator.


  No HTML tag can be saved in the database due to security concerns.


Ta tip vprašanja dovoljuje avtorju, da izdela enačbo (npr.: izračun ali prilagojeno poročilo) ter jo shrani v podatkovno bazo kot spremenljivko. Za enačbo lahku uporabite sintakso, ki jo podpirac Urejevalnik izrazov. V primeru, da upravljate s številčnimi vrednostmi morate uporabiti napredne nastavitve "Samo števila", kot je opisano.

You may find below an example on how to use this question type:




Example: Limesurvey_survey_BMIsample.lss.zip.

Editing an equation

Using dedicated setting

The best way to edit equation is to use dedicated setting : this allow using same equation for different languages, and to be sure than no HTML is integrated in equation. This allow you to show a complete sentence to user but save only the needed value in database : for example put {weightkg/tall} in equation setting and show “Your BMI is {self.NAOK}”.

If you need Expression inside : you have to add the curly brace.

Using Question text

You can do edits via the HTML/WYSIWYG editor or from the HTML source:

  • Using the WYSIWYG editor:



  • From the HTML source:



The edits in the source code are recommended when you wish to record in your response table a clean text or a clean numeric value. By editing the source, you can remove/delete any HTML code that can affect the storing process.



Hint: To check different HTML editors, please see the wiki section on the HTML editor mode.

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


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.


Display

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)


CSS class (css_class)

Description

If you want to add special CSS classes to certain questions, you can enter the CSS class name(s) in this box. Make sure you leave an empty space between different class names.

Valid values

  • Any text string with a space between different CSS class names.
 Hint: You can also insert an expression in this box (New in 3.0.0 ). Remember that the output of the expression will not be updated dynamically.


  According to the W3C, CSS class names can contain only the characters [a-zA-Z, and 0-9] and ISO 10646 characters U+00A1 and higher, plus the hyphen (-) and the underscore (_). They cannot start with a digit, or a hyphen followed by a digit. LimeSurvey encodes CSS classes, but it does not fix it totally.



Relevance help for printable survey (printable_survey_relevance_help)

Description

If you wish to print a survey, you can also print the relevance equations for each question. But, if you wish to offer instead an explanation rather than the expression on the printed form, fill in this box with the text explanation for the relevance equation.

Valid values

  • Any text and/or numbers you wish to be displayed on the printable form.


Logic

Equation (equation)

Description

The result of the expression you type here will be stored in the response table and NOT the result(s) of the expressions typed in the question textbox. For example, you may want to display several expressions in the question textbox to display the respondents some statistics about herself. However, if you wish to store something different at the same time, then type the desired expression in this field.

This equation is used for all language.

Valid values


Other

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)



Vrsta SPSS izvozne skale (scale_export)

Opis

To se uporablja samo za izvoz SPSS. Ta atribut preglasi privzeto lestvico, ki jo ugane SPSS. Če želite izvedeti, kaj počnejo različne merilne lestvice, preberite povezano dokumentacijo SPSS.

Razpoložljive možnosti

  • Privzeto (privzeto)
  • Nominalno
  • Ordinalno
  • Lestvica


Samo številke (samo številke)

Opis

Če omogočite to možnost, lahko udeleženec vnaša samo številke v besedilna polja.

Za vrste vprašanj z enačbo ta nastavitev nakazuje, da je lahko rezultat samo število, ne pa niz. To bo zagotovilo pravilne izračune/pretvorbe v nadaljnjih enačbah glede decimalne oznake.

Vedenje glede na vrsto vprašanja

  1. Privzeto: Če subjekt vnese vrednost, ki ni številka, se ta vrednost takoj počisti iz besedilnega polja, tako da subjekt lahko vnese ustrezno vrednost.
  2. Array (Texts): Če je možnost samo številke onemogočena, bosta možnosti "Prikaži vsote za" in "Prikaži skupno vsoto" preglasovani, medtem ko skupna besedilna polja ne bodo prikazana.
  3. Enačba: Če omogočite to možnost, bodo rezultati enačbe pretvorjeni v številsko vrednost. Če rezultat enačbe ni število (in ni prazno), bo enačba vrnila NaN in bo shranjena kot prazen niz v tabeli odgovorov.

'Razpoložljive možnosti

  • Vklopljeno
  • Izklopljeno (privzeto)


Statistics

Prikaži v javni statistiki (public_statistics)

Opis

Ta atribut omogoča administratorju ankete, da izbere, ali naj se rezultati določenega vprašanja prikažejo udeležencem ankete, potem ko so oddali anketo.

Datoteka:help.png Opomba: Za prikaz statistike na zadnji strani ne pozabite omogočiti te funkcije v nastavitvah predstavitve in navigacije. V nasprotnem primeru na koncu ankete ne bo prikazana povezava do statistike.

Privzeta nastavitev za vsako vprašanje je 'Izklopljeno' (=Ali ne anketirancem prikaži statistike vprašanj). To morate omogočiti za vsako posamezno vprašanje, če želite udeležencem ankete po oddaji ankete pokazati statistiko ankete za to (tista) določena vprašanja.

Razpoložljive možnosti

  • Vklopljeno
  • Izklopljeno (privzeto)



Display chart (display_chart)

Description

This attribute allows the survey administrator to choose if a chart that contains the question results should be displayed to the survey participants after they filled out the survey.

Note: To have the chart displayed on the last page, you have to enable the following options:


Available options

  • On
  • Off (default)



Chart type (chart_type)

Description

This attribute allows the survey administrator to choose which type of chart will be displayed to the respondent once he/she finished filling out the survey.

Note: Do not forget to change the question and survey settings in order to have the charts displayed at the end on the survey. For more details, check the wiki section on the display chart question attribute.

Available options

  • Bar chart
  • Pie chart
  • Radar
  • Line
  • PolarArea
  • Doughnut