Example #1
0
    $itemclass = 'feedback_item_' . $item->typ;
    //get the instance of the item-class
    $itemobj = new $itemclass();
    $rowOffset1 = $itemobj->excelprint_item($worksheet1, $rowOffset1, $item, $mygroupid, $coursefilter);
}
////////////////////////////////////////////////////////////////////////
//print the detailed sheet
////////////////////////////////////////////////////////////////////////
//get the completeds
$completeds = feedback_get_completeds_group($feedback, $mygroupid, $coursefilter);
//important: for each completed you have to print each item, even if it is not filled out!!!
//therefor for each completed we have to iterate over all items of the feedback
//this is done by feedback_excelprint_detailed_items
$rowOffset2 = 0;
//first we print the table-header
$rowOffset2 = feedback_excelprint_detailed_head($worksheet2, $items, $rowOffset2);
if (is_array($completeds)) {
    foreach ($completeds as $completed) {
        $rowOffset2 = feedback_excelprint_detailed_items($worksheet2, $completed, $items, $rowOffset2);
    }
}
$workbook->close();
exit;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//functions
////////////////////////////////////////////////////////////////////////////////
function feedback_excelprint_detailed_head(&$worksheet, $items, $rowOffset)
{
    global $fstring, $feedback;
    if (!$items) {
Example #2
0
foreach ($items as $item) {
    //get the class of item-typ
    $itemobj = feedback_get_item_class($item->typ);
    $row_offset1 = $itemobj->excelprint_item($worksheet1, $row_offset1, $xls_formats, $item, $mygroupid, $coursefilter);
}
////////////////////////////////////////////////////////////////////////
//print the detailed sheet
////////////////////////////////////////////////////////////////////////
//get the completeds
$completeds = feedback_get_completeds_group($feedback, $mygroupid, $coursefilter);
//important: for each completed you have to print each item, even if it is not filled out!!!
//therefor for each completed we have to iterate over all items of the feedback
//this is done by feedback_excelprint_detailed_items
$row_offset2 = 0;
//first we print the table-header
$row_offset2 = feedback_excelprint_detailed_head($worksheet2, $xls_formats, $items, $row_offset2);
if (is_array($completeds)) {
    foreach ($completeds as $completed) {
        $row_offset2 = feedback_excelprint_detailed_items($worksheet2, $xls_formats, $completed, $items, $row_offset2);
    }
}
$workbook->close();
exit;
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//functions
////////////////////////////////////////////////////////////////////////////////
function feedback_excelprint_detailed_head(&$worksheet, $xls_formats, $items, $row_offset)
{
    global $fstring, $feedback;
    if (!$items) {