original_string: public function single_select($url, $name, array $options, $selected = '',
                                  $nothing = array('' => 'choosedots'), $formid = null, $attributes = array()) {
          if (!($url instanceof moodle_url)) {
              $url = new moodle_url($url);
          }
          $select = new single_select($url, $name, $options, $selected, $nothing, $formid);
  
          if (array_key_exists('label', $attributes)) {
              $select->set_label($attributes['label']);
              unset($attributes['label']);
          }
          $select->attributes = $attributes;
  
          return $this->render($select);
      }
code: public function single_select($url, $name, array $options, $selected = '',
                                  $nothing = array('' => 'choosedots'), $formid = null, $attributes = array()) {
          if (!($url instanceof moodle_url)) {
              $url = new moodle_url($url);
          }
          $select = new single_select($url, $name, $options, $selected, $nothing, $formid);
  
          if (array_key_exists('label', $attributes)) {
              $select->set_label($attributes['label']);
              unset($attributes['label']);
          }
          $select->attributes = $attributes;
  
          return $this->render($select);
      }
code_tokens: public function single_select ( $ url , $ name , array $ options , $ selected = '' , $ nothing = array ( '' => 'choosedots' ) , $ formid = null , $ attributes = array ( ) ) { if ( ! ( $ url instanceof moodle_url ) ) { $ url = new moodle_url ( $ url ) ; } $ select = new single_select ( $ url , $ name , $ options , $ selected , $ nothing , $ formid ) ; if ( array_key_exists ( 'label' , $ attributes ) ) { $ select -> set_label ( $ attributes [ 'label' ] ) ; unset ( $ attributes [ 'label' ] ) ; } $ select -> attributes = $ attributes ; return $ this -> render ( $ select ) ; }
docstring: Returns a form with a single select widget.
  
  Theme developers: DO NOT OVERRIDE! Please override function
  {@link core_renderer::render_single_select()} instead.
  
  @param moodle_url $url form action target, includes hidden fields
  @param string $name name of selection field - the changing parameter in url
  @param array $options list of options
  @param string $selected selected element
  @param array $nothing
  @param string $formid
  @param array $attributes other attributes for the single select
  @return string HTML fragment
docstring_tokens: Returns a form with a single select widget .