0 votes
in SoSci Survey (dt.) by s117192 (160 points)
edited by SoSci Survey

Hallo,

ich möchte gerne aus einem Pool von 16 Abbildungen 4 ziehen lassen + die dazugehörigen Fragen. Daher habe ich beim Zufallsgenerator noch angegeben, dass die Anzahl der Zettel pro Interview "4" betragen soll.

Es wird aber immer nur ein Bild präsentiert und nicht 4 verschiedene.

Wie bekomme ich es hin, dass die Probanden nach der Zufallsziehung wirklich 4 dieser Bilder und Fragen präsentiert bekommen?

$code = value('ZG03_CP');  // Auslesen der gezogenen Zufallszahl
 
if ($code == 1) {
  question('QU71');
  text('<div class="spacing" style="text-align:center;">
    <img src="Blaugruene_Mosaikjungfer.jpg">
  </div>');
question('QU08');  // Insektenartbestimmung_1
question('QU06');  // Semantisches Differential_1
question('QU07');  // Schützenswert_1
} elseif ($code == 2) {
  question('QU71');  // Bestimmung von in Deutschland...
html('
  <div class="spacing" style="text-align:center;">
    <img src="Blutzikade.jpg">
  </div>
');
question('QU26');  // Insektenartbestimmung_2
question('QU41');  // Semantisches Differential_2
question('QU74');  // Schützenswert_2
} elseif ($code == 3) {
  question('QU71');  // Bestimmung von in Deutschland...
html('
  <div class="spacing" style="text-align:center;">
    <img src="Lederwanze.jpg">
  </div>
');
question('QU27');  // Insektenartbestimmung_3
question('QU42');  // Semantisches Differential_3
question('QU76');  // Schützenswert_3
} elseif ($code == 4) {
  question('QU71');  // Bestimmung von in Deutschland...
html('
  <div class="spacing" style="text-align:center;">
    <img src="Marienkaefer.jpg">
  </div>
');
question('QU28');  // Insektenartbestimmung_4
question('QU43');  // Semantisches Differential_4
question('QU80');  // Schützenswert_4
} elseif ($code == 5) {
  question('QU71');  // Bestimmung von in Deutschland...
html('
  <div class="spacing" style="text-align:center;">
    <img src="Steinhummel.jpg">
  </div>
');
question('QU29');  // Insektenartbestimmung_5
question('QU44');  // Semantisches Differential_5
question('QU87');  // Schützenswert_5
} elseif ($code == 6) {
  question('QU71');  // Bestimmung von in Deutschland...
html('
  <div class="spacing" style="text-align:center;">
    <img src="Admiral.jpg">
  </div>
');
question('QU31');  // Insektenartbestimmung_6
question('QU45');  // Semantisches Differential_6
question('QU84');  // Schützenswert_6
} elseif ($code == 7) {
  question('QU71');  // Bestimmung von in Deutschland...
html('
  <div class="spacing" style="text-align:center;">
    <img src="Ackerhummel.jpg">
  </div>
');
question('QU32');  // Insektenartbestimmung_7
question('QU46');  // Semantisches Differential_7
question('QU83');  // Schützenswert_7
} elseif ($code == 8) {
  question('QU71');  // Bestimmung von in Deutschland...
html('
  <div class="spacing" style="text-align:center;">
    <img src="Streifenwanze_Graphosoma_lineatum_iStock-173912952_GIMP.jpg">
  </div>
');
question('QU33');  // Insektenartbestimmung_8
question('QU47');  // Semantisches Differential_8
question('QU79');  // Schützenswert_8
} elseif ($code == 9) {
  question('QU71');  // Bestimmung von in Deutschland...
html('
  <div class="spacing" style="text-align:center;">
    <img src="Tagpfauenauge.jpg">
  </div>
');
question('QU34');  // Insektenartbestimmung_9
question('QU48');  // Semantisches Differential_9
question('QU85');  // Schützenswert_9
} elseif ($code == 10) {
  question('QU71');  // Bestimmung von in Deutschland...
html('
  <div class="spacing" style="text-align:center;">
    <img src="Kleiner_Fuchs.jpg">
  </div>
');
question('QU30');  // Insektenartbestimmung_10
question('QU49');  // Semantisches Differential_10
question('QU82');  // Schützenswert_10
} elseif ($code == 11) {
  question('QU71');  // Bestimmung von in Deutschland...
html('
  <div class="spacing" style="text-align:center;">
    <img src="Schwalbenschwanz.jpg">
  </div>
');
question('QU35');  // Insektenartbestimmung_11
question('QU50');  // Semantisches Differential_11
question('QU81');  // Schützenswert_11
} elseif ($code == 12) {
  question('QU71');  // Bestimmung von in Deutschland...
html('
  <div class="spacing" style="text-align:false;">
    <img src="Holzbiene.jpg">
  </div>
');
question('QU36');  // Insektenartbestimmung_12
question('QU51');  // Semantisches Differential_12
question('QU86');  // Schützenswert_12
} elseif ($code == 13) {
  question('QU71');  // Bestimmung von in Deutschland...
html('
  <div class="spacing" style="text-align:center;">
    <img src="Florfliege.jpg">
  </div>
');
question('QU37');  // Insektenartbestimmung_13
question('QU52');  // Semantisches Differential_13
question('QU75');  // Schützenswert_13
} elseif ($code == 14) {
  question('QU71');  // Bestimmung von in Deutschland...
html('
  <div class="spacing" style="text-align:false;">
    <img src="Gruenes_Heupferd.jpg">
  </div>
');
question('QU38');  // Insektenartbestimmung_14
question('QU53');  // Semantisches Differential_14
question('QU77');  // Schützenswert_14
} elseif ($code == 15) {
  question('QU71');  // Bestimmung von in Deutschland...
html('
  <div class="spacing" style="text-align:false;">
    <img src="Asiatischer_Marienkaefer.jpg">
  </div>
');
question('QU39');  // Insektenartbestimmung_15
question('QU54');  // Semantisches Differential_15
question('QU78');  // Schützenswert_15
} elseif ($code == 16) {
  question('QU71');  // Bestimmung von in Deutschland...
html('
  <div class="spacing" style="text-align:center;">
    <img src="Hainschwebfliege_.jpg">
  </div>
');
question('QU40');  // Insektenartbestimmung_16
question('QU55');  // Semantisches Differential_16
question('QU88');  // Schützenswert_16
}

1 Answer

0 votes
by SoSci Survey (316k points)

Bitte beachten Sie, dass Sie mit ZG03_CP aktuell nicht (!) die Zufallsziehung auslesen, sondern die Anzahl wie häufig die Urne/der Zufallsgenerator bisher geleert wurde.

Die korrekten Variablen-Namen finden Sie in der Variablen-Übersicht.

Prinzipiell könnten Sie diese Seite 3-mal kopieren und oben einfach immer einen anderen Variablen-Namen eintragen. Eleganter wäre es aber, wenn Sie die Bild-Namen und die Frage-Kennungen in ein Array eintragen und dann einfach nur noch die jeweilige Zeile zum gezogenen Zettel auslesen.

Willkommen im Online-Support von SoSci Survey.

Hier bekommen Sie schnelle und fundierte Antworten von anderen Projektleitern und direkt von SoSci Survey.

→ Eine Frage stellen


Welcome to the SoSci Survey online support.

Simply ask a question to quickly get answers from other professionals, and directly from SoSci Survey.

→ Ask a Question

...