Skip to content

Commit

Permalink
grader report MDL-20179 Fixed broken JS on grader report
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Davis committed Nov 27, 2009
1 parent f6607a9 commit 7f276b0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions grade/report/grader/grader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,18 @@ YAHOO.namespace("graderreport");

YAHOO.graderreport.init = function() {
// 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');
}
}
}

Expand Down

0 comments on commit 7f276b0

Please sign in to comment.