Get this report's output as an HTML string.
@return The html for this control.
168015
public String getHtmlControl()
    {
        StringWriter sw = new StringWriter();
        PrintWriter rw = new PrintWriter(sw);
        this.getScreenField().printData(rw, HtmlConstants.HTML_DISPLAY);      // DO print screen
        String string = sw.toString();
        return string;
    }
860396
public function _toHtml()
    {
        $html = '';

        foreach ($this->getChildNames() as $childName) {
            if ($html === '') {
                $renderer = $this->getChildBlock($childName);
                $html = $renderer->render($this->getFilter());
            }
        }

        return $html;
    }
1073563
public String buildHtmlHelpEnd() {

        StringBuffer result = new StringBuffer(4);
        result.append("</body>\n");
        result.append("</html>");
        return result.toString();
    }
935448
public function getHtml() : string
    {
        $head = (new HeadGenerator($this))->render();
        $body = (new BodyGenerator($this))->render();
        return "<!doctype html><html>$head$body</html>";
    }
308153
protected String defaultActionHtmlContent() {

        StringBuffer result = new StringBuffer(2048);
        result.append("<form name='");
        result.append(getList().getId());
        result.append("-form' action='");
        result.append(getDialogRealUri());
        result.append("' method='post' class='nomargin'");
        if (getList().getMetadata().isSearchable()) {
            result.append(" onsubmit=\"listSearchAction('");
            result.append(getList().getId());
            result.append("', '");
            result.append(getList().getMetadata().getSearchAction().getId());
            result.append("', '");
            result.append(getList().getMetadata().getSearchAction().getConfirmationMessage().key(getLocale()));
            result.append("');\"");
        }
        result.append(">\n");
        result.append(allParamsAsHidden());
        result.append("\n");
        getList().setWp(this);
        result.append(getList().listHtml());
        result.append("\n</form>\n");
        return result.toString();
    }
192913
public function getHtml(): string
  {
    $this->prepareOverviewTable();

    if (!empty($this->templateData))
    {
      $this->setAttrData('slat-name', $this->submitName);

      // If required add template row to this louver control. This row will be used by JS for adding dynamically
      // additional rows to the louver control.
      $this->templateData[$this->templateKey] = 0;
      $row                                    = $this->rowFactory->createRow($this, $this->templateData);
      $row->addClass('slat_template');
      $row->setAttrStyle('visibility: collapse');
      $row->prepare($this->submitName);
    }

    $ret = $this->prefix;

    $ret .= Html::generateTag('table', $this->attributes);

    // Generate HTML code for the column classes.
    $ret .= '<colgroup>';
    $ret .= $this->rowFactory->getHtmlColumnGroup();
    $ret .= '</colgroup>';

    $ret .= Html::generateTag('thead', ['class' => OverviewTable::$class]);
    $ret .= $this->getHtmlHeader();
    $ret .= '</thead>';

    if ($this->footerControl)
    {
      $ret .= Html::generateTag('tfoot', ['class' => OverviewTable::$class]);
      $ret .= '<tr>';
      $ret .= Html::generateTag('td', ['colspan' => $this->rowFactory->getNumberOfColumns()]);
      $ret .= $this->footerControl->getHtml();
      $ret .= '</td>';
      $ret .= '<td class="error"></td>';
      $ret .= '</tr>';
      $ret .= '</tfoot>';
    }

    $ret .= Html::generateTag('tbody', ['class' => OverviewTable::$class]);
    $ret .= $this->getHtmlBody();
    $ret .= '</tbody>';

    $ret .= '</table>';

    $ret .= $this->postfix;

    $this->rowFactory->generateResponsiveCss($this->getAttribute('id'));

    return $ret;
  }
10143
protected function getHtmlBody(): string
  {
    $ret = '';
    $i   = 0;
    foreach ($this->controls as $control)
    {
      if ($control!==$this->footerControl)
      {
        $control->addClass(OverviewTable::$class);
        $control->addClass(($i % 2==0) ? 'even' : 'odd');

        $ret .= $control->getHtml();

        $i++;
      }
    }

    return $ret;
  }
428910
function toHTML()
    {

        // get some attributes of the control
        $attributes = $this->get_attributes(array('name', 'value', 'class', 'format', 'hours', 'minutes', 'seconds'));

        // make sure format is in lower characters
        $attributes['format'] = strtolower($attributes['format']);

        // if invalid format specified, revert to the default "hm"
        if (preg_match('/^[hmsg]+$/i', $attributes['format']) == 0 || strlen(preg_replace('/([a-z]{2,})/i', '$1', $attributes['format'])) != strlen($attributes['format'])) $attributes['format'] = 'hm';

        // see what have we sepcified as default time
        $time = array_diff(explode(':', trim(str_replace(array('am', 'pm'), '', strtolower($attributes['value'])))), array(''));

        // if, according to the time format, we have to show the hours, and the hour is given in the default time
        if (($hour_position = strpos($attributes['format'], 'h')) !== false && isset($time[$hour_position]))

            // the default selected hour
            $selected_hour = $time[$hour_position];

        // if, according to the time format, we have to show the minutes, and the minutes are given in the default time
        if (($minutes_position = strpos($attributes['format'], 'm')) !== false && isset($time[$minutes_position]))

            // the default selected minute
            $selected_minute = $time[$minutes_position];

        // if, according to the time format, we have to show the seconds, and the seconds are given in the default time
        if (($seconds_position = strpos($attributes['format'], 's')) !== false && isset($time[$seconds_position]))

            // the default selected minute
            $selected_second = $time[$seconds_position];

        // if 12-hours format is to be used
        if (strpos($attributes['format'], 'g')) {

            // set a flag
            $ampm = true;

            // if this is also present in the default time
            if (preg_match('/\bam\b|\bpm\b/i', $attributes['value'], $matches))

                // extract the format from the default time
                $ampm = strtolower($matches[0]);

        }


        $output = '';

        // if the hour picker is to be shown
        if ($hour_position !== false) {

            // generate the hour picker
            $output .= '
                <select name="' . $attributes['name'] . '_hours" id="' . $attributes['name'] . '_hours" ' . $this->_render_attributes() . '>
                    <option value="">-</option>';

            foreach ($attributes['hours'] as $hour)

                // show 12 or 24 hours depending on the format
                if (!isset($ampm) || ($hour > 0 && $hour < 13))

                    $output .= '<option value="' . str_pad($hour, 2, '0', STR_PAD_LEFT) . '"' . (isset($selected_hour) && ltrim($selected_hour, '0') == ltrim($hour, '0') ? '  selected="selected"' : '') . '>' . str_pad($hour, 2, '0', STR_PAD_LEFT) . '</option>';

            $output .= '
                </select>
            ';

        }
        
        // if the minute picker is to be shown
        if ($minutes_position !== false) {

            // generate the minute picker
            $output .= '
                <select name="' . $attributes['name'] . '_minutes" id="' . $attributes['name'] . '_minutes" ' . $this->_render_attributes() . '>
                    <option value="">-</option>';

            foreach ($attributes['minutes'] as $minute)

                $output .= '<option value="' . str_pad($minute, 2, '0', STR_PAD_LEFT) . '"' . (isset($selected_minute) && ltrim($selected_minute, '0') == ltrim($minute, '0') ? ' selected="selected"' : '') . '>' . str_pad($minute, 2, '0', STR_PAD_LEFT) . '</option>';

            $output .= '
                </select>
            ';

        }

        // if the seconds picker is to be shown
        if ($seconds_position !== false) {

            // generate the seconds picker
            $output .= '
                <select name="' . $attributes['name'] . '_seconds" id="' . $attributes['name'] . '_seconds" ' . $this->_render_attributes() . '>
                    <option value="">-</option>';

            foreach ($attributes['seconds'] as $second)

                $output .= '<option value="' . str_pad($second, 2, '0', STR_PAD_LEFT) . '"' . (isset($selected_second) && ltrim($selected_second, '0') == ltrim($second, '0') ? ' selected="selected"' : '') . '>' . str_pad($second, 2, '0', STR_PAD_LEFT) . '</option>';

            $output .= '
                </select>
            ';

        }

        // if am/pm picker is to be shown
        if (isset($ampm)) {

            // generate the AM/PM picker
            $output .= '
                <select name="' . $attributes['name'] . '_ampm" id="' . $attributes['name'] . '_ampm" ' . $this->_render_attributes() . '>
                    <option value="">-</option>';

            $output .= '<option value="AM"' . ($ampm === 'am' ? ' selected="selected"' : '') . '>AM</option>';
            $output .= '<option value="PM"' . ($ampm === 'pm' ? ' selected="selected"' : '') . '>PM</option>';

            $output .= '
                </select>
            ';

        }

        $output .= '<div class="clear"></div>';

        return $output;

    }
232312
public function toHtml()
    {
        $this->detectOtherValues();

        $html = '';
        $html .= "<{$this->mainPaginationTag} class=\"{$this->mainCssClass}\">";
        $html .= $this->getHtml4FirstPage();
        $html .= $this->getHtml4PreviousPage();
        $html .= $this->getHtml4Pages();
        $html .= $this->getHtml4NextPage();
        $html .= $this->getHtml4LastPage();
        $html .= "</{$this->mainPaginationTag}>";

        return $html;
    }
82885
public function toXHTML()
    {
        ob_start();

        $this->displayStyleSheet();

        echo '<div class="swat-exception">';

        printf(
            '<h3>%s</h3>' .
                '<div class="swat-exception-body">' .
                'Message:<div class="swat-exception-message">%s</div>' .
                'Occurred in file <strong>%s</strong> ' .
                'on line <strong>%s</strong>.<br /><br />',
            $this->getSeverityString(),
            nl2br(htmlspecialchars($this->message)),
            $this->file,
            $this->line
        );

        echo 'Stack Trace:<br /><dl>';
        $count = count($this->backtrace);

        foreach ($this->backtrace as $entry) {
            $class = array_key_exists('class', $entry) ? $entry['class'] : null;

            $function = array_key_exists('function', $entry)
                ? $entry['function']
                : null;

            if (array_key_exists('args', $entry)) {
                $arguments = htmlspecialchars(
                    $this->getArguments($entry['args'], $function, $class),
                    null,
                    'UTF-8'
                );
            } else {
                $arguments = '';
            }

            printf(
                '<dt>%s.</dt><dd>In file <strong>%s</strong> ' .
                    'line&nbsp;<strong>%s</strong>.<br />Method: ' .
                    '<strong>%s%s%s(</strong>%s<strong>)</strong></dd>',
                --$count,
                array_key_exists('file', $entry) ? $entry['file'] : 'unknown',
                array_key_exists('line', $entry) ? $entry['line'] : 'unknown',
                $class === null ? '' : $class,
                array_key_exists('type', $entry) ? $entry['type'] : '',
                $function === null ? '' : $function,
                $arguments
            );
        }

        echo '</dl></div></div>';

        return ob_get_clean();
    }
497641
public String[] getHtml2CharMapping () {
    	m_Html2Char[0] = " ";	//&#32
    	m_Html2Char[1] = "!";
    	m_Html2Char[2] = "\"";
    	m_Html2Char[3] = "#";	
    	m_Html2Char[4] = "$";	//36
    	m_Html2Char[5] = "%";
    	m_Html2Char[6] = "&";
    	m_Html2Char[7] = "'";
    	m_Html2Char[8] = "(";
    	m_Html2Char[9] = ")";	//41
    	m_Html2Char[10] = "*";
    	m_Html2Char[11] = "+";
    	m_Html2Char[12] = ",";
    	m_Html2Char[13] = "-";
    	m_Html2Char[14] = ".";	//46
    	m_Html2Char[15] = "/";	
    	m_Html2Char[16] = "0";
    	m_Html2Char[17] = "1";
    	m_Html2Char[18] = "2";
    	m_Html2Char[19] = "3";	//51
    	m_Html2Char[20] = "4";
    	m_Html2Char[21] = "5";
    	m_Html2Char[22] = "6";
    	m_Html2Char[23] = "7";
    	m_Html2Char[24] = "8";	//56
    	m_Html2Char[25] = "9";
    	m_Html2Char[26] = ":";
    	m_Html2Char[27] = ";";
    	m_Html2Char[28] = "<";
    	m_Html2Char[29] = "=";	//61
    	m_Html2Char[30] = ">";
    	m_Html2Char[31] = "?";
    	m_Html2Char[32] = "@";
    	m_Html2Char[33] = "A";
    	m_Html2Char[34] = "B";	//66
    	m_Html2Char[35] = "C";
    	m_Html2Char[36] = "D";
    	m_Html2Char[37] = "E";
    	m_Html2Char[38] = "F";
    	m_Html2Char[39] = "G";	//71
    	m_Html2Char[40] = "H";
    	m_Html2Char[41] = "I";
    	m_Html2Char[42] = "J";
    	m_Html2Char[43] = "K";
    	m_Html2Char[44] = "L";	//76
    	m_Html2Char[45] = "M";
    	m_Html2Char[46] = "N";
    	m_Html2Char[47] = "O";
    	m_Html2Char[48] = "P";
    	m_Html2Char[49] = "Q";	//81
    	m_Html2Char[50] = "R";
    	m_Html2Char[51] = "S";
    	m_Html2Char[52] = "T";
    	m_Html2Char[53] = "U";
    	m_Html2Char[54] = "V";	//86
    	m_Html2Char[55] = "W";
    	m_Html2Char[56] = "X";
    	m_Html2Char[57] = "Y";
    	m_Html2Char[58] = "Z";
    	m_Html2Char[59] = "[";	//91
    	m_Html2Char[60] = "\\";
    	m_Html2Char[61] = "]";
    	m_Html2Char[62] = "^";
    	m_Html2Char[63] = "_";
    	m_Html2Char[64] = "`";	//96
    	m_Html2Char[65] = "a";		
    	m_Html2Char[66] = "b";
    	m_Html2Char[67] = "c";
    	m_Html2Char[68] = "d";
    	m_Html2Char[69] = "e";	//101
    	m_Html2Char[70] = "f";
    	m_Html2Char[71] = "g";
    	m_Html2Char[72] = "h";
    	m_Html2Char[73] = "i";
    	m_Html2Char[74] = "j";	//106
    	m_Html2Char[75] = "k";
    	m_Html2Char[76] = "l";
    	m_Html2Char[77] = "m";
    	m_Html2Char[78] = "n";
    	m_Html2Char[79] = "o";	//111
    	m_Html2Char[80] = "p";
    	m_Html2Char[81] = "q";
    	m_Html2Char[82] = "r";
    	m_Html2Char[83] = "s";
    	m_Html2Char[84] = "t";	//116
    	m_Html2Char[85] = "u";
    	m_Html2Char[86] = "v";
    	m_Html2Char[87] = "w";
    	m_Html2Char[88] = "x";
    	m_Html2Char[89] = "y";	//121
    	m_Html2Char[90] = "z";
    	m_Html2Char[91] = "{";
    	m_Html2Char[92] = "|";
    	m_Html2Char[93] = "}";
    	m_Html2Char[94] = "~";	//126
    	
    	
    	return m_Html2Char;
    }
141457
public function html() {
        global $OUTPUT;

        $html = '';

        $types = gradereport_singleview::valid_screens();

        foreach ($types as $type) {
            $classname = "gradereport_singleview\\local\\screen\\${type}";

            $screen = new $classname($this->courseid, null, $this->groupid);

            if (!$screen instanceof selectable_items) {
                continue;
            }

            $options = $screen->options();

            if (empty($options)) {
                continue;
            }

            $params = array(
                'id' => $this->courseid,
                'item' => $screen->item_type(),
                'group' => $this->groupid
            );

            $url = new moodle_url('/grade/report/singleview/index.php', $params);

            $select = new \single_select($url, 'itemid', $options, '', array('' => $screen->select_label()));
            $select->set_label($screen->select_label(), array('class'=>'accesshide'));
            $html .= $OUTPUT->render($select);
        }
        $html = $OUTPUT->container($html, 'selectitems');

        if (empty($html)) {
            $OUTPUT->notification(get_string('noscreens', 'gradereport_singleview'));
        }

        return $html;
    }
79176
public String toHtml() {
        StringBuilder stringBuilder = new StringBuilder();

        stringBuilder
                .append("<p>")
                .append(objectNode.get(TYPE).asText()).append(": ")
                .append(objectNode.get(MESSAGE).asText()).append(" -> ")
                .append(objectNode.get(DETAILS).toString())
                .append("</p>");

        return stringBuilder.toString();
    }
179725
public String toHTML() {
        StringBuilder builder = new StringBuilder();

        int numClasses = classes.size();
        // Header Row
        builder.append("<table>\n");
        builder.append("<tr><th class=\"empty-space\" colspan=\"2\" rowspan=\"2\">");
        builder.append(String.format("<th class=\"predicted-class-header\" colspan=\"%d\">Predicted Class</th></tr>%n",
                        numClasses + 1));

        // Predicted Classes Header Row
        builder.append("<tr>");
        // builder.append("<th></th><th></th>");
        for (T predicted : classes) {
            builder.append("<th class=\"predicted-class-header\">");
            builder.append(predicted);
            builder.append("</th>");
        }
        builder.append("<th class=\"predicted-class-header\">Total</th>");
        builder.append("</tr>\n");

        // Data Rows
        String firstColumnLabel = String.format(
                        "<tr><th class=\"actual-class-header\" rowspan=\"%d\">Actual Class</th>", numClasses + 1);
        for (T actual : classes) {
            builder.append(firstColumnLabel);
            firstColumnLabel = "<tr>";
            builder.append(String.format("<th class=\"actual-class-header\" >%s</th>", actual));

            for (T predicted : classes) {
                builder.append("<td class=\"count-element\">");
                builder.append(getCount(actual, predicted));
                builder.append("</td>");
            }

            // Actual Class Totals Column
            builder.append("<td class=\"count-element\">");
            builder.append(getActualTotal(actual));
            builder.append("</td>");
            builder.append("</tr>\n");
        }

        // Predicted Class Totals Row
        builder.append("<tr><th class=\"actual-class-header\">Total</th>");
        for (T predicted : classes) {
            builder.append("<td class=\"count-element\">");
            builder.append(getPredictedTotal(predicted));
            builder.append("</td>");
        }
        builder.append("<td class=\"empty-space\"></td>\n");
        builder.append("</tr>\n");
        builder.append("</table>\n");

        return builder.toString();
    }
430880
public String prettyHtml() {
        StringBuilder html = new StringBuilder();
        for (Change aDiff : getChangeList()) {
            String text = aDiff.text.replace("&", "&amp;")
                                    .replace("<", "&lt;")
                                    .replace(">", "&gt;")
                                    .replace("\n", "&para;<br>");
            switch (aDiff.operation) {
                case INSERT:
                    html.append("<ins style=\"background:#e6ffe6;\">").append(text)
                        .append("</ins>");
                    break;
                case DELETE:
                    html.append("<del style=\"background:#ffe6e6;\">").append(text)
                        .append("</del>");
                    break;
                case EQUAL:
                    html.append("<span>").append(text).append("</span>");
                    break;
            }
        }
        return html.toString();
    }
227551
public static String markdownToHtml(String markdownString) {
		if (StringUtils.isBlank(markdownString)) {
			return "";
		}
		return HTML_RENDERER.render(MD_PARSER.parse(markdownString));
	}
7084
private void generateHTMLReport(BufferedWriter writer, BufferedReader templateReader, String jsonReport)
            throws IOException {

        logger.entering(new Object[] { writer, templateReader, jsonReport });

        String readLine = null;
        while ((readLine = templateReader.readLine()) != null) {
            if (readLine.trim().equals("${reports}")) {
                writer.write(jsonReport);
                writer.newLine();
            } else {
                writer.write(readLine);
                writer.newLine();
            }
        }
        logger.exiting();
    }