original_string: public function output_html($data, $query='') {
          global $OUTPUT;
  
          $context = (object) [
              'id' => $this->get_id(),
              'name' => $this->get_full_name(),
              'no' => $this->no,
              'value' => $this->yes,
              'checked' => (string) $data === $this->yes,
          ];
  
          $default = $this->get_defaultsetting();
          if (!is_null($default)) {
              if ((string)$default === $this->yes) {
                  $defaultinfo = get_string('checkboxyes', 'admin');
              } else {
                  $defaultinfo = get_string('checkboxno', 'admin');
              }
          } else {
              $defaultinfo = NULL;
          }
  
          $element = $OUTPUT->render_from_template('core_admin/setting_configcheckbox', $context);
  
          return format_admin_setting($this, $this->visiblename, $element, $this->description, true, '', $defaultinfo, $query);
      }
code: public function output_html($data, $query='') {
          global $OUTPUT;
  
          $context = (object) [
              'id' => $this->get_id(),
              'name' => $this->get_full_name(),
              'no' => $this->no,
              'value' => $this->yes,
              'checked' => (string) $data === $this->yes,
          ];
  
          $default = $this->get_defaultsetting();
          if (!is_null($default)) {
              if ((string)$default === $this->yes) {
                  $defaultinfo = get_string('checkboxyes', 'admin');
              } else {
                  $defaultinfo = get_string('checkboxno', 'admin');
              }
          } else {
              $defaultinfo = NULL;
          }
  
          $element = $OUTPUT->render_from_template('core_admin/setting_configcheckbox', $context);
  
          return format_admin_setting($this, $this->visiblename, $element, $this->description, true, '', $defaultinfo, $query);
      }
code_tokens: public function output_html ( $ data , $ query = '' ) { global $ OUTPUT ; $ context = ( object ) [ 'id' => $ this -> get_id ( ) , 'name' => $ this -> get_full_name ( ) , 'no' => $ this -> no , 'value' => $ this -> yes , 'checked' => ( string ) $ data === $ this -> yes , ] ; $ default = $ this -> get_defaultsetting ( ) ; if ( ! is_null ( $ default ) ) { if ( ( string ) $ default === $ this -> yes ) { $ defaultinfo = get_string ( 'checkboxyes' , 'admin' ) ; } else { $ defaultinfo = get_string ( 'checkboxno' , 'admin' ) ; } } else { $ defaultinfo = NULL ; } $ element = $ OUTPUT -> render_from_template ( 'core_admin/setting_configcheckbox' , $ context ) ; return format_admin_setting ( $ this , $ this -> visiblename , $ element , $ this -> description , true , '' , $ defaultinfo , $ query ) ; }
docstring: Returns an XHTML checkbox field
  
  @param string $data If $data matches yes then checkbox is checked
  @param string $query
  @return string XHTML field
docstring_tokens: Returns an XHTML checkbox field