Hi,
I have extended Moodle in order to catch event of inserting record in database and pass data to the Sesame repository. I have added the following line of code
depths_insert_record($table,$dataobject, $id,$insertSQL);
in insert_record() method of moodle/lib/dmlib.php
It works fine, but makes me problem during the Moodle installation. It causes stop responding on page "Setting up database". The last lines of code are as follow:
Success
--------------------------------------------------------------------------------
(mysql): SELECT name FROM mdl_config WHERE name = 'unicodedb' LIMIT 1
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysql): SELECT * FROM mdl_config WHERE id = '-1'
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysql): INSERT INTO mdl_config ( NAME, VALUE ) VALUES ( 'unicodedb', '1' )
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
(mysql): SELECT LAST_INSERT_ID()
If I delete this line of code before installation, it performs fine. I can add it later again and everything works.
Can you suggest me how to solve this problem? I thought that the solution could be to check if installation is in progress and if so, to skip this line of code, but I don't know how to check it. Is there any indicator that installation is in progress?
Regards
Zoran
General developer forum
insert_record extension makes problem during installation
This discussion has been locked so you can no longer reply to it.