protected static function is_course_expired(\stdClass $course) : bool {
        $context = \context_course::instance($course->id);

        return self::is_course_context_expired($context);
    }
protected static function is_course_expired(\stdClass $course) : bool {
        $context = \context_course::instance($course->id);

        return self::is_course_context_expired($context);
    }
protected static function is_course_expired ( \ stdClass $ course ) : bool { $ context = \ context_course :: instance ( $ course -> id ) ; return self :: is_course_context_expired ( $ context ) ; }
Check whether the course has expired.

@param   \stdClass   $course
@return  bool
Check whether the course has expired .