public function get_course_name(\context $context) {
        $courseid = $this->courseid;
        if (empty($courseid)) {
            return get_string('site');
        } else {
            try {
                $course = get_course($courseid);
                return format_string($course->fullname, true, array('context' => $context));
            } catch (\dml_exception $e) {
                return '-';
            }
        }
    }