public static function action_course_hide(\core_course_list_element $course) {
        if (!$course->can_change_visibility()) {
            throw new \moodle_exception('permissiondenied', 'error', '', null,
                'core_course_list_element::can_change_visbility');
        }
        return course_change_visibility($course->id, false);
    }
public static function action_course_hide(\core_course_list_element $course) {
        if (!$course->can_change_visibility()) {
            throw new \moodle_exception('permissiondenied', 'error', '', null,
                'core_course_list_element::can_change_visbility');
        }
        return course_change_visibility($course->id, false);
    }
public static function action_course_hide ( \ core_course_list_element $ course ) { if ( ! $ course -> can_change_visibility ( ) ) { throw new \ moodle_exception ( 'permissiondenied' , 'error' , '' , null , 'core_course_list_element::can_change_visbility' ) ; } return course_change_visibility ( $ course -> id , false ) ; }
Makes a course hidden given a \core_course_list_element object.

@param \core_course_list_element $course
@return bool
@throws \moodle_exception
Makes a course hidden given a \ core_course_list_element object .