print_simple_box_end();
+/// Try to replace some well-known serialised contents (html blocks)
+notify('Replacing in html blocks...');
+$sql = "SELECT bi.*
+ FROM {$CFG->prefix}block_instance bi
+ JOIN {$CFG->prefix}block b ON b.id = bi.blockid
+ WHERE b.name = 'html'";
+if ($instances = $DB->get_records_sql($sql)) {
+ foreach ($instances as $instance) {
+ $blockobject = block_instance('html', $instance);
+ $blockobject->config->text = str_replace($search, $replace, $blockobject->config->text);
+ $blockobject->instance_config_commit($blockobject->pinned);
+ }
+}
+
/// Rebuild course cache which might be incorrect now
notify('Rebuilding course cache...', 'notifysuccess');
rebuild_course_cache();