Permalink
Browse files

grader report MDL-20179 Fixed broken JS on grader report

  • Loading branch information...
1 parent a368208 commit 1721304eea14a3e3a87795a7dc1ea47d1e626194 Andrew Davis committed Nov 27, 2009
Showing with 9 additions and 5 deletions.
  1. +9 −5 grade/report/grader/index.php
@@ -198,14 +198,18 @@
function init() {
// Adjust height of header c0
+ //"heading_name_row" only exists if static students column is turned on
var rows = YAHOO.util.Dom.getElementsByClassName('heading_name_row');
- var header_cell_region = YAHOO.util.Dom.getRegion();
- if(header_cell_region)
+ if(rows && rows.length>0)
{
- var height = header_cell_region.bottom - header_cell_region.top;
- if(!isNaN(height))
+ var header_cell_region = YAHOO.util.Dom.getRegion(rows[rows.length-1].firstChild);
+ if(header_cell_region)
{
- YAHOO.util.Dom.setStyle('studentheader', 'height', height + 'px');
+ var height = header_cell_region.bottom - header_cell_region.top;
+ if(!isNaN(height))
+ {
+ YAHOO.util.Dom.setStyle('studentheader', 'height', height + 'px');
+ }
}
}

0 comments on commit 1721304

Please sign in to comment.