original_string: protected function hidden_field_for_qt_var(question_attempt $qa, $varname, $value = null,
                                                  $classes = null) {
          if ($value === null) {
              $value = $qa->get_last_qt_var($varname);
          }
          $fieldname = $qa->get_qt_field_name($varname);
          $attributes = array('type' => 'hidden',
                                  'id' => str_replace(':', '_', $fieldname),
                                  'name' => $fieldname,
                                  'value' => $value);
          if ($classes !== null) {
              $attributes['class'] = join(' ', $classes);
          }
          return array($fieldname, html_writer::empty_tag('input', $attributes)."\n");
      }
code: protected function hidden_field_for_qt_var(question_attempt $qa, $varname, $value = null,
                                                  $classes = null) {
          if ($value === null) {
              $value = $qa->get_last_qt_var($varname);
          }
          $fieldname = $qa->get_qt_field_name($varname);
          $attributes = array('type' => 'hidden',
                                  'id' => str_replace(':', '_', $fieldname),
                                  'name' => $fieldname,
                                  'value' => $value);
          if ($classes !== null) {
              $attributes['class'] = join(' ', $classes);
          }
          return array($fieldname, html_writer::empty_tag('input', $attributes)."\n");
      }
code_tokens: protected function hidden_field_for_qt_var ( question_attempt $ qa , $ varname , $ value = null , $ classes = null ) { if ( $ value === null ) { $ value = $ qa -> get_last_qt_var ( $ varname ) ; } $ fieldname = $ qa -> get_qt_field_name ( $ varname ) ; $ attributes = array ( 'type' => 'hidden' , 'id' => str_replace ( ':' , '_' , $ fieldname ) , 'name' => $ fieldname , 'value' => $ value ) ; if ( $ classes !== null ) { $ attributes [ 'class' ] = join ( ' ' , $ classes ) ; } return array ( $ fieldname , html_writer :: empty_tag ( 'input' , $ attributes ) . "\n" ) ; }
docstring: Returns a hidden field for a qt variable
  
  @param object $qa Question attempt object
  @param string $varname The hidden var name
  @param string $value The hidden value
  @param array $classes Any additional css classes to apply
  @return array Array with field name and the html of the tag
docstring_tokens: Returns a hidden field for a qt variable