science-ation/plugins/evaluations/eval_export.php

93 lines
4.7 KiB
PHP

<?php
/*
This file is a plug-in to the 'Science Fair In A Box' project
SFIAB Website: http://www.sfiab.ca
Copyright (C) 2011 At Work Software (dennis@spanogle.net>
Copyright (C) 2011 Dennis Spanogle <dennis@spanogle.net>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public
License as published by the Free Software Foundation, version 2.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; see the file COPYING. If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Export Evaluation Forms</title>
</head>
<body>
</body>
</html>
<?php
include "sfiab_common.inc.php"; // check SFIAB install and get config etc.
include "eval_common.inc.php"; // check Evaluations setup and get eval_config
include "eval_menu_inc.php";
/* Options
1. Most information for preslugging scoring forms (one record per project - judgeteam assignment) (includes scheme_id and...
2. Eval_criteria Table with scheme_dscheme_name and assignto_project_when equation.
3. Eval_levels Table with scheme_id ...
4. Eval_projects_entries: One record for every project - judgeteam - criteria with current level_id
5. The Apperson format for Students Data import (Requires a special SFIAB Setup to work - details in help)
*/
if(!$_POST['action'] == "SelectOptions")
{
$Teamnote = "Team Project";
echo "<br /><form method=\"post\" action=\"eval_export.php\">";
echo "<input type=\"hidden\" name=\"action\" value=\"SelectOptions\" />";
echo "<b>Available Files to export:</b><br />";
echo"<br />1. Most information for preslugging scoring forms (one record per project - judgeteam assignment) (includes scheme_id )<br />";
echo"2. Eval_criteria Table with scheme_dscheme_name and assignto_project_when equation. <br />";
echo"3. Eval_levels Table with scheme_id ...<br />";
echo"4. Eval_projects_entries: One record for every project - judgeteam - criteria with current level_id<br />";
echo"5. The Apperson format for Students Data import (Requires a special SFIAB Setup to work - details in help)<br />";
echo "<table>";
echo "<tr><td>Enter File Number to export</td><td><input size=\"2\" type=\"text\" name=\"option\" value=\"$option\"></td>";
echo "<tr><td>Enter TeamProjectNote (Value when Project is a Team Project)</td><td><input size=\"20\" type=\"text\" name=\"teamnote\" value=\"$Teamnote\"></td>";
echo "<td> <input type=\"submit\" value=\"Next\"></td></tr>";
echo "</table>";
echo "</form>";
exit;
}
//echo "<a href=\"eval_export_download.php\">Do it now</a><br />";
//echo "Click the button to Export Evaluations CSV file AGAIN";
$option = $_POST['option'];
$Teamnote = $_POST['teamnote'];
echo "<br /><form method=\"post\" action=\"eval_export.php\">";
echo "<input type=\"hidden\" name=\"action\" value=\"SelectOptions\" />";
echo "<b>Available Files to export:</b><br />";
echo"<br />1. Most information for preslugging scoring forms (one record per project - judgeteam assignment) (includes scheme_id )<br />";
echo"2. Eval_criteria Table with scheme_dscheme_name and assignto_project_when equation. <br />";
echo"3. Eval_levels Table with scheme_id ...<br />";
echo"4. Eval_projects_entries: One record for every project - judgeteam - criteria with current level_id<br />";
echo"5. The Apperson format for Students Data import (Requires a special SFIAB Setup to work - details in help)<br />";
echo "<table>";
echo "<tr><td>Enter File Number to export</td><td><input size=\"2\" type=\"text\" name=\"option\" value=\"$option\"></td>";
echo "<tr><td>Enter TeamProjectNote (Value when Project is a Team Project)</td><td><input size=\"20\" type=\"text\" name=\"teamnote\" value=\"$Teamnote\"></td>";
echo "<td> <input type=\"submit\" value=\"Change Selections\"></td></tr>";
echo "</table>";
echo "<br />";
if($option > 0 AND $option < 6){
echo "<input type=\"button\" value=\"Export File ".$option."\" onclick=\"window.open('eval_export_download.php?option=".$option."&teamnote=".$Teamnote."')\">";
}
else{
echo "You entered a non-valid file number. Please enter a correct file number from 1 to 6 in the box and click 'Select a Different File'<br />";
}
echo "</form>";
?>