0 votes
ago in SoSci Survey (dt.) by s288744 (130 points)
edited ago by SoSci Survey

Hi, ich habe eine Frage (LA01) in Sosci-Survey auf Seite 2 des Fragegbogens (FR5) angelegt, in der die Teilnehmer aus einer Liste von 43 Länder (Kennung LA01_01-LA01_43) 8 Länder auswählen sollen. Aus diesen 8 ausgewählten Ländern sollen in der nächsten Frage, für die ich eine Multi-Level-Struktur, in dem Fall einen Sub-questionnaire (sub01), angelegt habe. Auf Seite 3 habe ich dann den PHP-Code angelegt, der auf den sub01 verweisen soll und dort die Kombinationen zu der dort hinterlegten Frage anzeigen soll. Dieser lautet wie folgt:

$items = getItems('LA01', '==', 2);

$selectedArray = $items; 

$combinations = [];
for ($i = 0; $i < count($selectedArray); $i++) {
    for ($j = $i + 1; $j < count($selectedArray); $j++) {
        $combinations[] = [$selectedArray[$i], $selectedArray[$j]];
    }
}
debug($combinations);

$currentCombination = loopPage($combinations);


multiLevelDown('sub01', $currentCombination);           

                                                        

Der PHP-Code im Sub-questionnaire lautet:

$currentCombination = multiLevelData();

// Debug: Ausgabe des Werts von $currentCombination
debug($currentCombination);

list($item1, $item2) = $currentCombination;

// Debug: Ausgabe der Items
debug($item1);
debug($item2);

// Verwenden der Variablen in der Fragefunktion
question('MS02', 'show-items=' . $item1 . ' und ' . $item2);

multiLevelReturn(true);    
                                                                                        

Derzeit wird mir nur noch eine Server-Fehlermeldung angezeigt, woran könnte das liegen. Außerdem konnten zuvor laut Debug-Ausgabe keine Kombinationen erstellt werden, weil die Variablen 1-43 nicht im Projekt vorhanden sind und somit auch keine Werte zurückgeben können. Das ist mir bewusst, aber wo kann ich die Kennung meiner Items im PHP-Code eingeben, damit die richtigen Variablen verwendet werden? Weil die Variablen kann ich ja nicht einfach zu 1-43 umbenennen.

Vielen Dank, über eine Antwort würde ich mich sehr freuen!!

ago by SoSci Survey (313k points)
> Derzeit wird mir nur noch eine Server-Fehlermeldung angezeigt, woran könnte das liegen.

Bitte posten Sie die Fehlermeldung im Wortlaut, danke.

> Außerdem konnten zuvor laut Debug-Ausgabe keine Kombinationen erstellt werden, weil die Variablen 1-43 nicht im Projekt vorhanden sind

Ich denke, dass die Debug-Information etwas anderes meint. Ergänzen Sie bitte noch ein weiteres debug()

$items = getItems('LA01', '==', 2);
debug($items);

Posten Sie dann bitte nochmal die Debug-Information.
ago by s288744 (130 points)
Das ist die Fehlermeldung die ich erhalte:

Diese Seite funktioniert nichtumfragenup.uni-potsdam.de kann diese Anfrage momentan nicht verarbeiten.
HTTP ERROR 500

Das weitere debug() habe ich ergänzt, die Debug-Information kann ich allerdings leider nicht posten, da ich nur noch die Fehlermeldung erhalte und gar nicht mehr dazu komme die debug-informationen auszuwerten.

Wenn ich die $selectedArray = $items; aus dem PHP Code entferne, erhalte ich keine Server-Fehlermeldung mehr, dafür allerdings folgende Debug-Informationen:

[Information]    Interview Nummer 249 wird fortgesetzt
[Information]    Der Fragebogen FR5 im Projekt negotiation_intercultural wird verwendet
[Information]    Die Verweildauer auf Seite 2 war 10 Sekunden
[Verarbeitung]    Lese Antworten von Seite 2
[Information]    Antwort auf LA01_34 = 2
[Information]    Antwort auf LA01_28 = 1
[Information]    Antwort auf LA01_02 = 1
[Information]    Antwort auf LA01_35 = 2
[Information]    Antwort auf LA01_37 = 1
[Information]    Antwort auf LA01_29 = 1
[Information]    Antwort auf LA01_39 = 2
[Information]    Antwort auf LA01_05 = 1
[Information]    Antwort auf LA01_08 = 1
[Information]    Antwort auf LA01_40 = 1
[Information]    Antwort auf LA01_06 = 2
[Information]    Antwort auf LA01_07 = 1
[Information]    Antwort auf LA01_09 = 1
[Information]    Antwort auf LA01_30 = 1
[Information]    Antwort auf LA01_11 = 1
[Information]    Antwort auf LA01_12 = 2
[Information]    Antwort auf LA01_13 = 1
[Information]    Antwort auf LA01_36 = 1
[Information]    Antwort auf LA01_38 = 1
[Information]    Antwort auf LA01_03 = 2
[Information]    Antwort auf LA01_31 = 1
[Information]    Antwort auf LA01_41 = 1
[Information]    Antwort auf LA01_14 = 1
[Information]    Antwort auf LA01_15 = 2
[Information]    Antwort auf LA01_16 = 1
[Information]    Antwort auf LA01_01 = 1
[Information]    Antwort auf LA01_17 = 1
[Information]    Antwort auf LA01_18 = 2
[Information]    Antwort auf LA01_19 = 1
[Information]    Antwort auf LA01_23 = 1
[Information]    Antwort auf LA01_24 = 1
[Information]    Antwort auf LA01_32 = 1
[Information]    Antwort auf LA01_20 = 1
[Information]    Antwort auf LA01_22 = 1
[Information]    Antwort auf LA01_21 = 1
[Information]    Antwort auf LA01_04 = 1
[Information]    Antwort auf LA01_25 = 1
[Information]    Antwort auf LA01_10 = 1
[Information]    Antwort auf LA01_43 = 1
[Information]    Antwort auf LA01_42 = 1
[Information]    Antwort auf LA01_26 = 1
[Information]    Antwort auf LA01_27 = 1
[Information]    Antwort auf LA01_33 = 1
[Information]    Antwort auf LA01 = 8
[Information]    Fragen bisher zu 100% vollständig beantwortet
[Verarbeitung]    Erstelle Seite 3 in Fragebogen FR5
debug()    Inhalt: 03, 16, 212, 315, 418, 534, 635, 739
ago by SoSci Survey (313k points)
> Diese Seite funktioniert nichtumfragenup.uni-potsdam.de kann diese Anfrage momentan nicht verarbeiten.

Könnten Sie bitte mal links in der Navigation nachsehen, welche Programmversion von SoSci Survey auf diesem Server läuft?
ago by s288744 (130 points)
Programm-Version 3.4.22
22:48 Uhr

1 Answer

0 votes
ago by SoSci Survey (313k points)

Programm-Version 3.4.22

Diese Programmversion ist von August 2023 - also schon mehr als ein halbes Jahr alt (s. Programmversionen). Ich sehe eine 30%-Chance, dass das Problem mit einem Update behoben wird.

Der "HTTP ERROR 500" besagt, dass im Hintergrund irgend etwas abgestürzt ist - zum Beispiel weil für eine Berechnung zu wenig RAM-Speicher zur Verfügung steht. Wenn das Update nicht hilft, müsste die für den Betrieb des Servers verantwortliche Person einmal in die Logfiles schauen (SoSci Survey zeigt diese direkt in der Administrator-Oberfläche an), ob dort Fehlermeldungen stehen, die mit dem Auftreten des 500er-Fehlers zeitlich in Zusammenhang stehen.

Auf dieser Basis können wir das Problem dann eingrenzen.

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

...