diff --git a/admin/sync/fas/sync_fas_vilesci_note.php b/admin/sync/fas/sync_fas_vilesci_note.php
index 9a2079f51..0af30f969 100644
--- a/admin/sync/fas/sync_fas_vilesci_note.php
+++ b/admin/sync/fas/sync_fas_vilesci_note.php
@@ -4,6 +4,8 @@
// FAS -> VILESCI
// setzt vorraus: - tbl_sprache
// - tbl_studiengang
+// einschraenkung auf student_fk per http-get:
+// sync_fas_vilesci_note.php?student_fk_von=x&student_fk_bis=y
// **************************************
require_once('../../../vilesci/config.inc.php');
require_once('../../../include/zeugnisnote.class.php');
@@ -13,7 +15,9 @@
$conn=pg_connect(CONN_STRING) or die("Connection zur Portal Datenbank fehlgeschlagen");
$conn_fas=pg_connect(CONN_STRING_FAS) or die("Connection zur Vilesci Datenbank fehlgeschlagen");
-
+
+ $startzeit = time();
+
$plausi_error=0;
$double_error=0;
@@ -219,7 +223,25 @@
$text .= "
";
- $sqlstr = "SELECT DISTINCT student_fk FROM note where student_fk >= 1 and student_fk < 200 order by student_fk";
+ //query bauen: falls http-get-einschraenkungen fuer student_fk
+ //sync_fas_vilesci_note.php?student_fk_von=x&student_fk_bis=y
+
+ $getstr = "";
+ $sqlstr = "SELECT DISTINCT student_fk FROM note";
+ if (isset($_REQUEST["student_fk_von"]))
+ $getstr .= " student_fk >='".$_REQUEST["student_fk_von"]."'";
+ if (isset($_REQUEST["student_fk_bis"]))
+ {
+ if ($getstr != "")
+ $getstr .= " AND";
+
+ $getstr .= " student_fk <='".$_REQUEST["student_fk_bis"]."'";
+ }
+ if ($getstr != "")
+ $getstr = " WHERE ".$getstr;
+
+ $sqlstr = $sqlstr.$getstr." order by student_fk";
+
if($result = pg_query($conn_fas, $sqlstr))
{
@@ -418,6 +440,7 @@
}
}
+ $text .= "
";
$text .= "
Stats
";
$text .= "Anzahl der bearbeiteten Datensätze: ".$anz_processed."
";
$text .= "Anzahl Prüfungseinträge: ".$anz_processed_pruef."
";
@@ -426,7 +449,10 @@
$text .= "Anzahl Zeugniseinträge: ".$anz_processed_zeug."
";
$text .= "Zeugnisnoten insert fehler/ok: ".$insert_error_zeug."/".$anz_insert_zeug.")
";
$text .= "Zeugnisnoten update fehler/ok/noupdate: ".$update_error_zeug."/".$anz_update_zeug."/".$anz_not_updated_zeug."
";
- $text .= "";
+
+ $stopzeit = time();
+ $runzeit = $stopzeit - $startzeit;
+ $text .= "Dauer: ".$runzeit." s";
}
?>