[[id()]]
 

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
en:create:functions:id [11.07.2017 00:21] – [Rückgabewert] baeuchler.inesen:create:functions:id [11.07.2017 00:31] – [Example] baeuchler.ines
Line 24: Line 24:
 ===== Example ===== ===== Example =====
  
-Im folgenden Beispiel werden jene Optionen einer Skalenbatterie SK01 aufgelistetwelche vom Teilnehmer min. mit bewertet wurden (z.Bauf einer fünfstufigen Skala). Dabei soll in Klammern jeweils die Bewertung angezeigt werdenDie Bewertung wird mittels ''[[value]]'' abgerufenDie dafür nötige Variablen-Kennung (die hier der Item-Kennung entsprichtwird mittels ''id()'' erzeugt.+The following example lists options within a scale SK01, which were rated with a min. value of from the participant (e.gon a scale of 1 to 5). The evaluation should be shown in bracketsThe evaluation is generated by ''[[value]]''The therefore necessary variable-identifier (which matches the item-identifieris generated with ''id()''. 
 + 
  
 <code php> <code php>
-// Items mit Bewertung 3+ finden+// find items with evaluation 3+
 $items = getItems('SK01', 'min', 3); $items = getItems('SK01', 'min', 3);
-// Alle Items durchgehen+// go through all items
 foreach ($items as $item) { foreach ($items as $item) {
-  // Text ermitteln+  // identify text
   $text = getItemtext('SK01', $item);   $text = getItemtext('SK01', $item);
-  // Wert ermitteln+  // identify value
   $wert = value(id('SK01', $item));   $wert = value(id('SK01', $item));
-  // Im Fragebogen anzeigen+  // show in questionnaire
   html('<p>'.$text.' ('.$wert.')</p>);   html('<p>'.$text.' ('.$wert.')</p>);
 } }
 </code> </code>
  
en/create/functions/id.txt · Last modified: 18.02.2019 11:15 by martijn.millecamp
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International
Driven by DokuWiki