$str = "";
$str .= '<h1>Details</h1> <table class="spikeDataTable" cellpadding="4" cellspacing="0" border="0" id="table2sort" width="800">';
$str .= '<thead>';
- $str .= '<tr><td class="spikeDataTableHeadLeft" id="sortCell0" rowspan="2" style="white-space:nowrap" width="52%"><a id="sortCellLink0" class="headerlink" href="javascript:sort(0)" title="Sort Ascending">File Name </a></td>';
+ // start moodle modification: xhtml links
+ $str .= '<tr><td class="spikeDataTableHeadLeft" id="sortCell0" rowspan="2" style="white-space:nowrap" width="52%"><a id="sortCellLink0" class="headerlink" href="#" onclick="javascript:sort(0)" title="Sort Ascending">File Name </a></td>';
+ // end moodle modification
$str .= '<td colspan="4" class="spikeDataTableHeadCenter">Lines</td>';
- $str .= '<td class="spikeDataTableHeadCenterLast" id="sortCell5" rowspan="2" width="16%" style="white-space:nowrap"><a id="sortCellLink5" class="headerlink" href="javascript:sort(5, \'percentage\')" title="Sort Ascending">Code Coverage </a></td>';
+ // start moodle modification: xhtml links
+ $str .= '<td class="spikeDataTableHeadCenterLast" id="sortCell5" rowspan="2" width="16%" style="white-space:nowrap"><a id="sortCellLink5" class="headerlink" href="#" onclick="javascript:sort(5, \'percentage\')" title="Sort Ascending">Code Coverage </a></td>';
+ // end moodle modification
$str .= '</tr>';
// Second row - subheadings
$str .= '<tr>';
- $str .= '<td class="spikeDataTableSubHeadCenter" id="sortCell1" style="white-space:nowrap" width="8%"><a id="sortCellLink1" title="Sort Ascending" class="headerlink" href="javascript:sort(1, \'number\')">Total </a></td>';
- $str .= '<td class="spikeDataTableSubHeadCenter" id="sortCell2" style="white-space:nowrap" width="9%"><a id="sortCellLink2" title="Sort Ascending" class="headerlink" href="javascript:sort(2, \'number\')">Covered </a></td>';
- $str .= '<td class="spikeDataTableSubHeadCenter" id="sortCell3" style="white-space:nowrap" width="8%"><a id="sortCellLink3" title="Sort Ascending" class="headerlink" href="javascript:sort(3, \'number\')">Missed </a></td>';
- $str .= '<td class="spikeDataTableSubHeadCenter" id="sortCell4" style="white-space:nowrap" width="10%"><a id="sortCellLink4" title="Sort Ascending" class="headerlink" href="javascript:sort(4, \'number\')">Executable </a></td>';
+ // start moodle modification: xhtml links
+ $str .= '<td class="spikeDataTableSubHeadCenter" id="sortCell1" style="white-space:nowrap" width="8%"><a id="sortCellLink1" title="Sort Ascending" class="headerlink" href="#" onclick="javascript:sort(1, \'number\')">Total </a></td>';
+ $str .= '<td class="spikeDataTableSubHeadCenter" id="sortCell2" style="white-space:nowrap" width="9%"><a id="sortCellLink2" title="Sort Ascending" class="headerlink" href="#" onclick="javascript:sort(2, \'number\')">Covered </a></td>';
+ $str .= '<td class="spikeDataTableSubHeadCenter" id="sortCell3" style="white-space:nowrap" width="8%"><a id="sortCellLink3" title="Sort Ascending" class="headerlink" href="#" onclick="javascript:sort(3, \'number\')">Missed </a></td>';
+ $str .= '<td class="spikeDataTableSubHeadCenter" id="sortCell4" style="white-space:nowrap" width="10%"><a id="sortCellLink4" title="Sort Ascending" class="headerlink" href="#" onclick="javascript:sort(4, \'number\')">Executable </a></td>';
+ // end moodle modification
$str .= '</tr>';
$str .= '</thead>';
return $str;
$str .= '<table border="0" cellpadding="0" cellspacing="0" id="contentBox" width="800"> <tr>';
$str .= '<td align="left" valign="top"><h1>Summary</h1>';
$str .= '<table class="spikeVerticalTable" cellpadding="4" cellspacing="0" width="800" style="margin-bottom:10px" border="0">';
+ // start moodle modification: xhtml
+ $str .= '<tr>';
$str .= '<td width="380" class="spikeVerticalTableHead" style="font-size:14px">Overall Code Coverage </td>';
- $str .= '<td class="spikeVerticalTableCell" style="font-size:14px" colspan="2"><strong>' . $this->getGrandCodeCoveragePercentage() . '%</td>';
+ $str .= '<td class="spikeVerticalTableCell" style="font-size:14px" colspan="2"><strong>' . $this->getGrandCodeCoveragePercentage() . '%</strong></td>';
+ // end moodle modification
$str .= '</tr><tr>';
protected function writeFileTableHead() {
$filestr = "";
- $filestr .= '<td width="10%"class="coverageDetailsHead" >Line #</td>';
- $filestr .= '<td width="10%" class="coverageDetailsHead">Frequency</td>';
- $filestr .= '<td width="80%" class="coverageDetailsHead">Source Line</td>';
+ // start moodle modification: xhtml + column widths
+ $filestr .= '<tr><td width="5%"class="coverageDetailsHead" >Line #</td>';
+ $filestr .= '<td width="5%" class="coverageDetailsHead">Frequency</td>';
+ $filestr .= '<td width="90%" class="coverageDetailsHead">Source Line</td></tr>';
+ // end moodle modification
return $filestr;
}
* @access protected
*/
protected function preserveSpacing($string) {
+ // start moodle modification: xhtml
+ if (empty($string)) {
+ return ' ';
+ }
+ // end moodle modification
$string = htmlspecialchars($string);
$string = str_replace(" ", " ", $string);
$string = str_replace("\t", " ", $string);
-<html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>%%heading%%</title>
<link href="css/%%style%%" rel="stylesheet" type="text/css"/>
- <script language="JavaScript" type="text/javascript" src="js/sort_spikesource.js"> </script>
- <script language="JavaScript" type="text/javascript">
+ <script type="text/javascript" src="js/sort_spikesource.js"> </script>
+ <script type="text/javascript">
var tableSorter = null;
<table id="navBox" border="0" cellpadding="0" cellspacing="0">
<tr>
<td style=""><img align="bottom" name="logo" src="images/spikesource/phpcoverage.gif" alt="home" border="0" height="82" width="800"/></td>
- </td>
</tr>
</table>