Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
en:create:functions:answersprint [23.03.2015 22:00] – created alexander.ritteren:create:functions:answersprint [03.09.2015 21:14] – [Tips] admin
Line 1: Line 1:
 ====== answersPrint() ====== ====== answersPrint() ======
  
-Mithilfe der Funktion ''answersPrint()'' kann eine ganze Reihe von Fragen, die im Fragebogen abgefragt wurden, dargestellt werdenSo kann man dem Teilnehmer eine Druckansicht des eigenen Fragebogens zeigen.+A whole range of questions that are asked in the questionnaire can be displayed with the help of the ''answersPrint()'' functionThis means the participant can be shown a print view of their own questionnaire
  
-Verwenden Sie die Funktion ''[[:de:create:functions:option|option()]]'', um einen Abschnitt des Fragebogens zu definieren (s. Beispiel).+Use the ''[[:en:create:functions:option|option()]]'' function to define a section of the questionnaire (see example). 
  
-''void **answersPrint**(string //Abschnitt//)''+''void **answersPrint**(string //section//)''
  
  
-===== Hinweise =====+===== Tips =====
  
-Die Funktion ''answersPrint()'' ruft mehrfach ''answers()'' aufHinweise für ''[[:de:create:functions:answers|answers()]]'' gelten daher uneingeschränkt auch für ''answersPrint()''.+The ''answersPrint()'' function calls up ''answers'' repeatedlyTherefore, information for ''[[:en:create:functions:answers|answers()]]'' also applies fully for ''answersPrint()''.
  
 +If you enable the back button in the questionnaire and use filter questions, the following situation may occur: The respondents is shown a filtered question, then uses the back button, changes an earlier answers, and due to the filter, the other question is not displayed in the subsequent questionnaire, anymore. Nonetheless, ''answersPrint()'' will display the question in the print view, because it has been asked.
  
-===== Beispiel 1 =====+===== Example 1 =====
  
-Im folgenden Beispiel soll der Teilnehmer eine Druckansicht aller Fragen im Fragebogen bekommen.+In the following example, the participant should get a print view of all questions in the questionnaire. 
 + 
 + 
 +In **Compose Questionnaire**, insert a //PHP code// element on the first page with the following content:
  
-Fügen Sie dafür unter **Fragebogen zusammenstellen** zunächst auf der ersten Seite ganz oben ein Element //PHP-Code// mit folgendem Inhalt ein: 
  
 <code php> <code php>
Line 23: Line 26:
 </code> </code>
  
-Dieser Befehl teilt SoSci Survey mit, dass gleich zu Beginn ein Abschnitt mit der Kennung ''all'' beginnt.+This command informs SoSci Survey that a section begins with the ''all'' ID right from the outset.
  
-Anschließend fügen Sie am Ende des Fragebogens eine neue Seite ein -- und zwar mit einem //PHP-Code// Element und einem Textbaustein.+ 
 +Following this, insert a new page at the end of the questionnaire -- with a //PHP code// element and a text element.
  
 <code php> <code php>
Line 32: Line 36:
 </code> </code>
  
-Der Textbaustein "printButton" hat dabei folgenden Inhalt.+The "printButton" text element has the following content. 
  
 <code> <code>
 <div> <div>
-  <button type="button" onclick="window.print();">Drucken</button>+  <button type="button" onclick="window.print();">Print</button>
 </div> </div>
 </code> </code>
  
  
-===== Beispiel 2 =====+===== Example 2 =====
  
-Der Fragebogen enthält zwei TeileNach einigen Fragen zu den Stammdaten (Seiten und 2) kommt ein Teil zum Unternehmen des Befragten (Seiten bis 5) und dann ein Teil zur Beschäftigungssituation (Seiten 7 und 8)Der Befragte soll beide Teile getrennt als Druckansicht bekommendie Seite soll in keiner Druckansicht auftauchen.+The questionnaire consists of two partsafter a couple of questions regarding the master data (pages and 2), there is a section concerning the respondent's company (pages to 5), and then a section regarding their employment situationThe respondent should get both parts separately in print view page should not appear in print view. 
 + 
 +At the top of page 3 a //PHP code// element with the following content is inserted in order to do this:
  
-Dafür wird auf Seite 3 ganz oben zunächst ein //PHP-Code// Element mit folgendem Inhalt eingefügt: 
  
 <code php> <code php>
Line 51: Line 57:
 </code> </code>
  
-Auf Seite 6 wird folgender PHP-Code eingefügt.+The following PHP code is inserted on page 6:
  
 <code php> <code php>
Line 57: Line 63:
 </code> </code>
  
-Und auf Seite 7 folgender PHP-Code.+and the following PHP code on page 7.
  
 <code php> <code php>
Line 63: Line 69:
 </code> </code>
  
-Am Ende des Fragebogens werden zwei Seiten eingefügtdie folgenden Inhalt haben.+At the end of the questionnairetwo pages with the following content will be inserted.
  
 <code php> <code php>
Line 73: Line 79:
 </code> </code>
  
-Optional kann unter dem PHP-Code jeweils noch der Textbaustein "buttonPrint" aus dem obigen Beispiel eingebunden werden.+ 
 +The ''buttonPrint'' text element from the above example can be optionally inserted under the PHP code for each one. 
en/create/functions/answersprint.txt · Last modified: 09.03.2022 10:28 by ruth.noppeney
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki