This commit is contained in:
Gerald Simane
2008-10-17 09:10:36 +00:00
parent 793cf0e598
commit 14a684abc6
@@ -1,43 +1,42 @@
<?php
/* Copyright (C) 2006 Technikum-Wien
*
* 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; either version 2 of the
* License, or (at your option) any later version.
*
* 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; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
*/
require_once('../../../config.inc.php');
require_once('../../../../include/functions.inc.php');
require_once('../../../../include/lehrveranstaltung.class.php');
require_once('../../../../include/studiengang.class.php');
require_once('../../../../include/studiensemester.class.php');
require_once('../../../../include/lehreinheit.class.php');
require_once('../../../../include/benutzerberechtigung.class.php');
require_once('../../../../include/uebung.class.php');
require_once('../../../../include/beispiel.class.php');
require_once('../../../../include/datum.class.php');
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
<?php
/* Copyright (C) 2006 Technikum-Wien
*
* 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; either version 2 of the
* License, or (at your option) any later version.
*
* 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; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
*/
require_once('../../../config.inc.php');
require_once('../../../../include/functions.inc.php');
require_once('../../../../include/lehrveranstaltung.class.php');
require_once('../../../../include/studiengang.class.php');
require_once('../../../../include/studiensemester.class.php');
require_once('../../../../include/lehreinheit.class.php');
require_once('../../../../include/uebung.class.php');
require_once('../../../../include/beispiel.class.php');
require_once('../../../../include/datum.class.php');
function microtime_float()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
$time = microtime_float();
if(!$conn = pg_pconnect(CONN_STRING))
if(!$conn = pg_pconnect(CONN_STRING))
die('Fehler beim oeffnen der Datenbankverbindung');
$inserted = 0;
@@ -45,8 +44,8 @@ $upgedated = 0;
$text = "";
$qry = "SELECT DISTINCT(lehreinheit_id) from campus.tbl_uebung order by lehreinheit_id";
if($result = pg_query($conn, $qry))
{
if($result = pg_query($conn, $qry))
{
while($row = pg_fetch_object($result))
{
@@ -57,28 +56,28 @@ if($result = pg_query($conn, $qry))
{
$datum_obj = new datum();
$datum_obj = new datum();
$uebung_obj = new uebung($conn);
$uebung_obj->get_next_nummer();
$uebung_obj->gewicht=1;
$uebung_obj->punkte='';
$uebung_obj->angabedatei='';
$uebung_obj->freigabevon = null;
$uebung_obj->freigabebis = null;
$uebung_obj->abgabe=false;
$uebung_obj->beispiele=false;
$uebung_obj->bezeichnung="Kreuzerllisten";
$uebung_obj->positiv=false;
$uebung_obj->defaultbemerkung='';
$uebung_obj->lehreinheit_id=$row->lehreinheit_id;
$uebung_obj->updateamum = null;
$uebung_obj->updatevon = null;
$uebung_obj->insertamum = date('Y-m-d H:i:s');
$uebung_obj->insertvon = "sync";
$uebung_obj->statistik = false;
$uebung_obj->get_next_nummer();
$uebung_obj->gewicht=1;
$uebung_obj->punkte='';
$uebung_obj->angabedatei='';
$uebung_obj->freigabevon = null;
$uebung_obj->freigabebis = null;
$uebung_obj->abgabe=false;
$uebung_obj->beispiele=false;
$uebung_obj->bezeichnung="Kreuzerllisten";
$uebung_obj->positiv=false;
$uebung_obj->defaultbemerkung='';
$uebung_obj->lehreinheit_id=$row->lehreinheit_id;
$uebung_obj->updateamum = null;
$uebung_obj->updatevon = null;
$uebung_obj->insertamum = date('Y-m-d H:i:s');
$uebung_obj->insertvon = "sync";
$uebung_obj->statistik = false;
$uebung_obj->liste_id = null;
$uebung_obj->nummer = $uebung_obj->next_nummer;
$uebung_obj->nummer = $uebung_obj->next_nummer;
if($uebung_obj->save(true))
{
$inserted++;
@@ -92,19 +91,19 @@ if($result = pg_query($conn, $qry))
}
$text .= "Inserts: ".$inserted."<br>";
$text .= "Updated: ".$upgedated."<br>";
$text .= "Updated: ".$upgedated."<br>";
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../../../../skin/cis.css" rel="stylesheet" type="text/css">
<title>Benotungstool</title>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../../../../skin/cis.css" rel="stylesheet" type="text/css">
<title>Benotungstool</title>
<?php
echo $text;
?>
</body>
?>
</body>
</html>