plugin/exo/Installation/Updater/Updater060200.php
private function checkDocument()
    {
        $this->log('Checking document ...');

        $checkQuery = '
            SELECT *
            FROM ujm_document
        ';

        $results = $this->connection->query($checkQuery)->fetchAll();
        foreach ($results as $res) {
            try {
                $this->connection->exec("
                INSERT INTO ujm_picture_temp
                VALUES ({$res['id']}, {$res['user_id']}, '"
                .addslashes($res['label'])."', '"
                .addslashes($res['url'])."', '"
                .addslashes($res['type'])."',
                0, 0
                )
            ");
            } catch (\Exception $e) {
                $this->log("Picture {$res['id']} already inserted");
            }
        }

        $this->checkInteractionGraphic();
    }
private function checkDocument()
    {
        $this->log('Checking document ...');

        $checkQuery = '
            SELECT *
            FROM ujm_document
        ';

        $results = $this->connection->query($checkQuery)->fetchAll();
        foreach ($results as $res) {
            try {
                $this->connection->exec("
                INSERT INTO ujm_picture_temp
                VALUES ({$res['id']}, {$res['user_id']}, '"
                .addslashes($res['label'])."', '"
                .addslashes($res['url'])."', '"
                .addslashes($res['type'])."',
                0, 0
                )
            ");
            } catch (\Exception $e) {
                $this->log("Picture {$res['id']} already inserted");
            }
        }

        $this->checkInteractionGraphic();
    }
private function checkDocument ( ) { $ this -> log ( 'Checking document ...' ) ; $ checkQuery = '
            SELECT *
            FROM ujm_document
        ' ; $ results = $ this -> connection -> query ( $ checkQuery ) -> fetchAll ( ) ; foreach ( $ results as $ res ) { try { $ this -> connection -> exec ( "
                INSERT INTO ujm_picture_temp
                VALUES ({$res['id']}, {$res['user_id']}, '" . addslashes ( $ res [ 'label' ] ) . "', '" . addslashes ( $ res [ 'url' ] ) . "', '" . addslashes ( $ res [ 'type' ] ) . "',
                0, 0
                )
            " ) ; } catch ( \ Exception $ e ) { $ this -> log ( "Picture {$res['id']} already inserted" ) ; } } $ this -> checkInteractionGraphic ( ) ; }
recover the questions of an exercise in order to inject in step_question.
recover the questions of an exercise in order to inject in step_question .