original_string: 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;
          }
  
          $strsearchcourses = get_string("searchcourses");
          $searchurl = new moodle_url('/course/management.php');
  
          $output = html_writer::start_div('row');
          $output .= html_writer::start_div('col-md-12');
          $output .= html_writer::start_tag('form', array('class' => 'card', 'id' => $formid,
                  'action' => $searchurl, 'method' => 'get'));
          $output .= html_writer::start_tag('fieldset', array('class' => 'coursesearchbox invisiblefieldset'));
          $output .= html_writer::tag('div', $this->output->heading($strsearchcourses.': ', 2, 'm-0'),
                  array('class' => 'card-header'));
          $output .= html_writer::start_div('card-body');
          $output .= html_writer::start_div('input-group col-sm-6 col-lg-4 m-auto');
          $output .= html_writer::empty_tag('input', array('class' => 'form-control', 'type' => 'text', 'id' => $inputid,
                  'size' => $inputsize, 'name' => 'search', 'value' => s($value)));
          $output .= html_writer::start_tag('span', array('class' => 'input-group-btn'));
          $output .= html_writer::tag('button', get_string('go'), array('class' => 'btn btn-primary', 'type' => 'submit'));
          $output .= html_writer::end_tag('span');
          $output .= html_writer::end_div();
          $output .= html_writer::end_div();
          $output .= html_writer::end_tag('fieldset');
          $output .= html_writer::end_tag('form');
          $output .= html_writer::end_div();
          $output .= html_writer::end_div();
  
          return $output;
      }
code: 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;
          }
  
          $strsearchcourses = get_string("searchcourses");
          $searchurl = new moodle_url('/course/management.php');
  
          $output = html_writer::start_div('row');
          $output .= html_writer::start_div('col-md-12');
          $output .= html_writer::start_tag('form', array('class' => 'card', 'id' => $formid,
                  'action' => $searchurl, 'method' => 'get'));
          $output .= html_writer::start_tag('fieldset', array('class' => 'coursesearchbox invisiblefieldset'));
          $output .= html_writer::tag('div', $this->output->heading($strsearchcourses.': ', 2, 'm-0'),
                  array('class' => 'card-header'));
          $output .= html_writer::start_div('card-body');
          $output .= html_writer::start_div('input-group col-sm-6 col-lg-4 m-auto');
          $output .= html_writer::empty_tag('input', array('class' => 'form-control', 'type' => 'text', 'id' => $inputid,
                  'size' => $inputsize, 'name' => 'search', 'value' => s($value)));
          $output .= html_writer::start_tag('span', array('class' => 'input-group-btn'));
          $output .= html_writer::tag('button', get_string('go'), array('class' => 'btn btn-primary', 'type' => 'submit'));
          $output .= html_writer::end_tag('span');
          $output .= html_writer::end_div();
          $output .= html_writer::end_div();
          $output .= html_writer::end_tag('fieldset');
          $output .= html_writer::end_tag('form');
          $output .= html_writer::end_div();
          $output .= html_writer::end_div();
  
          return $output;
      }
code_tokens: 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 ; } $ strsearchcourses = get_string ( "searchcourses" ) ; $ searchurl = new moodle_url ( '/course/management.php' ) ; $ output = html_writer :: start_div ( 'row' ) ; $ output .= html_writer :: start_div ( 'col-md-12' ) ; $ output .= html_writer :: start_tag ( 'form' , array ( 'class' => 'card' , 'id' => $ formid , 'action' => $ searchurl , 'method' => 'get' ) ) ; $ output .= html_writer :: start_tag ( 'fieldset' , array ( 'class' => 'coursesearchbox invisiblefieldset' ) ) ; $ output .= html_writer :: tag ( 'div' , $ this -> output -> heading ( $ strsearchcourses . ': ' , 2 , 'm-0' ) , array ( 'class' => 'card-header' ) ) ; $ output .= html_writer :: start_div ( 'card-body' ) ; $ output .= html_writer :: start_div ( 'input-group col-sm-6 col-lg-4 m-auto' ) ; $ output .= html_writer :: empty_tag ( 'input' , array ( 'class' => 'form-control' , 'type' => 'text' , 'id' => $ inputid , 'size' => $ inputsize , 'name' => 'search' , 'value' => s ( $ value ) ) ) ; $ output .= html_writer :: start_tag ( 'span' , array ( 'class' => 'input-group-btn' ) ) ; $ output .= html_writer :: tag ( 'button' , get_string ( 'go' ) , array ( 'class' => 'btn btn-primary' , 'type' => 'submit' ) ) ; $ output .= html_writer :: end_tag ( 'span' ) ; $ output .= html_writer :: end_div ( ) ; $ output .= html_writer :: end_div ( ) ; $ output .= html_writer :: end_tag ( 'fieldset' ) ; $ output .= html_writer :: end_tag ( 'form' ) ; $ output .= html_writer :: end_div ( ) ; $ output .= html_writer :: end_div ( ) ; return $ output ; }
docstring: Renders html to display a course search form
  
  @param string $value default value to populate the search field
  @param string $format display format - 'plain' (default), 'short' or 'navbar'
  @return string
docstring_tokens: Renders html to display a course search form