public function course_search_form($value = '', $format = 'plain') {
        static $count = 0;
        $formid = 'coursesearch';
        if ((++$count) > 1) {
            $formid .= $count;
        }

        switch ($format) {
            case 'navbar' :
                $formid = 'coursesearchnavbar';
                $inputid = 'navsearchbox';
                $inputsize = 20;
                break;
            case 'short' :
                $inputid = 'shortsearchbox';
                $inputsize = 12;
                break;
            default :
                $inputid = 'coursesearchbox';
                $inputsize = 30;
        }

        $data = (object) [
                'searchurl' => (new moodle_url('/course/search.php'))->out(false),
                'id' => $formid,
                'inputid' => $inputid,
                'inputsize' => $inputsize,
                'value' => $value
        ];
        if ($format != 'navbar') {
            $helpicon = new \help_icon('coursesearch', 'core');
            $data->helpicon = $helpicon->export_for_template($this);
        }

        return $this->render_from_template('core_course/course_search_form', $data);
    }