public static function delete_favourites_for_all_users(\context $context, string $component, string $itemtype,
                                                           int $itemid = 0) {
        global $DB;

        $params = [
            'component' => $component,
            'itemtype' => $itemtype,
            'contextid' => $context->id
        ];

        $select = "component = :component AND itemtype =:itemtype AND contextid = :contextid";

        if (!empty($itemid)) {
            $select .= " AND itemid = :itemid";
            $params['itemid'] = $itemid;
        }
        $DB->delete_records_select('favourite', $select, $params);
    }