public function get_component_ratings_since($context, $component, $since) {
        global $DB, $USER;

        $ratingssince = array();
        $where = 'contextid = ? AND component = ? AND (timecreated > ? OR timemodified > ?)';
        $ratings = $DB->get_records_select('rating', $where, array($context->id, $component, $since, $since));
        // Check area by area if we have permissions.
        $permissions = array();
        $rm = new rating_manager();

        foreach ($ratings as $rating) {
            // Check if the permission array for the area is cached.
            if (!isset($permissions[$rating->ratingarea])) {
                $permissions[$rating->ratingarea] = $rm->get_plugin_permissions_array($context->id, $component,
                                                                                        $rating->ratingarea);
            }

            if (($permissions[$rating->ratingarea]['view'] and $rating->userid == $USER->id) or
                    ($permissions[$rating->ratingarea]['viewany'] or $permissions[$rating->ratingarea]['viewall'])) {
                $ratingssince[$rating->id] = $rating;
            }
        }
        return $ratingssince;
    }