コード例 #1
0
        } else {
            ExportToExcel_old($cipherer);
        }
    } else {
        if (@$_REQUEST["type"] == "word") {
            ExportToWord($cipherer);
        } else {
            if (@$_REQUEST["type"] == "xml") {
                ExportToXML($cipherer);
            } else {
                if (@$_REQUEST["type"] == "csv") {
                    $locale_info["LOCALE_SGROUPING"] = "0";
                    $locale_info["LOCALE_SDECIMAL"] = ".";
                    $locale_info["LOCALE_SMONGROUPING"] = "0";
                    $locale_info["LOCALE_SMONDECIMALSEP"] = ".";
                    ExportToCSV($cipherer);
                }
            }
        }
    }
    db_close($conn);
    return;
}
// add button events if exist
$pageObject->addButtonHandlers();
if ($options) {
    $xt->assign("rangeheader_block", true);
    $xt->assign("range_block", true);
}
$xt->assign("exportlink_attrs", 'id="saveButton' . $pageObject->id . '"');
$pageObject->body["begin"] .= "<script type=\"text/javascript\" src=\"include/loadfirst.js\"></script>\r\n";
コード例 #2
0
                $data->table[$i][] = $student->username;
            }
            $data->table[$i][] = $student->lastname;
            $data->table[$i][] = $student->firstname;
            foreach ($sessions as $sess) {
                if ($rec = $DB->get_record('attendance_log', array('sessionid' => $sess->id, 'studentid' => $student->id))) {
                    $data->table[$i][] = $statuses[$rec->statusid]->acronym;
                } else {
                    $data->table[$i][] = '-';
                }
            }
            $data->table[$i][] = get_percent($student->id, $course) . '%';
            $i++;
        }
        if ($fromform->format === 'text') {
            ExportToCSV($data, $filename);
        } else {
            ExportToTableEd($data, $filename, $fromform->format);
        }
        exit;
    } else {
        print_error('Students not found!', 'report.php?id=' . $id);
    }
} else {
    /// Print headers
    $navlinks[] = array('name' => $attforblock->name, 'link' => "view.php?id={$id}", 'type' => 'activity');
    $navlinks[] = array('name' => get_string('export', 'quiz'), 'link' => null, 'type' => 'activityinstance');
    $navigation = build_navigation($navlinks);
    print_header("{$course->shortname}: " . $attforblock->name . ' - ' . get_string('export', 'quiz'), $course->fullname, $navigation, "", "", true, "&nbsp;", navmenu($course));
    show_tabs($cm, $context, 'export');
    $mform_export->display();
コード例 #3
0
        $locale_info["LOCALE_SGROUPING"] = "0";
        $locale_info["LOCALE_SMONGROUPING"] = "0";
        ExportToExcel();
    } else {
        if (@$_REQUEST["type"] == "word") {
            ExportToWord();
        } else {
            if (@$_REQUEST["type"] == "xml") {
                ExportToXML();
            } else {
                if (@$_REQUEST["type"] == "csv") {
                    $locale_info["LOCALE_SGROUPING"] = "0";
                    $locale_info["LOCALE_SDECIMAL"] = ".";
                    $locale_info["LOCALE_SMONGROUPING"] = "0";
                    $locale_info["LOCALE_SMONDECIMALSEP"] = ".";
                    ExportToCSV();
                }
            }
        }
    }
    db_close($conn);
    return;
}
// add button events if exist
$pageObject->addButtonHandlers();
if ($options) {
    $xt->assign("rangeheader_block", true);
    $xt->assign("range_block", true);
}
$xt->assign("exportlink_attrs", 'id="saveButton' . $pageObject->id . '"');
$pageObject->body["begin"] .= "<script type=\"text/javascript\" src=\"include/loadfirst.js\"></script>\r\n";
コード例 #4
0
	}
	else if(@$_REQUEST["type"]=="word")
	{
		ExportToWord($rs, $nPageSize, $strTableName, $eventObj, $cipherer, $pageObject);
	}
	else if(@$_REQUEST["type"]=="xml")
	{
		ExportToXML($rs, $nPageSize, $strTableName, $eventObj, $cipherer, $pageObject);
	}
	else if(@$_REQUEST["type"]=="csv")
	{
		$locale_info["LOCALE_SGROUPING"]="0";
		$locale_info["LOCALE_SDECIMAL"]=".";
		$locale_info["LOCALE_SMONGROUPING"]="0";
		$locale_info["LOCALE_SMONDECIMALSEP"]=".";
		ExportToCSV($rs, $nPageSize, $strTableName, $eventObj, $cipherer, $pageObject);
	}
	db_close($conn);
	return;
}

// add button events if exist
$pageObject->addButtonHandlers();

if($options)
{
	$xt->assign("rangeheader_block",true);
	$xt->assign("range_block",true);
}

$xt->assign("exportlink_attrs", 'id="saveButton'.$pageObject->id.'"');