original_string: public function output($line, $outcome, $status, $data) {
          global $OUTPUT;
          if ($this->outputmode == self::NO_OUTPUT) {
              return;
          }
  
          if ($this->outputmode == self::OUTPUT_PLAIN) {
              $message = array(
                  $line,
                  $outcome ? 'OK' : 'NOK',
                  isset($data['id']) ? $data['id'] : '',
                  isset($data['shortname']) ? $data['shortname'] : '',
                  isset($data['fullname']) ? $data['fullname'] : '',
                  isset($data['idnumber']) ? $data['idnumber'] : ''
              );
              $this->buffer->output(implode("\t", $message));
              if (!empty($status)) {
                  foreach ($status as $st) {
                      $this->buffer->output($st, 1);
                  }
              }
          } else if ($this->outputmode == self::OUTPUT_HTML) {
              $ci = 0;
              $this->rownb++;
              if (is_array($status)) {
                  $status = implode(html_writer::empty_tag('br'), $status);
              }
              if ($outcome) {
                  $outcome = $OUTPUT->pix_icon('i/valid', '');
              } else {
                  $outcome = $OUTPUT->pix_icon('i/invalid', '');
              }
              echo html_writer::start_tag('tr', array('class' => 'r' . $this->rownb % 2));
              echo html_writer::tag('td', $line, array('class' => 'c' . $ci++));
              echo html_writer::tag('td', $outcome, array('class' => 'c' . $ci++));
              echo html_writer::tag('td', isset($data['id']) ? $data['id'] : '', array('class' => 'c' . $ci++));
              echo html_writer::tag('td', isset($data['shortname']) ? $data['shortname'] : '', array('class' => 'c' . $ci++));
              echo html_writer::tag('td', isset($data['fullname']) ? $data['fullname'] : '', array('class' => 'c' . $ci++));
              echo html_writer::tag('td', isset($data['idnumber']) ? $data['idnumber'] : '', array('class' => 'c' . $ci++));
              echo html_writer::tag('td', $status, array('class' => 'c' . $ci++));
              echo html_writer::end_tag('tr');
          }
      }
code: public function output($line, $outcome, $status, $data) {
          global $OUTPUT;
          if ($this->outputmode == self::NO_OUTPUT) {
              return;
          }
  
          if ($this->outputmode == self::OUTPUT_PLAIN) {
              $message = array(
                  $line,
                  $outcome ? 'OK' : 'NOK',
                  isset($data['id']) ? $data['id'] : '',
                  isset($data['shortname']) ? $data['shortname'] : '',
                  isset($data['fullname']) ? $data['fullname'] : '',
                  isset($data['idnumber']) ? $data['idnumber'] : ''
              );
              $this->buffer->output(implode("\t", $message));
              if (!empty($status)) {
                  foreach ($status as $st) {
                      $this->buffer->output($st, 1);
                  }
              }
          } else if ($this->outputmode == self::OUTPUT_HTML) {
              $ci = 0;
              $this->rownb++;
              if (is_array($status)) {
                  $status = implode(html_writer::empty_tag('br'), $status);
              }
              if ($outcome) {
                  $outcome = $OUTPUT->pix_icon('i/valid', '');
              } else {
                  $outcome = $OUTPUT->pix_icon('i/invalid', '');
              }
              echo html_writer::start_tag('tr', array('class' => 'r' . $this->rownb % 2));
              echo html_writer::tag('td', $line, array('class' => 'c' . $ci++));
              echo html_writer::tag('td', $outcome, array('class' => 'c' . $ci++));
              echo html_writer::tag('td', isset($data['id']) ? $data['id'] : '', array('class' => 'c' . $ci++));
              echo html_writer::tag('td', isset($data['shortname']) ? $data['shortname'] : '', array('class' => 'c' . $ci++));
              echo html_writer::tag('td', isset($data['fullname']) ? $data['fullname'] : '', array('class' => 'c' . $ci++));
              echo html_writer::tag('td', isset($data['idnumber']) ? $data['idnumber'] : '', array('class' => 'c' . $ci++));
              echo html_writer::tag('td', $status, array('class' => 'c' . $ci++));
              echo html_writer::end_tag('tr');
          }
      }
code_tokens: public function output ( $ line , $ outcome , $ status , $ data ) { global $ OUTPUT ; if ( $ this -> outputmode == self :: NO_OUTPUT ) { return ; } if ( $ this -> outputmode == self :: OUTPUT_PLAIN ) { $ message = array ( $ line , $ outcome ? 'OK' : 'NOK' , isset ( $ data [ 'id' ] ) ? $ data [ 'id' ] : '' , isset ( $ data [ 'shortname' ] ) ? $ data [ 'shortname' ] : '' , isset ( $ data [ 'fullname' ] ) ? $ data [ 'fullname' ] : '' , isset ( $ data [ 'idnumber' ] ) ? $ data [ 'idnumber' ] : '' ) ; $ this -> buffer -> output ( implode ( "\t" , $ message ) ) ; if ( ! empty ( $ status ) ) { foreach ( $ status as $ st ) { $ this -> buffer -> output ( $ st , 1 ) ; } } } else if ( $ this -> outputmode == self :: OUTPUT_HTML ) { $ ci = 0 ; $ this -> rownb ++ ; if ( is_array ( $ status ) ) { $ status = implode ( html_writer :: empty_tag ( 'br' ) , $ status ) ; } if ( $ outcome ) { $ outcome = $ OUTPUT -> pix_icon ( 'i/valid' , '' ) ; } else { $ outcome = $ OUTPUT -> pix_icon ( 'i/invalid' , '' ) ; } echo html_writer :: start_tag ( 'tr' , array ( 'class' => 'r' . $ this -> rownb % 2 ) ) ; echo html_writer :: tag ( 'td' , $ line , array ( 'class' => 'c' . $ ci ++ ) ) ; echo html_writer :: tag ( 'td' , $ outcome , array ( 'class' => 'c' . $ ci ++ ) ) ; echo html_writer :: tag ( 'td' , isset ( $ data [ 'id' ] ) ? $ data [ 'id' ] : '' , array ( 'class' => 'c' . $ ci ++ ) ) ; echo html_writer :: tag ( 'td' , isset ( $ data [ 'shortname' ] ) ? $ data [ 'shortname' ] : '' , array ( 'class' => 'c' . $ ci ++ ) ) ; echo html_writer :: tag ( 'td' , isset ( $ data [ 'fullname' ] ) ? $ data [ 'fullname' ] : '' , array ( 'class' => 'c' . $ ci ++ ) ) ; echo html_writer :: tag ( 'td' , isset ( $ data [ 'idnumber' ] ) ? $ data [ 'idnumber' ] : '' , array ( 'class' => 'c' . $ ci ++ ) ) ; echo html_writer :: tag ( 'td' , $ status , array ( 'class' => 'c' . $ ci ++ ) ) ; echo html_writer :: end_tag ( 'tr' ) ; } }
docstring: Output one more line.
  
  @param int $line line number.
  @param bool $outcome success or not?
  @param array $status array of statuses.
  @param array $data extra data to display.
  @return void
docstring_tokens: Output one more line .