mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-23 01:42:17 +00:00
- Zeugnis anzeigen und löschen hinzugefügt
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
<?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>.
|
||||
*/
|
||||
// Holt den Hexcode eines Aktes aus der DB wandelt es in Zeichen
|
||||
// um und gibt das Dokument zurueck.
|
||||
require_once('../vilesci/config.inc.php');
|
||||
require_once('../include/akte.class.php');
|
||||
|
||||
//Hexcode in String umwandeln
|
||||
function hexstr($hex)
|
||||
{
|
||||
$string="";
|
||||
for ($i=0;$i<strlen($hex)-1;$i+=2)
|
||||
$string.=chr(hexdec($hex[$i].$hex[$i+1]));
|
||||
return $string;
|
||||
}
|
||||
|
||||
//Connection Herstellen
|
||||
if(!$conn = pg_pconnect(CONN_STRING))
|
||||
die('Fehler beim oeffnen der Datenbankverbindung');
|
||||
|
||||
//Hex Dump aus der DB holen
|
||||
if(isset($_GET['id']) && is_numeric($_GET['id']))
|
||||
{
|
||||
$akte = new akte($conn, $_GET['id']);
|
||||
|
||||
//Header fuer Bild schicken
|
||||
header("Content-type: $akte->mimetype");
|
||||
echo hexstr($akte->inhalt);
|
||||
}
|
||||
else
|
||||
echo 'Unkown type';
|
||||
|
||||
?>
|
||||
@@ -39,6 +39,7 @@ require_once('../../include/benutzer.class.php');
|
||||
require_once('../../include/student.class.php');
|
||||
require_once('../../include/prestudent.class.php');
|
||||
require_once('../../include/studiengang.class.php');
|
||||
require_once('../../include/akte.class.php');
|
||||
|
||||
$user = get_uid();
|
||||
|
||||
@@ -633,6 +634,28 @@ if(!$error)
|
||||
$errormsg = 'Fehlerhafte Parameteruebergabe';
|
||||
}
|
||||
}
|
||||
elseif(isset($_POST['type']) && $_POST['type']=='deleteAkte')
|
||||
{
|
||||
if(isset($_POST['akte_id']) && is_numeric($_POST['akte_id']))
|
||||
{
|
||||
$akte = new akte($conn);
|
||||
|
||||
if($akte->delete($_POST['akte_id']))
|
||||
{
|
||||
$return = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$return = false;
|
||||
$errormsg = $akte->errormsg;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$return = false;
|
||||
$errormsg = 'Fehlerhafte Parameteruebergabe'.$_POST['akte_id'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$return = false;
|
||||
|
||||
@@ -30,6 +30,8 @@ require_once('../../vilesci/config.inc.php');
|
||||
echo '<?xml version="1.0" encoding="ISO-8859-15" standalone="yes" ?>';
|
||||
|
||||
echo '<?xul-overlay href="'.APP_ROOT.'content/student/studentdetailoverlay.xul.php"?>';
|
||||
echo '<?xul-overlay href="'.APP_ROOT.'content/student/studentzeugnisoverlay.xul.php"?>';
|
||||
echo '<?xul-overlay href="'.APP_ROOT.'content/student/studentkontooverlay.xul.php"?>';
|
||||
?>
|
||||
<!DOCTYPE overlay >
|
||||
|
||||
@@ -170,10 +172,14 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/student/studentdetailoverlay.xul.p
|
||||
<tabs orient="horizontal" id="lehrveranstaltung-tabs">
|
||||
<tab id="student-tab-detail" label="Details" />
|
||||
<tab id="student-tab-prestudent" label="PreStudent" />
|
||||
<tab id="student-tab-konto" label="Konto" />
|
||||
<tab id="student-tab-zeugnis" label="Zeugnis" />
|
||||
</tabs>
|
||||
<tabpanels id="student-tabpanels-main" flex="1">
|
||||
<vbox id="student-detail" style="margin-top:10px;" />
|
||||
<vbox id="student-prestudent" style="margin-top:10px;" />
|
||||
<vbox id="student-konto" style="margin-top:10px;" />
|
||||
<vbox id="student-zeugnis" style="margin-top:10px;" />
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</vbox>
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
<?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>.
|
||||
*/
|
||||
|
||||
header("Cache-Control: no-cache");
|
||||
header("Cache-Control: post-check=0, pre-check=0",false);
|
||||
header("Expires Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Pragma: no-cache");
|
||||
header("Content-type: application/vnd.mozilla.xul+xml");
|
||||
require_once('../../vilesci/config.inc.php');
|
||||
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
|
||||
?>
|
||||
|
||||
<overlay id="StudentKonto"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
>
|
||||
<!-- Zeugnis Overlay -->
|
||||
<vbox id="student-konto" style="margin:0px;" flex="1">
|
||||
|
||||
</vbox>
|
||||
</overlay>
|
||||
@@ -636,6 +636,23 @@ function StudentAuswahl()
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
var datasource = rdfService.GetDataSource(url);
|
||||
rollentree.database.AddDataSource(datasource);
|
||||
|
||||
//Zeugnis
|
||||
zeugnistree = document.getElementById('student-zeugnis-tree');
|
||||
url='<?php echo APP_ROOT;?>rdf/akte.rdf.php?person_id='+person_id+"&dokument_kurzbz=Zeugnis&"+gettimestamp();
|
||||
|
||||
//Alte DS entfernen
|
||||
var oldDatasources = zeugnistree.database.GetDataSources();
|
||||
while(oldDatasources.hasMoreElements())
|
||||
{
|
||||
zeugnistree.database.RemoveDataSource(oldDatasources.getNext());
|
||||
}
|
||||
//Refresh damit die entfernten DS auch wirklich entfernt werden
|
||||
zeugnistree.builder.rebuild();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
|
||||
var datasource = rdfService.GetDataSource(url);
|
||||
zeugnistree.database.AddDataSource(datasource);
|
||||
}
|
||||
|
||||
// ****
|
||||
@@ -745,6 +762,9 @@ function StudentPrestudentSave()
|
||||
}
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Anmeldungsdatum fuer den RT wird auf das Aktuelle Datum gesetzt
|
||||
// ****
|
||||
function StudentAnmeldungreihungstestHeute()
|
||||
{
|
||||
var now = new Date();
|
||||
@@ -756,4 +776,79 @@ function StudentAnmeldungreihungstestHeute()
|
||||
if(tag<10) tag='0'+tag;
|
||||
|
||||
document.getElementById('student-prestudent-textbox-anmeldungreihungstest').value=jahr+'-'+monat+'-'+tag;
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Laedt ein Zeugnis dass in der DB gespeichert ist
|
||||
// ****
|
||||
function StudentZeugnisAnzeigen()
|
||||
{
|
||||
var tree = document.getElementById('student-zeugnis-tree');
|
||||
|
||||
if (tree.currentIndex==-1) return;
|
||||
|
||||
try
|
||||
{
|
||||
//Ausgewaehlte ID holen
|
||||
var col = tree.columns ? tree.columns["student-zeugnis-tree-akte_id"] : "student-zeugnis-tree-akte_id";
|
||||
var akte_id=tree.view.getCellText(tree.currentIndex,col);
|
||||
if(akte_id!='')
|
||||
{
|
||||
window.open('<?php echo APP_ROOT;?>content/akte.php?id='+akte_id,'File');
|
||||
//document.location.href='<?php echo APP_ROOT;?>content/akte.php?id='+akte_id;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
alert(e);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// ****
|
||||
// * Loescht ein Zeugnis
|
||||
// ****
|
||||
function StudentAkteDel()
|
||||
{
|
||||
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var tree = document.getElementById('student-zeugnis-tree');
|
||||
|
||||
if (tree.currentIndex==-1)
|
||||
return;
|
||||
|
||||
try
|
||||
{
|
||||
//Ausgewaehlte Akte holen
|
||||
var col = tree.columns ? tree.columns["student-zeugnis-tree-akte_id"] : "student-zeugnis-tree-akte_id";
|
||||
var akte_id=tree.view.getCellText(tree.currentIndex,col);
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
alert(e);
|
||||
return false;
|
||||
}
|
||||
|
||||
//Abfrage ob wirklich geloescht werden soll
|
||||
if (confirm('Zeugnis wirklich entfernen?'))
|
||||
{
|
||||
//Script zum loeschen aufrufen
|
||||
var req = new phpRequest('student/studentDBDML.php','','');
|
||||
|
||||
req.add('type','deleteAkte');
|
||||
req.add('akte_id',akte_id);
|
||||
|
||||
var response = req.executePOST();
|
||||
|
||||
var val = new ParseReturnValue(response)
|
||||
|
||||
if(!val.dbdml_return)
|
||||
alert(val.dbdml_errormsg)
|
||||
|
||||
StudentTreeRefresh();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,100 @@
|
||||
<?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>.
|
||||
*/
|
||||
|
||||
header("Cache-Control: no-cache");
|
||||
header("Cache-Control: post-check=0, pre-check=0",false);
|
||||
header("Expires Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Pragma: no-cache");
|
||||
header("Content-type: application/vnd.mozilla.xul+xml");
|
||||
require_once('../../vilesci/config.inc.php');
|
||||
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
|
||||
?>
|
||||
|
||||
<overlay id="StudentZeugnis"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
>
|
||||
<!-- Zeugnis Overlay -->
|
||||
<vbox id="student-zeugnis" style="margin:0px;" flex="1">
|
||||
<popupset>
|
||||
<popup id="student-zeugnis-tree-popup">
|
||||
<menuitem label="Entfernen" oncommand="StudentAkteDel();" id="student-zeugnis-tree-popup-aktedel" hidden="false"/>
|
||||
</popup>
|
||||
</popupset>
|
||||
<hbox>
|
||||
<groupbox id="student-zeugnis-groupbox" flex="1">
|
||||
<caption label="Zeugnis"/>
|
||||
<tree id="student-zeugnis-tree" seltype="single" hidecolumnpicker="false" flex="1"
|
||||
datasources="rdf:null" ref="http://www.technikum-wien.at/akte/liste"
|
||||
style="margin-left:10px;margin-right:10px;margin-bottom:5px;" height="100px" enableColumnDrag="true"
|
||||
ondblclick="StudentZeugnisAnzeigen()"
|
||||
context="student-zeugnis-tree-popup"
|
||||
>
|
||||
|
||||
<treecols>
|
||||
<treecol id="student-zeugnis-tree-titel" label="Titel" flex="2" hidden="false" primary="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/akte/rdf#titel"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-zeugnis-tree-bezeichnung" label="Bezeichnung" flex="5" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/akte/rdf#bezeichnung"/>
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-zeugnis-tree-erstelltam" label="Erstelldatum" flex="2" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/akte/rdf#erstelltam" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-zeugnis-tree-gedruckt" label="Gedruckt" flex="2" hidden="false"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/akte/rdf#gedruckt" />
|
||||
<splitter class="tree-splitter"/>
|
||||
<treecol id="student-zeugnis-tree-akte_id" label="akte_id" flex="2" hidden="true"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/akte/rdf#akte_id" />
|
||||
<splitter class="tree-splitter"/>
|
||||
</treecols>
|
||||
|
||||
<template>
|
||||
<treechildren flex="1" >
|
||||
<treeitem uri="rdf:*">
|
||||
<treerow>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/akte/rdf#titel"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/akte/rdf#bezeichnung"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/akte/rdf#erstelltam"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/akte/rdf#gedruckt"/>
|
||||
<treecell label="rdf:http://www.technikum-wien.at/akte/rdf#akte_id"/>
|
||||
</treerow>
|
||||
</treeitem>
|
||||
</treechildren>
|
||||
</template>
|
||||
</tree>
|
||||
</groupbox>
|
||||
<vbox>
|
||||
<spacer flex="1"/>
|
||||
<button id="student-zeugnis-button-archivieren" label="aktuelles Zeugnis archivieren" disabled="false"/>
|
||||
<spacer flex="1"/>
|
||||
</vbox>
|
||||
</hbox>
|
||||
<spacer flex="8" />
|
||||
</vbox>
|
||||
</overlay>
|
||||
Reference in New Issue
Block a user