public static function get_course_pattern($course) {
        $color = self::coursecolor($course->id);
        $pattern = new \core_geopattern();
        $pattern->setColor($color);
        $pattern->patternbyid($course->id);
        return $pattern->datauri();
    }