public function add_issue_to_table(&$table, $issueresult, $detailed = false) {
        global $OUTPUT;
        $statusarr = array(self::REPORT_PERFORMANCE_OK => 'statusok',
                        self::REPORT_PERFORMANCE_WARNING => 'statuswarning',
                        self::REPORT_PERFORMANCE_SERIOUS => 'statusserious',
                        self::REPORT_PERFORMANCE_CRITICAL => 'statuscritical');

        $row = array();
        if ($detailed) {
            $row[0] = $this->doc_link($issueresult->issue, $issueresult->name);
        } else {
            $url = new moodle_url('/report/performance/index.php', array('issue' => $issueresult->issue));
            $row[0] = html_writer::link($url, $issueresult->name);
        }
        $row[1] = html_writer::tag('span', $issueresult->statusstr, array('class' => $statusarr[$issueresult->status]));
        $row[2] = $issueresult->comment;
        if (!empty($issueresult->configlink)) {
            $editicon = $OUTPUT->pix_icon('i/settings', $issueresult->issue);
            $row[3] = $OUTPUT->action_link($issueresult->configlink, $editicon);
        } else {
            $row[3] = '';
        }

        $table->data[] = $row;
    }
public function add_issue_to_table(&$table, $issueresult, $detailed = false) {
        global $OUTPUT;
        $statusarr = array(self::REPORT_PERFORMANCE_OK => 'statusok',
                        self::REPORT_PERFORMANCE_WARNING => 'statuswarning',
                        self::REPORT_PERFORMANCE_SERIOUS => 'statusserious',
                        self::REPORT_PERFORMANCE_CRITICAL => 'statuscritical');

        $row = array();
        if ($detailed) {
            $row[0] = $this->doc_link($issueresult->issue, $issueresult->name);
        } else {
            $url = new moodle_url('/report/performance/index.php', array('issue' => $issueresult->issue));
            $row[0] = html_writer::link($url, $issueresult->name);
        }
        $row[1] = html_writer::tag('span', $issueresult->statusstr, array('class' => $statusarr[$issueresult->status]));
        $row[2] = $issueresult->comment;
        if (!empty($issueresult->configlink)) {
            $editicon = $OUTPUT->pix_icon('i/settings', $issueresult->issue);
            $row[3] = $OUTPUT->action_link($issueresult->configlink, $editicon);
        } else {
            $row[3] = '';
        }

        $table->data[] = $row;
    }
public function add_issue_to_table ( & $ table , $ issueresult , $ detailed = false ) { global $ OUTPUT ; $ statusarr = array ( self :: REPORT_PERFORMANCE_OK => 'statusok' , self :: REPORT_PERFORMANCE_WARNING => 'statuswarning' , self :: REPORT_PERFORMANCE_SERIOUS => 'statusserious' , self :: REPORT_PERFORMANCE_CRITICAL => 'statuscritical' ) ; $ row = array ( ) ; if ( $ detailed ) { $ row [ 0 ] = $ this -> doc_link ( $ issueresult -> issue , $ issueresult -> name ) ; } else { $ url = new moodle_url ( '/report/performance/index.php' , array ( 'issue' => $ issueresult -> issue ) ) ; $ row [ 0 ] = html_writer :: link ( $ url , $ issueresult -> name ) ; } $ row [ 1 ] = html_writer :: tag ( 'span' , $ issueresult -> statusstr , array ( 'class' => $ statusarr [ $ issueresult -> status ] ) ) ; $ row [ 2 ] = $ issueresult -> comment ; if ( ! empty ( $ issueresult -> configlink ) ) { $ editicon = $ OUTPUT -> pix_icon ( 'i/settings' , $ issueresult -> issue ) ; $ row [ 3 ] = $ OUTPUT -> action_link ( $ issueresult -> configlink , $ editicon ) ; } else { $ row [ 3 ] = '' ; } $ table -> data [ ] = $ row ; }
Helper function to add issue details to table.

@param html_table $table table in which issue details should be added
@param report_performance_issues $issueresult issue result to be added
@param bool $detail true if issue if displayed in detail.
Helper function to add issue details to table .