public function manual_comment(question_attempt $qa, question_display_options $options) {
        if ($options->manualcomment == question_display_options::EDITABLE) {
            return $this->manual_comment_fields($qa, $options);

        } else if ($options->manualcomment == question_display_options::VISIBLE) {
            return $this->manual_comment_view($qa, $options);

        } else {
            return '';
        }
    }
public function manual_comment(question_attempt $qa, question_display_options $options) {
        if ($options->manualcomment == question_display_options::EDITABLE) {
            return $this->manual_comment_fields($qa, $options);

        } else if ($options->manualcomment == question_display_options::VISIBLE) {
            return $this->manual_comment_view($qa, $options);

        } else {
            return '';
        }
    }
public function manual_comment ( question_attempt $ qa , question_display_options $ options ) { if ( $ options -> manualcomment == question_display_options :: EDITABLE ) { return $ this -> manual_comment_fields ( $ qa , $ options ) ; } else if ( $ options -> manualcomment == question_display_options :: VISIBLE ) { return $ this -> manual_comment_view ( $ qa , $ options ) ; } else { return '' ; } }
Display the manual comment, and a link to edit it, if appropriate.

@param question_attempt $qa a question attempt.
@param question_display_options $options controls what should and should not be displayed.
@return string HTML fragment.
Display the manual comment and a link to edit it if appropriate .