Actions

Spørgsmålstype - Ligning

From LimeSurvey Manual

This page is a translated version of the page Question type - Equation and the translation is 100% complete.

Kort beskrivelse

Template:Tip

Template:Tip

  Intet HTML-tag kan gemmes i databasen på grund af sikkerhedsproblemer.


Denne spørgsmålstype lader forfatteren oprette en ligning (f.eks. en beregning eller skræddersyet rapport) og gemme den i en databasevariabel. Ligninger kan bruge enhver syntaks, der understøttes af ExpressionScript. Hvis du håndterer numeriske værdier, skal du sørge for at bruge den avancerede spørgsmålsindstilling "Kun tal" som forklaret nedenfor.

Nedenfor kan du finde et eksempel på, hvordan du bruger denne spørgsmålstype:




Eksempel: Limesurvey_survey_BMIsample.lss.zip.

Redigering af en ligning

Bruger dedikerede indstillinger

Den bedste måde at redigere ligningen på er at bruge dedikerede indstillinger: dette gør det muligt at bruge samme ligning til forskellige sprog, og for at være sikker på, at ingen HTML er integreret i ligningen. Dette giver dig mulighed for at vise en komplet sætning til brugeren, men gemmer kun den nødvendige værdi i databasen: indsæt f.eks. {weightkg/tall} i ligningsindstilling og vis "Dit BMI er {self.NAOK}".

Hvis du har brug for Expression indeni: du skal tilføje den krøllede bøjle.

Brug af spørgsmålstekst

Du kan foretage redigeringer via HTML/WYSIWYG-editoren eller fra HTML-kilden:

  • Brug af WYSIWYG-editoren:



  • Fra HTML-kilden:



Redigeringerne i kildekoden anbefales, når du ønsker at registrere en ren tekst eller en ren numerisk værdi i din svartabel. Ved at redigere kilden kan du fjerne/slette enhver HTML-kode, der kan påvirke lagringsprocessen.



Tip: For at tjekke forskellige HTML-editorer, se venligst wiki-sektionen i HTML editor mode.

Generelle muligheder

QS:Obligatorisk

QS:Relevans

Skærm

Always hide this question (hidden)

Description

If enabled, the question will always be hidden - it will not be displayed to the survey participants. This function can be used in the following scenarios:

  • If you wish to prefill a question with a URL and you want not to have it displayed on the screen. This overrides any conditions used within the survey because the respective question will not even be embedded on the page.
  • If you wish to store or calculate a value on the fly via the ExpressionScript - Presentation.
Note: A common question type that is used with this function is the Equation one.

Available options

  • On
  • Off (default)


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.


Logik

QS:Ligning

Andet

Insert page break in printable view (page_break)

Description

This attribute is only active when you actually print a survey from the Printable View. It forces a page break before the question.

Available options

  • On
  • Off (default)



SPSS export scale type (scale_export)

Description

This is used for SPSS export only. This attribute overrides the default scale guessed by SPSS. To learn what the different measurement scales do, please read the related SPSS documentation.

Available options

  • Default (default)
  • Nominal
  • Ordinal
  • Scale


Numbers only (numbers_only)

Description

If you enable this option, the participant can only enter numbers in the text box(es).

For the equation question types, this setting indicates that the result could only be a number, not a string. This will guarantee proper calculations/conversions in follow-up equations regarding the decimal mark.

Behavior by question type

  1. Default: If the subject enters a value that is not a number, that value is immediately cleared from the text box so that the subject can enter an appropriate value.
  2. Array (Texts): If the numbers only option is disabled, the "Show totals for" and "Show grand total" options will be overruled, while the total text boxes will not be displayed.
  3. Equation: Enabling this option will force the equation results to be converted to a numeric value. If the equation result is not a number (and not blank), the equation will return NaN, being saved as an empty string in the response table.

Available options

  • On
  • Off (default)


Statistik

QS:Offentlig statistik


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


Kategori:SpørgsmålstyperKategori:Maskespørgsmål