0 votes
in SoSci Survey (dt.) by s192889 (170 points)
edited by SoSci Survey

Danke für den Hinweis! Ich hatte gelesen, dass man das 'PS12_01' als Fall nehmen kann, dass bei Item PS12 der Wert 1 gilt. Die neue Version mit stattdessen "==1" bzw "==2" sieht nun folgendermaßen aus:

$sum1 = valueSum('V203', '01-11');

if ((value($sum1) > 10) and (value('PS12') == 2)) or
   ((value($sum1) > 15) and (value('PS12') == 1)) {
      goToPage('Abbruch');
}

Als neue Fehlermeldung erhalte ich nun:
An error occured while creating the questionnaire page. Please inform the project administrator about the problem and include a copy of the error message below. Thank you very much.
There is no question with the ID VH08 in this project.

Die ID VH08 kommt aber in dem verwendeten PHP-Code garnicht vor. Erschließt sich Ihnen das?

related to an answer for: Warum ist der Code ungültig?

1 Answer

0 votes
by SoSci Survey (322k points)

There is no question with the ID VH08 in this project.

Das scheint sich nicht auf den o.g. PHP-Code zu beziehen. Bitte ergänzen Sie in Ihrer Frage noch die Debug-Information der Seite. Danke.

Ich bin weiterhin der Meinung, dass die Klammern in Ihrem PHP-Code noch nicht stimmen, das "or" steht außerhalb einer Klammer. Hier Ihr Code nochmal etwas strukturierter:

if (
      (value($sum1) > 10) and (value('PS12') == 2)
   )
   or
   (
      (value($sum1) > 15) and (value('PS12') == 1)
   )
{
        goToPage('Abbruch');
}

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

...