plugin/exo/Installation/Updater/Updater060200.php
private function migrateExerciseQuestionData()
    {
        $exoId = -1;
        $orderStep = 1;

        $exoQuestion = $this->checkExoQuestion();
        $stepStmt = $this->connection->prepare("
            INSERT INTO ujm_step
            (exercise_id, value, nbQuestion, keepSameQuestion, shuffle, duration, max_attempts, ordre)
            VALUES (:exoId, '', 0, FALSE, FALSE, 0, 0, :orderStep)
        ");

        foreach ($exoQuestion as $eq) {
            if ($eq['exercise_id'] !== $exoId) {
                $exoId = $eq['exercise_id'];
            }

            $this->log('Create step ...');

            $stepStmt->bindValue('exoId', $exoId);
            $stepStmt->bindValue('orderStep', $orderStep);
            $stepStmt->execute();

            $stepId = $this->connection->lastInsertId();
            $this->addQuestionStep($stepId, $eq['question_id'], 1);
            ++$orderStep;
        }
    }
private function migrateExerciseQuestionData()
    {
        $exoId = -1;
        $orderStep = 1;

        $exoQuestion = $this->checkExoQuestion();
        $stepStmt = $this->connection->prepare("
            INSERT INTO ujm_step
            (exercise_id, value, nbQuestion, keepSameQuestion, shuffle, duration, max_attempts, ordre)
            VALUES (:exoId, '', 0, FALSE, FALSE, 0, 0, :orderStep)
        ");

        foreach ($exoQuestion as $eq) {
            if ($eq['exercise_id'] !== $exoId) {
                $exoId = $eq['exercise_id'];
            }

            $this->log('Create step ...');

            $stepStmt->bindValue('exoId', $exoId);
            $stepStmt->bindValue('orderStep', $orderStep);
            $stepStmt->execute();

            $stepId = $this->connection->lastInsertId();
            $this->addQuestionStep($stepId, $eq['question_id'], 1);
            ++$orderStep;
        }
    }
private function migrateExerciseQuestionData ( ) { $ exoId = - 1 ; $ orderStep = 1 ; $ exoQuestion = $ this -> checkExoQuestion ( ) ; $ stepStmt = $ this -> connection -> prepare ( "
            INSERT INTO ujm_step
            (exercise_id, value, nbQuestion, keepSameQuestion, shuffle, duration, max_attempts, ordre)
            VALUES (:exoId, '', 0, FALSE, FALSE, 0, 0, :orderStep)
        " ) ; foreach ( $ exoQuestion as $ eq ) { if ( $ eq [ 'exercise_id' ] !== $ exoId ) { $ exoId = $ eq [ 'exercise_id' ] ; } $ this -> log ( 'Create step ...' ) ; $ stepStmt -> bindValue ( 'exoId' , $ exoId ) ; $ stepStmt -> bindValue ( 'orderStep' , $ orderStep ) ; $ stepStmt -> execute ( ) ; $ stepId = $ this -> connection -> lastInsertId ( ) ; $ this -> addQuestionStep ( $ stepId , $ eq [ 'question_id' ] , 1 ) ; ++ $ orderStep ; } }
Move data exercise_question in step_question.
Move data exercise_question in step_question .