public function create_shared_area($method) {
        global $DB;

        // generate some unique random name for the new area
        $name = $method . '_' . sha1(rand().uniqid($method, true));
        // create new area record
        $area = array(
            'contextid'     => context_system::instance()->id,
            'component'     => 'core_grading',
            'areaname'      => $name,
            'activemethod'  => $method);
        return $DB->insert_record('grading_areas', $area);
    }