Hello guys
I have a java script that generates some modules (Chat, Forum, Quiz) with SQLs commands. For example the commands to persist a chat I use the following commands:
INSERT INTO `mdl_chat` SET course = course_id, name = 'test1', intro = 'intro test1'
INSERT INTO `mdl_course_modules` SET course = course_id, module = (SELECT id FROM `mdl_modules` WHERE name = 'chat') ,instance = chat_id , visible = 1, showavailability = 1
INSERT INTO `mdl_course_sections` SET course = course_id, section = 1, sequence = module_id
and reset the section cache in course table
UPDATE `mdl_course` SET `sectioncache` = NULL WHERE id=course_id;
Well, the last command does not work anymore (I think because of version changes) so it can not persist over these modules. Thank you in advance for your help