original_string: public function feedback(question_attempt $qa, question_display_options $options) {
          $output = '';
          $hint = null;
  
          if ($options->feedback) {
              $output .= html_writer::nonempty_tag('div', $this->specific_feedback($qa),
                      array('class' => 'specificfeedback'));
              $hint = $qa->get_applicable_hint();
          }
  
          if ($options->numpartscorrect) {
              $output .= html_writer::nonempty_tag('div', $this->num_parts_correct($qa),
                      array('class' => 'numpartscorrect'));
          }
  
          if ($hint) {
              $output .= $this->hint($qa, $hint);
          }
  
          if ($options->generalfeedback) {
              $output .= html_writer::nonempty_tag('div', $this->general_feedback($qa),
                      array('class' => 'generalfeedback'));
          }
  
          if ($options->rightanswer) {
              $output .= html_writer::nonempty_tag('div', $this->correct_response($qa),
                      array('class' => 'rightanswer'));
          }
  
          return $output;
      }
code: public function feedback(question_attempt $qa, question_display_options $options) {
          $output = '';
          $hint = null;
  
          if ($options->feedback) {
              $output .= html_writer::nonempty_tag('div', $this->specific_feedback($qa),
                      array('class' => 'specificfeedback'));
              $hint = $qa->get_applicable_hint();
          }
  
          if ($options->numpartscorrect) {
              $output .= html_writer::nonempty_tag('div', $this->num_parts_correct($qa),
                      array('class' => 'numpartscorrect'));
          }
  
          if ($hint) {
              $output .= $this->hint($qa, $hint);
          }
  
          if ($options->generalfeedback) {
              $output .= html_writer::nonempty_tag('div', $this->general_feedback($qa),
                      array('class' => 'generalfeedback'));
          }
  
          if ($options->rightanswer) {
              $output .= html_writer::nonempty_tag('div', $this->correct_response($qa),
                      array('class' => 'rightanswer'));
          }
  
          return $output;
      }
code_tokens: public function feedback ( question_attempt $ qa , question_display_options $ options ) { $ output = '' ; $ hint = null ; if ( $ options -> feedback ) { $ output .= html_writer :: nonempty_tag ( 'div' , $ this -> specific_feedback ( $ qa ) , array ( 'class' => 'specificfeedback' ) ) ; $ hint = $ qa -> get_applicable_hint ( ) ; } if ( $ options -> numpartscorrect ) { $ output .= html_writer :: nonempty_tag ( 'div' , $ this -> num_parts_correct ( $ qa ) , array ( 'class' => 'numpartscorrect' ) ) ; } if ( $ hint ) { $ output .= $ this -> hint ( $ qa , $ hint ) ; } if ( $ options -> generalfeedback ) { $ output .= html_writer :: nonempty_tag ( 'div' , $ this -> general_feedback ( $ qa ) , array ( 'class' => 'generalfeedback' ) ) ; } if ( $ options -> rightanswer ) { $ output .= html_writer :: nonempty_tag ( 'div' , $ this -> correct_response ( $ qa ) , array ( 'class' => 'rightanswer' ) ) ; } return $ output ; }
docstring: Generate the display of the outcome part of the question. This is the
  area that contains the various forms of feedback. This function generates
  the content of this area belonging to the question type.
  
  Subclasses will normally want to override the more specific methods
  {specific_feedback()}, {general_feedback()} and {correct_response()}
  that this method calls.
  
  @param question_attempt $qa the question attempt to display.
  @param question_display_options $options controls what should and should not be displayed.
  @return string HTML fragment.
docstring_tokens: Generate the display of the outcome part of the question . This is the area that contains the various forms of feedback . This function generates the content of this area belonging to the question type .