$headers[] = get_string('attendance', 'block_ilp');
            $columns[] = 'u_attendcance';
            $nosorting[] = 'u_attendcance';
            $misattendavailable = true;
        }
        //check if the methods exists
        if (method_exists($misclass, 'getAttendance')) {
            $headers[] = get_string('punctuality', 'block_ilp');
            $columns[] = 'u_punctuality';
            $nosorting[] = 'u_punctuality';
            $mispunctualityavailable = true;
        }
    }
}
//get all enabled reports in this ilp
$reports = $dbc->get_reports(ILP_ENABLED);
//get the mamximum reports that can be displayed on the screen in the list
$maxreports = get_config('block_ilp', 'ilp_max_reports');
//check if maxreports is empty if yes then set to
$maxreports = !empty($maxreports) ? $maxreports : ILP_DEFAULT_LIST_REPORTS;
//set the number of report columns to display
//removed as we no longer need the horizonatal scrolling
//$reports	=	$flextable->limitcols($reports,$maxreports);
//we are going to create headers and columns for all enabled reports
foreach ($reports as $r) {
    $headers[] = $r->name;
    $columns[] = $r->id;
    $nosorting[] = $r->id;
}
$flextable->hoz_string = 'displayingreports';
$headers[] = get_string('lastupdated', 'block_ilp');