0 votes
in SoSci Survey (dt.) by s121041 (110 points)
edited by SoSci Survey

Hallo,
ich bekomme es leider nicht hin die Rotation meiner Seiten abzuspeichern.
Ich habe eine interne Variable mit 12 Items angelegt.
Das ist der PHP-Code.

if (!isset($rotation)) {

$rotation = array(
  '1' => array('Video1','Rating1'),
  '2' => array('Video2','Rating2'),
  '3' => array('Video3','Rating3'),
  '4' => array('Video4','Rating4'),
  '5' => array('Video5','Rating5'),
  '6' => array('Video6','Rating6'),
  '7' => array('Video7','Rating7'),
  '8' => array('Video8','Rating8'),
  '9' => array('Video9','Rating9'),
  '10' => array('Video10','Rating10'),
  '11' => array('Video11','Rating11'),
  '12' => array('Video12','Rating12')
);

$indices = array_keys($rotation);
shuffle($indices);
// Nun die Ränge speichern - und die neue Abfolge der Seiten in $random speichern
$random= array();
for ($i=0; $i<count($indices); $i++) {
  // Rang speichern wie oben
  $id = id('IN08', $indices[$i] + 1);
  put($id, $i + 1);
  // Seite in der Abfolge speichern
  $rotation[$i] = $rotation[$indices[$i]];
}
// Weiter soll es anschließend mit Seite 'end' gehen
setPageOrder($rotation, 'end');
}

und bekomme folgende Fehlermeldungen:
Questionnaire Error (page 7)
Items of the following question have been used repeatedly on this page. This inevitably results in data loss! If you need the same question more than once, please create a copy of this question. The following items are duplicates: IN08_07.
(diese Fehlermeldung bekomme ich 12 mal, für jede Variable ein mal)

und folgende:
Warning (page 7)
For the question IN08 no item with the ID 13 has been found.
Warning (page 7)
For the question IN08 no item with the ID 13 has been found.
Questionnaire Error (page 7)
Instead of a question or item ID a parameter of the type NULL has been used for the function put():

vielen Dank im Voraus

1 Answer

0 votes
by SoSci Survey (304k points)

Items of the following question have been used repeatedly on this page. ... IN08_07.

Könnte es sein, dass Sie außer dem PHP-Code noch andere Inhalte auf der Seite haben? Haben Sie evtl. die Frage IN08 auf die Seite gezogen?

For the question IN08 no item with the ID 13 has been found.

Bitte entfernen Sie hier das ' +1'.

$id = id('IN08', $indices[$i] + 1);

Ihre Indizes im Array sind ja bereits ab 1 gezählt, nicht ab 0, wie sonst in Arrays üblich.

by s121041 (110 points)
supergut, vielen Dank! Ich dachte tatsächlich, dass ich die Variable auch auf die Seite ziehen muss.

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

...