TODO-tags for non-unique student->prestudent_id

This commit is contained in:
Andreas Moik
2016-06-01 14:37:10 +02:00
parent 3cba596571
commit 4c3d0bf5aa
35 changed files with 1166 additions and 1059 deletions
+2 -2
View File
@@ -48,7 +48,7 @@ if(isset($_GET['uid']))
//Rechte Pruefen
$allowed=false;
$student = new student();
$student = new student(); // TODO EINE
if(!$student->load($uid))
die($p->t('global/fehlerBeimErmittelnDerUID'));
@@ -90,7 +90,7 @@ $htmlstr1 = '';
$vorname='';
$nachname='';
if(!$student = new student($uid))
if(!$student = new student($uid)) // TODO EINE
die("Student nicht gefunden");
$sql_query = "SELECT (SELECT nachname FROM public.tbl_person WHERE person_id=tbl_projektbetreuer.person_id) AS bnachname,
+2 -2
View File
@@ -113,7 +113,7 @@ $betreuer = $person->titelpre.' '.$person->vorname.' '.$person->nachname.' '.$pe
if($uid!=$user)
{
$student = new student();
$student = new student(); // TODO EINE
if(!$student->load($uid))
die($p->t('global/userNichtGefunden'));
@@ -157,7 +157,7 @@ if($uid!=$user)
}
else
{
$student = new student($uid);
$student = new student($uid); // TODO EINE
if($student->prestudent_id!=$projektarbeit_obj->prestudent_id)
die('Sie haben keine Berechtigung fuer diese Seite');
@@ -125,7 +125,7 @@ function savenote($db,$lvid, $student_uid, $note, $punkte=null)
{
if($db->db_num_rows($result)==0)
{
$student = new student();
$student = new student();// TODO EINE
$student->load($student_uid);
return $p->t('benotungstool/studentIstLvNichtZugeordnet', array($student->nachname, $student->vorname, trim($student->matrikelnr)))."\n";
}
@@ -157,7 +157,7 @@ function savenote($db,$lvid, $student_uid, $note, $punkte=null)
$student = new student();
$student->load($student_uid);
$student->load($student_uid); // TODO EINE
$lvgesamtnote = new lvgesamtnote();
if (!$lvgesamtnote->load($lvid, $student->prestudent_id, $stsem))
@@ -235,7 +235,7 @@ if (isset($_REQUEST["submit"]))
}
$punkte=str_replace(',','.', $punkte);
//UID ermitteln
$student = new student();
$student = new student();// TODO EINE? auf prestudent ändern?
if(!$student_uid = $student->getUidFromMatrikelnummer($matrikelnummer))
{
$response.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht',array($matrikelnummer));
@@ -244,7 +244,7 @@ if (isset($_REQUEST["submit"]))
// Hole Zeugnisnote wenn schon eine eingetragen ist
/*
$student = new student($student_uid);
$student = new student($student_uid);// TODO EINE ändern?
if ($zeugnisnote = new zeugnisnote($lvid, $student->prestudent_id, $stsem))
$znote = $zeugnisnote->note;
else
@@ -175,7 +175,7 @@ if (isset($_REQUEST["submit"]) && ($_REQUEST["student_uid"] != '') )
$termin1 = 1;
else
{
$student = new student($student_uid);
$student = new student($student_uid); // TODO EINE
$lvnote = new lvgesamtnote();
if ($lvnote->load($lvid, $student->prestudent_id, $stsem))
{
@@ -255,7 +255,7 @@ if (isset($_REQUEST["submit"]) && ($_REQUEST["student_uid"] != '') )
$lvid = $_REQUEST["lvid"];
$student = new student($student_uid);
$student = new student($student_uid);// TODO EINE
$lvgesamtnote = new lvgesamtnote();
if (!$lvgesamtnote->load($lvid, $student->prestudent_id, $stsem))
{
+2 -2
View File
@@ -173,7 +173,7 @@ else
else
$sqlFilter = "";
$student = new student($user);
$student = new student($user); // TODO EINE
$qry = "SELECT
tbl_lehrveranstaltung.lehrveranstaltung_id, tbl_zeugnisnote.note, tbl_zeugnisnote.punkte,
@@ -265,7 +265,7 @@ else
$tbl .= '<td>'.$datum_obj->formatDatum($row->benotungsdatum,'d.m.Y').'</td>';
$student = new student($user);
$student = new student($user); // TODO EINE
$pruefung = new pruefung();
$pruefung->getPruefungen($student->prestudent_id, null,$row->lehrveranstaltung_id,$stsem);
@@ -233,7 +233,7 @@ function getNoten()
*/
function saveBeurteilung($lehrveranstaltung_id, $student_uid, $mitarbeiter_uid, $note, $pruefung_id, $datum, $anmerkung, $pruefungsanmeldung_id, $uid)
{
$student = new student($student_uid);
$student = new student($student_uid); // TODO EINE
global $p;
$pruefungCis = new pruefungCis($pruefung_id);
+82 -54
View File
@@ -16,7 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
* Authors: Robert Hofer <robert.hofer@technikum-wien.at>,
* Andreas Oestereicher <oesi@technikum-wien.at>
* Andreas Oestereicher <oesi@technikum-wien.at> and
* Andreas Moik <moik@technikum-wien.at>.
*/
/*
@@ -29,11 +30,20 @@ require_once('../../../include/functions.inc.php');
require_once('../../../include/anwesenheit.class.php');
require_once('../../../include/phrasen.class.php');
require_once('../../../include/studiensemester.class.php');
require_once('../../../include/student.class.php');
require_once('../../../include/prestudent.class.php');
require_once('../../../include/benutzer.class.php');
require_once('../../../include/stundenplan.class.php');
require_once('../../../include/datum.class.php');
require_once('../../../include/benutzerberechtigung.class.php');
require_once('../../../include/studiengang.class.php');
function cmp($prestudent1, $prestudent2)
{
return $prestudent1->prestudent_id > $prestudent2->prestudent_id;
}
$datum_obj = new datum();
$uid = get_uid();
@@ -57,7 +67,6 @@ if(!$benutzer->load($uid))
$p = new phrasen(getSprache());
$db = new basis_db();
$student = new student;
$stundenplan = new stundenplan('stundenplan');
$anwesenheit = new anwesenheit;
@@ -71,8 +80,6 @@ if(!$semester || !array_key_exists($semester, $alle_semester))
end($alle_semester);
$semester = key($alle_semester);
}
//$student->get_lv($uid, $semester);
?>
<!DOCTYPE html>
<html>
@@ -83,7 +90,7 @@ if(!$semester || !array_key_exists($semester, $alle_semester))
<link rel="stylesheet" href="../../../skin/jquery.css" type="text/css"/>
<script type="text/javascript" src="../../../include/js/jquery.min.1.11.1.js"></script>
</head>
<body class="anwesenheit">
<body class="anwesenheit" style="margin:1%;width:98%">
<?php
echo '<h1>'.$p->t('anwesenheitsliste/anwesenheit').' - '.$db->convert_html_chars($benutzer->titelpre.' '.$benutzer->vorname.' '.$benutzer->nachname.' '.$benutzer->titelpost).'</h1>';
@@ -101,69 +108,90 @@ if(!$semester || !array_key_exists($semester, $alle_semester))
</form>';
$anwesenheit = new anwesenheit();
$anwesenheit->loadAnwesenheitStudiensemester($semester, $uid);
if($anwesenheit->result)
{
$prestudent = new prestudent();
$prestudent->getPrestudentsFromUid($uid);
usort($prestudent->result, "cmp");
foreach($anwesenheit->result as $aw)
foreach($prestudent->result as $pre)
{
if(!$pre->statusExists($pre->prestudent_id, $semester))
continue;
$studiengang = new studiengang($pre->studiengang_kz);
$anwesenheit->result = array();
$anwesenheit->loadAnwesenheitStudiensemester($semester, $pre->prestudent_id);
echo "<div style='margin-top:10px;margin-bottom:10px;padding:10px;border-radius:10px;background-color:#EEE;'>";
echo "<h1>".$studiengang->bezeichnung."</h1>";
if($anwesenheit->result)
{
if(!$aw->gesamtstunden)
continue;
foreach($anwesenheit->result as $aw)
{
if(!$aw->gesamtstunden)
continue;
$fehlstunden = $aw->nichtanwesend;
$le_erledigt = $aw->erfassteanwesenheit;
$anwesenheit_relativ = $aw->prozent;
echo '
<div class="lv">
<div>
'.$db->convert_html_chars($aw->bezeichnung).'
</div>
<div>
<div class="progress-wrapper">
<div class="progress '.$anwesenheit->getAmpel($anwesenheit_relativ).'" style="width: '.round($anwesenheit_relativ).'%;">
</div>
</div>'.round($anwesenheit_relativ, 1).'%
'.$p->t('anwesenheitsliste/leAbgeschlossen').' ['.$le_erledigt.'/'.$aw->gesamtstunden.']';
$fehlstunden = $aw->nichtanwesend;
$le_erledigt = $aw->erfassteanwesenheit;
$anwesenheit_relativ = $aw->prozent;
if($fehlstunden)
{
echo '
<span class="fehlstunden-details" title="'.$p->t('anwesenheitsliste/fehlstunden').'">&gt;&gt;</span>
<div style="display: none;">
<table><tr><td>'.$p->t('global/datum').'</td><td>'.$p->t('anwesenheitsliste/fehlstunden').'</td></tr>';
$anwesenheit_termine = new anwesenheit();
$anwesenheit_termine->getAnwesenheitLehrveranstaltung($uid, $aw->lehrveranstaltung_id, $semester, false);
foreach($anwesenheit_termine->result as $termin)
echo '
<div class="lv">
<div>
'.$db->convert_html_chars($aw->bezeichnung).'
</div>
<div>
<div class="progress-wrapper">
<div class="progress '.$anwesenheit->getAmpel($anwesenheit_relativ).'" style="width: '.round($anwesenheit_relativ).'%;">
</div>
</div>'.round($anwesenheit_relativ, 1).'%
'.$p->t('anwesenheitsliste/leAbgeschlossen').' ['.$le_erledigt.'/'.$aw->gesamtstunden.']';
if($fehlstunden)
{
echo ' <tr>
<td>'.$datum_obj->formatDatum($termin->datum,'d.m.Y').'</td>
<td>'.(float)$termin->einheiten.'</td>
</tr>';
echo '
<span class="fehlstunden-details" title="'.$p->t('anwesenheitsliste/fehlstunden').'">&gt;&gt;</span>
<div style="display: none;">
<table><tr><td>'.$p->t('global/datum').'</td><td>'.$p->t('anwesenheitsliste/fehlstunden').'</td></tr>';
$anwesenheit_termine = new anwesenheit();
$anwesenheit_termine->getAnwesenheitLehrveranstaltung($uid, $aw->lehrveranstaltung_id, $semester, false);
foreach($anwesenheit_termine->result as $termin)
{
echo ' <tr>
<td>'.$datum_obj->formatDatum($termin->datum,'d.m.Y').'</td>
<td>'.(float)$termin->einheiten.'</td>
</tr>';
}
echo '
</table>
</div>';
}
echo '
</table>
</div>';
}
echo '
</div>
</div>';
echo '
</div>
</div>';
}
}
}
else
{
echo $p->t('anwesenheitsliste/keineLVsGefunden');
else
{
echo $p->t('anwesenheitsliste/keineLVsGefunden');
}
echo "</div>";
}
?>
<script type="text/javascript">
$('span.fehlstunden-details').on('click', function() {
$('span.fehlstunden-details').on('click', function()
{
$(this).next().toggle();
});
$('#anwesenheitAuswahl > *').on('change', function() {
$('#anwesenheitAuswahl > *').on('change', function()
{
$('#anwesenheitAuswahl').trigger('submit');
});
</script>
+3 -3
View File
@@ -238,7 +238,7 @@ if(isset($_POST['action']) && $_POST['action']=='anmeldung')
$db = new basis_db();
$datum_obj = new datum();
// Student Laden
$student = new student();
$student = new student(); // TODO EINE
$student->load($uid);
// ersten Status holen
@@ -415,7 +415,7 @@ function drawTree($tree, $depth)
$lvregel = new lvregel();
if($lvregel->exists($row_tree->studienplan_lehrveranstaltung_id))
{
$student = new student($uid);
$student = new student($uid); // TODO EINE
if($lvregel->isAbgeschlossen($student->prestudent_id, $row_tree->studienplan_lehrveranstaltung_id))
$abgeschlossen=true;
else
@@ -579,7 +579,7 @@ function drawTree($tree, $depth)
}
else
{
$student = new student($uid);
$student = new student($uid);// TODO EINE
if(!$lvregel->isZugangsberechtigt($student->prestudent_id, $row_tree->studienplan_lehrveranstaltung_id, $stsem))
{
$regelerfuellt=false;
+54 -56
View File
@@ -1,56 +1,54 @@
<?php
/* Copyright (C) 2015 fhcomplete.org
*
* 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: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
*/
require_once('../config/vilesci.config.inc.php');
?>
// ********** FUNKTIONEN ********** //
var anwesenheitStudentUID='';
// ****
// * Laedt die Trees
// ****
function loadanwesenheit(student_uid,lehrveranstaltung_id)
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
anwesenheitStudentUID=student_uid;
//anwesenheit laden
url = "<?php echo APP_ROOT; ?>rdf/anwesenheit.rdf.php?ts="+gettimestamp();
if(student_uid!='')
url=url+"&student_uid="+student_uid;
if(lehrveranstaltung_id!='')
url=url+"&lehrveranstaltung_id="+lehrveranstaltung_id;
var treeanwesenheit=document.getElementById('anwesenheit-tree');
//Alte DS entfernen
var oldDatasources = treeanwesenheit.database.GetDataSources();
while(oldDatasources.hasMoreElements())
{
treeanwesenheit.database.RemoveDataSource(oldDatasources.getNext());
}
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
var TerminTreeDatasource = rdfService.GetDataSource(url);
TerminTreeDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
treeanwesenheit.database.AddDataSource(TerminTreeDatasource);
}
<?php
/* Copyright (C) 2015 fhcomplete.org
*
* 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: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
* Andreas Moik <moik@technikum-wien.at>.
*/
require_once('../config/vilesci.config.inc.php');
?>
// ********** FUNKTIONEN ********** //
// ****
// * Laedt die Trees
// ****
function loadanwesenheit(prestudent_id,lehrveranstaltung_id)
{
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
//anwesenheit laden
url = "<?php echo APP_ROOT; ?>rdf/anwesenheit.rdf.php?ts="+gettimestamp();
alert(prestudent_id); // TODO EINE
if(parseInt(prestudent_id) !== false)
url=url+"&prestudent_id="+prestudent_id;
if(lehrveranstaltung_id!='')
url=url+"&lehrveranstaltung_id="+lehrveranstaltung_id;
var treeanwesenheit=document.getElementById('anwesenheit-tree');
//Alte DS entfernen
var oldDatasources = treeanwesenheit.database.GetDataSources();
while(oldDatasources.hasMoreElements())
{
treeanwesenheit.database.RemoveDataSource(oldDatasources.getNext());
}
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].getService(Components.interfaces.nsIRDFService);
var TerminTreeDatasource = rdfService.GetDataSource(url);
TerminTreeDatasource.QueryInterface(Components.interfaces.nsIRDFRemoteDataSource);
treeanwesenheit.database.AddDataSource(TerminTreeDatasource);
}
+108 -107
View File
@@ -1,107 +1,108 @@
<?php
/* Copyright (C) 2015 fhcomplete.org
*
* 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: Andreas Oesterreicher <andreas.oesterreicher@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('../config/vilesci.config.inc.php');
echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
echo '<?xml-stylesheet href="'.APP_ROOT.'skin/tempus.css" type="text/css"?>';
echo '<?xml-stylesheet href="'.APP_ROOT.'content/bindings.css" type="text/css"?>';
$student_uid = filter_input(INPUT_GET,'student_uid');
$lehrveranstaltung_id= filter_input(INPUT_GET,'lehrveranstaltung_id');
?>
<window id="anwesenheit-window" title="anwesenheit"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="loadanwesenheit('<?php echo $student_uid;?>','<?php echo $lehrveranstaltung_id;?>');">
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/anwesenheit.js.php" />
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/functions.js.php" />
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/phpRequest.js.php" />
<vbox flex="1">
<groupbox id="anwesenheit-groupbox-anwesenheit" flex="1">
<caption label="Anwesenheit" />
<hbox flex="1">
<tree id="anwesenheit-tree" seltype="single" hidecolumnpicker="false" flex="1"
datasources="rdf:null"
ref="http://www.technikum-wien.at/anwesenheit"
persist="hidden, height"
>
<treecols>
<treecol id="anwesenheit-treecol-lehrveranstaltung" label="Lehrveranstaltung" flex="1" hidden="<?php echo ($lehrveranstaltung_id==''?'false':'true');?>"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#lehrveranstaltung_bezeichnung" onclick="anwesenheitTreeSort()"/>
<splitter class="tree-splitter"/>
<treecol id="anwesenheit-treecol-nachname" label="Nachname" flex="1" hidden="<?php echo ($lehrveranstaltung_id==''?'true':'false');?>"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#nachname" onclick="anwesenheitTreeSort()"/>
<splitter class="tree-splitter"/>
<treecol id="anwesenheit-treecol-vorname" label="Vorname" flex="1" hidden="<?php echo ($lehrveranstaltung_id==''?'true':'false');?>"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#vorname" onclick="anwesenheitTreeSort()"/>
<splitter class="tree-splitter"/>
<treecol id="anwesenheit-treecol-prozent" label="Anwesenheit in Prozent" flex="1" hidden="false"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#prozent" onclick="anwesenheitTreeSort()"/>
<splitter class="tree-splitter"/>
<treecol id="anwesenheit-treecol-anwesend" label="Anwesend" flex="1" hidden="true"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#anwesend" onclick="anwesenheitTreeSort()"/>
<splitter class="tree-splitter"/>
<treecol id="anwesenheit-treecol-nichtanwesend" label="Nicht anwesend" flex="1" hidden="true"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#nichtanwesend" onclick="anwesenheitTreeSort()"/>
<splitter class="tree-splitter"/>
<treecol id="anwesenheit-treecol-uid" label="UID" flex="1" hidden="true"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#uid" onclick="anwesenheitTreeSort()"/>
<splitter class="tree-splitter"/>
</treecols>
<template>
<rule>
<treechildren>
<treeitem uri="rdf:*">
<treerow properties="rdf:http://www.technikum-wien.at/anwesenheit/rdf#ampel">
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#lehrveranstaltung_bezeichnung" />
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#nachname" />
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#vorname" />
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#prozent" />
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#anwesend" />
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#nichtanwesend" />
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#uid" />
</treerow>
</treeitem>
</treechildren>
</rule>
</template>
</tree>
</hbox>
</groupbox>
</vbox>
</window>
<?php
/* Copyright (C) 2015 fhcomplete.org
*
* 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: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
* Andreas Moik <moik@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('../config/vilesci.config.inc.php');
echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";
echo '<?xml-stylesheet href="'.APP_ROOT.'skin/tempus.css" type="text/css"?>';
echo '<?xml-stylesheet href="'.APP_ROOT.'content/bindings.css" type="text/css"?>';
$prestudent_id = filter_input(INPUT_GET,'prestudent_id');
$lehrveranstaltung_id= filter_input(INPUT_GET,'lehrveranstaltung_id');
?>
<window id="anwesenheit-window" title="anwesenheit"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="loadanwesenheit('<?php echo $prestudent_id;?>','<?php echo $lehrveranstaltung_id;?>');">
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/anwesenheit.js.php" />
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/functions.js.php" />
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/phpRequest.js.php" />
<vbox flex="1">
<groupbox id="anwesenheit-groupbox-anwesenheit" flex="1">
<caption label="Anwesenheit" />
<hbox flex="1">
<tree id="anwesenheit-tree" seltype="single" hidecolumnpicker="false" flex="1"
datasources="rdf:null"
ref="http://www.technikum-wien.at/anwesenheit"
persist="hidden, height"
>
<treecols>
<treecol id="anwesenheit-treecol-lehrveranstaltung" label="Lehrveranstaltung" flex="1" hidden="<?php echo ($lehrveranstaltung_id==''?'false':'true');?>"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#lehrveranstaltung_bezeichnung" onclick="anwesenheitTreeSort()"/>
<splitter class="tree-splitter"/>
<treecol id="anwesenheit-treecol-nachname" label="Nachname" flex="1" hidden="<?php echo ($lehrveranstaltung_id==''?'true':'false');?>"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#nachname" onclick="anwesenheitTreeSort()"/>
<splitter class="tree-splitter"/>
<treecol id="anwesenheit-treecol-vorname" label="Vorname" flex="1" hidden="<?php echo ($lehrveranstaltung_id==''?'true':'false');?>"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#vorname" onclick="anwesenheitTreeSort()"/>
<splitter class="tree-splitter"/>
<treecol id="anwesenheit-treecol-prozent" label="Anwesenheit in Prozent" flex="1" hidden="false"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#prozent" onclick="anwesenheitTreeSort()"/>
<splitter class="tree-splitter"/>
<treecol id="anwesenheit-treecol-anwesend" label="Anwesend" flex="1" hidden="true"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#anwesend" onclick="anwesenheitTreeSort()"/>
<splitter class="tree-splitter"/>
<treecol id="anwesenheit-treecol-nichtanwesend" label="Nicht anwesend" flex="1" hidden="true"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#nichtanwesend" onclick="anwesenheitTreeSort()"/>
<splitter class="tree-splitter"/>
<treecol id="anwesenheit-treecol-uid" label="UID" flex="1" hidden="true"
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/anwesenheit/rdf#uid" onclick="anwesenheitTreeSort()"/>
<splitter class="tree-splitter"/>
</treecols>
<template>
<rule>
<treechildren>
<treeitem uri="rdf:*">
<treerow properties="rdf:http://www.technikum-wien.at/anwesenheit/rdf#ampel">
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#lehrveranstaltung_bezeichnung" />
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#nachname" />
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#vorname" />
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#prozent" />
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#anwesend" />
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#nichtanwesend" />
<treecell label="rdf:http://www.technikum-wien.at/anwesenheit/rdf#uid" />
</treerow>
</treeitem>
</treechildren>
</rule>
</template>
</tree>
</hbox>
</groupbox>
</vbox>
</window>
+117 -117
View File
@@ -1,117 +1,117 @@
<?php
/* Copyright (C) 2014 fhcomplete.org
*
* 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.
*
*/
require_once('../config/vilesci.config.inc.php');
require_once('../include/functions.inc.php');
require_once('../include/benutzerberechtigung.class.php');
require_once('../include/studiensemester.class.php');
$uid=get_uid();
$error_msg='';
loadVariables($uid);
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
if(!$rechte->isBerechtigt('basis/planner'))
die('Sie haben keine Berechtigung fuer diese Seite');
header("Content-type: application/vnd.mozilla.xul+xml");
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
/*echo '<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>';*/
echo '<?xml-stylesheet href="'.APP_ROOT.'skin/planner.css" type="text/css"?>';
echo '<?xul-overlay href="'.APP_ROOT.'content/planner.overlay.xul.php"?>';
echo '<?xml-stylesheet href="'.APP_ROOT.'content/bindings.css" type="text/css" ?>';
echo '<?xml-stylesheet href="datepicker/datepicker.css" type="text/css"?>';
?>
<!DOCTYPE window [
<?php require("../locale/de-AT/planner.dtd"); ?>
]>
<window
id="planner"
title="&window.title; - &window.version;"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
orient="vertical"
width="800"
height="600"
persist="screenX screenY width height sizemode"
onload="onLoad()"
>
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/planner.js.php" />
<script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/DragAndDrop.js"/>
<script type="text/javascript" language="JavaScript" src="<?php echo APP_ROOT; ?>include/js/jquery.js"></script>
<script type="text/javascript" language="JavaScript" src="<?php echo APP_ROOT; ?>include/js/jqSOAPClient.js"></script>
<script type="text/javascript" language="JavaScript" src="<?php echo APP_ROOT; ?>include/js/jqXMLUtils.js"></script>
<commandset id="maincommands">
<command id="menu-file-close:command" oncommand="closeWindow();"/>
<command id="menu-properties-studiensemester:command" oncommand="studiensemesterChange();"/>
</commandset>
<toolbox id="main-toolbox">
<menubar id="menu" >
<menu id="menu-file" label="&menu-file.label;" accesskey="&menu-file.accesskey;">
<menupopup id="menu-file-popup">
<menuitem
id = "menu-file-close"
key = "menu-file-close:key"
label = "&menu-file-close.label;"
command = "menu-file-close:command"
accesskey = "&menu-file-close.accesskey;"/>
</menupopup>
</menu>
</menubar>
</toolbox>
<hbox flex="1">
<tabbox id="tabbox-left" orient="vertical" flex="1">
<tabs orient="horizontal">
<tab id="tab-projekt" label="Projektmenue" />
<tab id="tab-ressource" label="Ressourcemenue" />
</tabs>
<tabpanels id="tabpanels-left" flex="1">
<vbox id="box-projektmenue" />
<vbox id="box-ressourcemenue" />
</tabpanels>
</tabbox>
<splitter collapse="before" persist="state">
<grippy />
</splitter>
<vbox id="vbox-main" flex="15" />
</hbox>
<statusbar id="status-bar" persist="collapsed">
<statusbarpanel class="statusbarpanel-iconic" id="logo-icon" />
<?php
if($rechte->isBerechtigt('system/developer'))
echo '<statusbarpanel label="'.DB_NAME.'"/>';
?>
<statusbarpanel id="statusbarpanel-text" label="<?php echo htmlspecialchars($error_msg); ?>" flex="4" crop="right" />
<statusbarpanel id="progress-panel" class="statusbarpanel-progress">
<progressmeter id="statusbar-progressmeter" class="progressmeter-statusbar" mode="determined" value="0%"/>
</statusbarpanel>
<statusbarpanel class="statusbarpanel-iconic" id="example-status" />
</statusbar>
</window>
<?php
/* Copyright (C) 2014 fhcomplete.org
*
* 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.
*
*/
require_once('../config/vilesci.config.inc.php');
require_once('../include/functions.inc.php');
require_once('../include/benutzerberechtigung.class.php');
require_once('../include/studiensemester.class.php');
$uid=get_uid();
$error_msg='';
loadVariables($uid);
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
if(!$rechte->isBerechtigt('basis/planner'))
die('Sie haben keine Berechtigung fuer diese Seite');
header("Content-type: application/vnd.mozilla.xul+xml");
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
/*echo '<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>';*/
echo '<?xml-stylesheet href="'.APP_ROOT.'skin/planner.css" type="text/css"?>';
echo '<?xul-overlay href="'.APP_ROOT.'content/planner.overlay.xul.php"?>';
echo '<?xml-stylesheet href="'.APP_ROOT.'content/bindings.css" type="text/css" ?>';
echo '<?xml-stylesheet href="datepicker/datepicker.css" type="text/css"?>';
?>
<!DOCTYPE window [
<?php require("../locale/de-AT/planner.dtd"); ?>
]>
<window
id="planner"
title="&window.title; - &window.version;"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
orient="vertical"
width="800"
height="600"
persist="screenX screenY width height sizemode"
onload="onLoad()"
>
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/planner.js.php" />
<script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/DragAndDrop.js"/>
<?php require_once("../include/meta/jquery.php"); ?>
<script type="text/javascript" language="JavaScript" src="<?php echo APP_ROOT; ?>include/js/jqSOAPClient.js"></script>
<script type="text/javascript" language="JavaScript" src="<?php echo APP_ROOT; ?>include/js/jqXMLUtils.js"></script>
<commandset id="maincommands">
<command id="menu-file-close:command" oncommand="closeWindow();"/>
<command id="menu-properties-studiensemester:command" oncommand="studiensemesterChange();"/>
</commandset>
<toolbox id="main-toolbox">
<menubar id="menu" >
<menu id="menu-file" label="&menu-file.label;" accesskey="&menu-file.accesskey;">
<menupopup id="menu-file-popup">
<menuitem
id = "menu-file-close"
key = "menu-file-close:key"
label = "&menu-file-close.label;"
command = "menu-file-close:command"
accesskey = "&menu-file-close.accesskey;"/>
</menupopup>
</menu>
</menubar>
</toolbox>
<hbox flex="1">
<tabbox id="tabbox-left" orient="vertical" flex="1">
<tabs orient="horizontal">
<tab id="tab-projekt" label="Projektmenue" />
<tab id="tab-ressource" label="Ressourcemenue" />
</tabs>
<tabpanels id="tabpanels-left" flex="1">
<vbox id="box-projektmenue" />
<vbox id="box-ressourcemenue" />
</tabpanels>
</tabbox>
<splitter collapse="before" persist="state">
<grippy />
</splitter>
<vbox id="vbox-main" flex="15" />
</hbox>
<statusbar id="status-bar" persist="collapsed">
<statusbarpanel class="statusbarpanel-iconic" id="logo-icon" />
<?php
if($rechte->isBerechtigt('system/developer'))
echo '<statusbarpanel label="'.DB_NAME.'"/>';
?>
<statusbarpanel id="statusbarpanel-text" label="<?php echo htmlspecialchars($error_msg); ?>" flex="4" crop="right" />
<statusbarpanel id="progress-panel" class="statusbarpanel-progress">
<progressmeter id="statusbar-progressmeter" class="progressmeter-statusbar" mode="determined" value="0%"/>
</statusbarpanel>
<statusbarpanel class="statusbarpanel-iconic" id="example-status" />
</statusbar>
</window>
+15 -14
View File
@@ -158,23 +158,23 @@ function generateMatrikelnummer($studiengang_kz, $studiensemester_kurzbz)
/**
* Wenn die Anwesenheit und einen bestimmten Prozentsatz faellt, wird ein Pruefungstermin abgezogen
* @param $studiensemester_kurzbz
* @param $student_uid
* @param $prestudent_id
* @param $lehrveranstaltung_id
* @param $note
* @return null, error wird direkt in globale Variable geschrieben
*/
function NotePruefungAnlegen($studiensemester_kurzbz, $student_uid, $lehrveranstaltung_id, $note)
function NotePruefungAnlegen($studiensemester_kurzbz, $prestudent_id, $lehrveranstaltung_id, $note)
{
global $return, $error, $errormsg;
$db = new basis_db();
$anwesenheit = new anwesenheit();
$anwesenheit->loadAnwesenheitStudiensemester($studiensemester_kurzbz, $student_uid, $lehrveranstaltung_id);
$anwesenheit->loadAnwesenheitStudiensemester($studiensemester_kurzbz, $prestudent_id, $lehrveranstaltung_id);
// Lehreinheit ermitteln
$error = false;
$qry = "SELECT lehreinheit_id FROM campus.vw_student_lehrveranstaltung "
. "WHERE uid=".$db->db_add_param($student_uid)." AND lehrveranstaltung_id=".$db->db_add_param($lehrveranstaltung_id)." "
. "WHERE prestudent_id=".$db->db_add_param($prestudent_id, FHC_INTEGER)." AND lehrveranstaltung_id=".$db->db_add_param($lehrveranstaltung_id)." "
. "ORDER BY lehreinheit_id ASC "
. "LIMIT 1";
@@ -209,9 +209,10 @@ function NotePruefungAnlegen($studiensemester_kurzbz, $student_uid, $lehrveranst
$stsem_obj = new studiensemester();
$stsem_obj->load($studiensemester_kurzbz);
$prestudent = new prestudent($prestudent_id);
// In Benutzerfunktion nachsehen ob eine Anwesenheitsbefreiung eingetragen ist
$benutzerfunktion = new benutzerfunktion();
$benutzerfunktion->getBenutzerFunktionByUid($student_uid, 'awbefreit', $stsem_obj->start, $stsem_obj->ende);
$benutzerfunktion->getBenutzerFunktionByUid($prestudent->uid, 'awbefreit', $stsem_obj->start, $stsem_obj->ende);
$anwesenheitsbefreit=false;
if(count($benutzerfunktion->result)>0)
@@ -398,7 +399,7 @@ if(!$error)
if(count($prestudentobj->result)>0)
{
$tmpStudent = new student($_POST['uid']);
$tmpStudent = new student($_POST['uid']); // TODO EINE
if($student_lvb->studentlehrverband_exists($tmpStudent->prestudent_id, $semester_aktuell))
$student_lvb->new = false;
@@ -877,7 +878,7 @@ if(!$error)
if($_POST['status_kurzbz']=='Student')
{
$student = new student();
$uid = $student->getUid($prestudent_id);
$uid = $student->getUid($prestudent_id);//TODO EINE
$student->load($uid);
$student->studiensemester_kurzbz=$semester_aktuell;
$student->semester = $_POST['semester'];
@@ -900,7 +901,7 @@ if(!$error)
if($_POST['status_kurzbz']=='Abbrecher' || $_POST['status_kurzbz']=='Absolvent')
{
$student = new student();
$uid = $student->getUid($prestudent_id);
$uid = $student->getUid($prestudent_id);//TODO EINE
$benutzer = new benutzer();
if($benutzer->load($uid))
@@ -2744,7 +2745,7 @@ if(!$error)
if(defined('FAS_PRUEFUNG_BEI_NOTENEINGABE_ANLEGEN') && FAS_PRUEFUNG_BEI_NOTENEINGABE_ANLEGEN && $return == true && $noten->new == true)
{
NotePruefungAnlegen($studiensemester_kurzbz, $student_uid, $lehrveranstaltung_id, $noten->note);
NotePruefungAnlegen($studiensemester_kurzbz, $prestudent_id, $lehrveranstaltung_id, $noten->note);
}
}
}
@@ -2790,7 +2791,7 @@ if(!$error)
$errormsg = 'Fehler beim Ermitteln der LVA';
}
$qry = "SELECT studiengang_kz FROM public.tbl_prestudent WHERE prestudent_id=".$db->db_add_param($_POST['prestudent_id'.$i]);
$qry = "SELECT studiengang_kz FROM public.tbl_prestudent WHERE prestudent_id=".$db->db_add_param($_POST['prestudent_id_'.$i]);
if($result = $db->db_query($qry))
{
if($row = $db->db_fetch_object($result))
@@ -2821,9 +2822,9 @@ if(!$error)
}
else
{
if($lvgesamtnote->load($_POST['lehrveranstaltung_id_'.$i], $_POST['prestudent_id'.$i], $_POST['studiensemester_kurzbz_'.$i]))
if($lvgesamtnote->load($_POST['lehrveranstaltung_id_'.$i], $_POST['prestudent_id_'.$i], $_POST['studiensemester_kurzbz_'.$i]))
{
if($zeugnisnote->load($_POST['lehrveranstaltung_id_'.$i], $_POST['prestudent_id'.$i], $_POST['studiensemester_kurzbz_'.$i]))
if($zeugnisnote->load($_POST['lehrveranstaltung_id_'.$i], $_POST['prestudent_id_'.$i], $_POST['studiensemester_kurzbz_'.$i]))
{
$zeugnisnote->new = false;
$zeugnisnote->updateamum = date('Y-m-d H:i:s');
@@ -2841,7 +2842,7 @@ if(!$error)
$zeugnisnote->insertamum = date('Y-m-d H:i:s');
$zeugnisnote->insertvon = $user;
$zeugnisnote->lehrveranstaltung_id = $_POST['lehrveranstaltung_id_'.$i];
$zeugnisnote->prestudent_id = $_POST['prestudent_id'.$i];
$zeugnisnote->prestudent_id = $_POST['prestudent_id_'.$i];
$zeugnisnote->studiensemester_kurzbz = $_POST['studiensemester_kurzbz_'.$i];
}
@@ -3018,7 +3019,7 @@ if(!$error)
{
if(defined('FAS_PRUEFUNG_BEI_NOTENEINGABE_ANLEGEN') && FAS_PRUEFUNG_BEI_NOTENEINGABE_ANLEGEN && $zeugnisnote->new == true)
{
NotePruefungAnlegen($semester_aktuell, $uid, $_POST['lehrveranstaltung_id'], $zeugnisnote->note);
NotePruefungAnlegen($semester_aktuell, $prestudent_id, $_POST['lehrveranstaltung_id'], $zeugnisnote->note);
}
}
}
+11 -11
View File
@@ -740,7 +740,7 @@ function StudentDetailSave()
req.add('do','update');
}
if(!prestudent_id || !parseInt(prestudent_id))
if(parseInt(prestudent_id) !== false)
req.add('type', 'saveperson');
else
req.add('type', 'savestudent');
@@ -1377,7 +1377,7 @@ function StudentAuswahl()
bisiotree.builder.addListener(StudentIOTreeListener);
}
if(parseInt(prestudent_id))
if(parseInt(prestudent_id) !== false)
{
// *** ZeugnisNoten ***
notentree = document.getElementById('student-noten-tree');
@@ -1446,7 +1446,7 @@ function StudentAuswahl()
// ***** Betriebsmittel *****
document.getElementById('student-betriebsmittel').setAttribute('src','betriebsmitteloverlay.xul.php?person_id='+person_id+'&uid='+uid);
if(prestudent_id && parseInt(prestudent_id))
if(parseInt(prestudent_id) !== false)
{
// ***** Pruefungen *****
pruefungtree = document.getElementById('student-pruefung-tree');
@@ -1523,7 +1523,7 @@ function StudentAuswahl()
anrechnungtree.builder.addListener(StudentAnrechnungTreeListener);
}
if(parseInt(prestudent_id))
if(parseInt(prestudent_id) !== false)
{
// ****** Abschlusspruefung ******** //
StudentAbschlusspruefungDetailDisableFields(true);
@@ -1549,7 +1549,7 @@ function StudentAuswahl()
}
}
if(uid!='')
if(uid!='' && parseInt(prestudent_id) !== false)
{
// ******* FUNKTIONEN ********* //
if(document.getElementById('student-content-tabs').selectedItem==document.getElementById('student-tab-funktionen'))
@@ -1566,8 +1566,8 @@ function StudentAuswahl()
// ***** Anwesenheit *****
if(document.getElementById('student-content-tabs').selectedItem==document.getElementById('student-tab-anwesenheit'))
{
document.getElementById('student-anwesenheit').setAttribute('src','anwesenheit.xul.php?student_uid='+uid);
{alert(prestudent_id); // TODO EINE
document.getElementById('student-anwesenheit').setAttribute('src','anwesenheit.xul.php?prestudent_id='+prestudent_id);
}
}
@@ -3673,7 +3673,7 @@ function StudentNotenAuswahl()
//Falls einer der Parameter leer ist wird abgebrochen da sonst ein sehr grosses rdf geladen wird
//Sollte eigentlich nie eintreffen, tut es aber trotzdem
if(lehrveranstaltung_id=='' || !parseInt(prestudent_id) || studiensemester_kurzbz=='')
if(lehrveranstaltung_id=='' || parseInt(prestudent_id) == false || studiensemester_kurzbz=='')
{
debug('unerwarteter Fehler in StudentNotenAuswahl() in studentoverlay.js.php');
return false;
@@ -5418,9 +5418,9 @@ function StudentAnwesenheitIFrameLoad()
{
var uid = document.getElementById('student-detail-textbox-uid').value;
var prestudent_id = document.getElementById('student-detail-textbox-prestudent_id').value;
if(uid!='')
{
url = 'anwesenheit.xul.php?student_uid='+uid+'&ts='+gettimestamp();
if(parseInt(prestudent_id) !== false)
{alert(prestudent_id); // TODO EINE
url = 'anwesenheit.xul.php?prestudent_id='+prestudent_id+'&ts='+gettimestamp();
document.getElementById('student-anwesenheit').setAttribute('src',url);
}
}
+1 -1
View File
@@ -489,7 +489,7 @@ function StudentProjektarbeitSpeichern()
prestudent_id =document.getElementById('student-detail-textbox-prestudent_id').value;
studiengang_kz = document.getElementById('student-prestudent-menulist-studiengang_kz').value;
if(!parseInt(prestudent_id))
if(parseInt(prestudent_id) !== false)
{
alert('prestudent_id dieser Person konnte nicht ermittelt werden');
return false;
+342 -342
View File
@@ -1,342 +1,342 @@
<?php
/* Copyright (C) 2014 fhcomplete.org
*
* 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.
*
*/
require_once('../config/vilesci.config.inc.php');
require_once('../include/functions.inc.php');
require_once('../include/benutzerberechtigung.class.php');
require_once('../include/studiensemester.class.php');
$uid=get_uid();
$error_msg='';
loadVariables($uid);
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
if(!$rechte->isBerechtigt('basis/tempus'))
die('Sie haben keine Berechtigung fuer diese Seite');
header("Content-type: application/vnd.mozilla.xul+xml");
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
/*echo '<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>';*/
echo '<?xml-stylesheet href="'.APP_ROOT.'skin/tempus.css" type="text/css"?>';
echo '<?xul-overlay href="'.APP_ROOT.'content/tempusoverlay.xul.php"?>';
echo '<?xml-stylesheet href="'.APP_ROOT.'content/bindings.css" type="text/css" ?>';
echo '<?xml-stylesheet href="datepicker/datepicker.css" type="text/css"?>';
?>
<!DOCTYPE window [
<?php require("../locale/de-AT/tempus.dtd"); ?>
]>
<window
id="tempus"
title="&window.title; - &window.version;"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
orient="vertical"
width="800"
height="600"
persist="screenX screenY width height sizemode"
onload="onLoad()"
>
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/tempus.js.php" />
<script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/DragAndDrop.js"/>
<script type="text/javascript" language="JavaScript" src="<?php echo APP_ROOT; ?>include/js/jquery.js"></script>
<script type="text/javascript" language="JavaScript" src="<?php echo APP_ROOT; ?>include/js/jqSOAPClient.js"></script>
<script type="text/javascript" language="JavaScript" src="<?php echo APP_ROOT; ?>include/js/jqXMLUtils.js"></script>
<commandset id="maincommands">
<command id="menu-file-close:command" oncommand="closeWindow();"/>
<command id="menu-properties-studiensemester:command" oncommand="studiensemesterChange();"/>
<command id="menu-prefs-stpltable-stundenplan:command" oncommand="stpltableChange('stundenplan');"/>
<command id="menu-prefs-stpltable-stundenplandev:command" oncommand="stpltableChange('stundenplandev');"/>
<command id="menu-prefs-ignore_kollision:command" oncommand="variableChange('ignore_kollision','menu-prefs-ignore_kollision');"/>
<command id="menu-prefs-ignore_zeitsperre:command" oncommand="variableChange('ignore_zeitsperre','menu-prefs-ignore_zeitsperre');"/>
<command id="menu-prefs-ignore_reservierung:command" oncommand="variableChange('ignore_reservierung','menu-prefs-ignore_reservierung');"/>
<command id="menu-prefs-alle_unr_mitladen:command" oncommand="variableChange('alle_unr_mitladen','menu-prefs-alle_unr_mitladen');"/>
<command id="menu-prefs-allow_lehrstunde_drop:command" oncommand="variableChange('allow_lehrstunde_drop','menu-prefs-allow_lehrstunde_drop');"/>
<command id="menu-prefs-kollision_student:command" oncommand="variableChange('kollision_student','menu-prefs-kollision_student');"/>
<command id="menu-prefs-max_kollision:command" oncommand="variableChangeValue('max_kollision');"/>
<command id="menu-extras-kollisionstudent:command" oncommand="KollisionStudentShow();"/>
<command id="menu-extras-lvplanwartung:command" oncommand="LVPlanWartungShow();"/>
<command id="menu-extras-rescheck:command" oncommand="ResCheckShow();"/>
<command id="menu-extras-synclvplan:command" oncommand="SyncLVPlan();"/>
<command id="menu-help-about:command" oncommand="OpenAboutDialog()"/>
<command id="menu-help-manual:command" oncommand="OpenManualTempus();"/>
</commandset>
<keyset id="mainkeys">
<key
id = "menu-file-close:key"
key = "&menu-file-close.key;"
observes = "menu-file-close:command"
modifiers = "accel" />
<key id="keycode_ignore_kollision" keycode="VK_F9" oncommand="toggleIgnoreKollision()"/>
</keyset>
<toolbox id="main-toolbox">
<menubar id="menu" >
<menu id="menu-file" label="&menu-file.label;" accesskey="&menu-file.accesskey;">
<menupopup id="menu-file-popup">
<menuitem
id = "menu-file-close"
key = "menu-file-close:key"
label = "&menu-file-close.label;"
command = "menu-file-close:command"
accesskey = "&menu-file-close.accesskey;"/>
</menupopup>
</menu>
<menu id="menu-edit" label="&menu-edit.label;" accesskey="&menu-edit.accesskey;" onclick="">
<menupopup id="menu-edit-popup" onpopupshowing="loadUndoList();">
<menu id="menu-edit-undo" label="&menu-edit-undo.label;"
datasources="rdf:null"
ref="http://www.technikum-wien.at/undo/liste"
>
<template>
<rule>
<menupopup id="menu-edit-undo-popup">
<menuitem uri="rdf:*" label="rdf:http://www.technikum-wien.at/undo/rdf#beschreibung"
value="rdf:http://www.technikum-wien.at/undo/rdf#log_id"
onclick="UnDo(this.value, this.label);"/>
</menupopup>
</rule>
</template>
</menu>
</menupopup>
</menu>
<menu id="menu-prefs" label="&menu-prefs.label;" accesskey="&menu-prefs.accesskey;">
<menupopup id="menu-prefs-popup">
<menu
id = "menu-properies-studiensemester"
label = "Studiensemester">
<menupopup id="menu-properties-popup">
<?php
$stsemobj = new studiensemester();
$stsemobj->getAll();
foreach ($stsemobj->studiensemester as $stsem)
{
echo "
<menuitem
id = 'menu-properies-studiensemester-name'
label = '$stsem->studiensemester_kurzbz'
type = 'radio'
command = 'menu-properties-studiensemester:command'
checked = ".($semester_aktuell==$stsem->studiensemester_kurzbz?"'true' ":"'false'")." />";
}
?>
</menupopup>
</menu>
<?php
if($rechte->isBerechtigt('lv-plan'))
{
?>
<menu id="menu-prefs-stpltable" label="&menu-prefs-stpltable.label;" accesskey="&menu-prefs-stpltable.accesskey;">
<menupopup id="menu-prefs-stpltable-popup">
<menuitem
id ="menu-prefs-stpltable-stundenplan"
type ="radio"
key ="menu-prefs-stpltable-stundenplan:key"
label ="&menu-prefs-stpltable-stundenplan.label;"
command ="menu-prefs-stpltable-stundenplan:command"
accesskey ="&menu-prefs-stpltable-stundenplan.accesskey;"
checked ="<?php echo ($db_stpl_table=='stundenplan'?'true':'false');?>" />
<menuitem
id ="menu-prefs-stpltable-stundenplandev"
type ="radio"
key ="menu-prefs-stpltable-stundenplandev:key"
label ="&menu-prefs-stpltable-stundenplandev.label;"
command ="menu-prefs-stpltable-stundenplandev:command"
accesskey ="&menu-prefs-stpltable-stundenplandev.accesskey;"
checked ="<?php echo ($db_stpl_table=='stundenplandev'?'true':'false');?>" />
</menupopup>
</menu>
<menuitem
id ="menu-prefs-ignore_kollision"
type ="checkbox"
key ="menu-prefs-ignore_kollision:key"
label ="&menu-prefs-ignore_kollision.label;"
command ="menu-prefs-ignore_kollision:command"
accesskey ="&menu-prefs-ignore_kollision.accesskey;"
checkbox ="true"
checked ="<?php echo $ignore_kollision;?>"
/>
<menuitem
id ="menu-prefs-ignore_zeitsperre"
type ="checkbox"
key ="menu-prefs-ignore_zeitsperre:key"
label ="&menu-prefs-ignore_zeitsperre.label;"
command ="menu-prefs-ignore_zeitsperre:command"
accesskey ="&menu-prefs-ignore_zeitsperre.accesskey;"
checkbox ="true"
checked ="<?php echo $ignore_zeitsperre;?>"
/>
<menuitem
id ="menu-prefs-ignore_reservierung"
type ="checkbox"
key ="menu-prefs-ignore_reservierung:key"
label ="&menu-prefs-ignore_reservierung.label;"
command ="menu-prefs-ignore_reservierung:command"
accesskey ="&menu-prefs-ignore_reservierung.accesskey;"
checkbox ="true"
checked ="<?php echo $ignore_reservierung;?>"
/>
<menuitem
id ="menu-prefs-kollision_student"
type ="checkbox"
key ="menu-prefs-kollision_student:key"
label ="&menu-prefs-kollision_student.label;"
command ="menu-prefs-kollision_student:command"
accesskey ="&menu-prefs-kollision_student.accesskey;"
checkbox ="true"
checked ="<?php echo $kollision_student;?>"
/>
<menuitem
id ="menu-prefs-alle_unr_mitladen"
type ="checkbox"
key ="menu-prefs-alle_unr_mitladen:key"
label ="&menu-prefs-alle_unr_mitladen.label;"
command ="menu-prefs-alle_unr_mitladen:command"
accesskey ="&menu-prefs-alle_unr_mitladen.accesskey;"
checkbox ="true"
checked ="<?php echo $alle_unr_mitladen;?>"
/>
<menuitem
id ="menu-prefs-allow_lehrstunde_drop"
type ="checkbox"
key ="menu-prefs-allow_lehrstunde_drop:key"
label ="&menu-prefs-allow_lehrstunde_drop.label;"
command ="menu-prefs-allow_lehrstunde_drop:command"
accesskey ="&menu-prefs-allow_lehrstunde_drop.accesskey;"
checkbox ="true"
checked ="<?php echo $allow_lehrstunde_drop;?>"
/>
<menuitem
id ="menu-prefs-max_kollision"
key ="menu-prefs-max_kollision:key"
label ="&menu-prefs-max_kollision.label;"
command ="menu-prefs-max_kollision:command"
accesskey ="&menu-prefs-max_kollision.accesskey;"
value ="<?php echo $max_kollision;?>"
/>
<?php
}
?>
</menupopup>
</menu>
<menu id="menu-extras" label="&menu-extras.label;" accesskey="&menu-extras.accesskey;">
<menupopup id="menu-extras-popup">
<menuitem
id = "menu-extras-kollisionstudent"
key = "menu-extras-kollisionstudent:key"
label = "&menu-extras-kollisionstudent.label;"
command = "menu-extras-kollisionstudent:command"
accesskey = "&menu-extras-kollisionstudent.accesskey;"/>
<menuitem
id = "menu-extras-lvplanwartung"
key = "menu-extras-lvplanwartung:key"
label = "&menu-extras-lvplanwartung.label;"
command = "menu-extras-lvplanwartung:command"
accesskey = "&menu-extras-lvplanwartung.accesskey;"/>
<menuitem
id = "menu-extras-rescheck"
key = "menu-extras-rescheck:key"
label = "&menu-extras-rescheck.label;"
command = "menu-extras-rescheck:command"
accesskey = "&menu-extras-rescheck.accesskey;"/>
<menuitem
id = "menu-extras-synclvplan"
key = "menu-extras-synclvplan:key"
label = "&menu-extras-synclvplan.label;"
command = "menu-extras-synclvplan:command"
accesskey = "&menu-extras-synclvplan.accesskey;"/>
</menupopup>
</menu>
<menu id="menu-help" label="&menu-help.label;" accesskey="&menu-help.accesskey;">
<menupopup id="menu-about-popup">
<menuitem
id = "menu-help-about"
key = "menu-help-about:key"
label = "&menu-help-about.label;"
command = "menu-help-about:command"
accesskey = "&menu-help-about.accesskey;"/>
<menuitem
id = "menu-help-manual"
key = "menu-help-manual:key"
label = "&menu-help-manual.label;"
command = "menu-help-manual:command"
accesskey = "&menu-help-manual.accesskey;"/>
</menupopup>
</menu>
</menubar>
</toolbox>
<hbox flex="1">
<tabbox id="tabbox-left" orient="vertical" flex="1">
<tabs orient="horizontal">
<tab id="tab-verband" label="Verband" />
<tab id="tab-ort" label="Ort" />
<tab id="tab-fachbereich" label="Institut" onclick="ChangeTabsToLehrveranstaltung()"/>
<tab id="tab-lektor" label="Lektor" />
</tabs>
<tabpanels id="tabpanels-left" flex="1">
<tree id="tree-verband" />
<tree id="tree-ort" />
<vbox id="vbox-fachbereich" />
<tree id="tree-lektor" />
</tabpanels>
</tabbox>
<splitter collapse="before" persist="state">
<grippy />
</splitter>
<vbox id="vbox-main" flex="15" />
</hbox>
<statusbar id="status-bar" persist="collapsed">
<statusbarpanel class="statusbarpanel-iconic" id="logo-icon" />
<statusbarpanel>
<toolbarbutton id="statusbarpanel-studiensemester-left"
tooltiptext="1 Studiensemester zurueck"
image="../skin/images/left.png"
oncommand="studiensemesterChange('', -1)"
/>
<toolbarbutton id="statusbarpanel-semester" label="<?php echo $semester_aktuell; ?>" oncommand="getStudiensemesterVariable()"/>
<toolbarbutton id="statusbarpanel-studiensemester-right"
tooltiptext="1 Studiensemester vor"
image="../skin/images/right.png"
oncommand="studiensemesterChange('', 1)"
/>
</statusbarpanel>
<?php
if($rechte->isBerechtigt('system/developer'))
echo '<statusbarpanel label="'.DB_NAME.'"/>';
?>
<statusbarpanel id="statusbarpanel-db_table" label="<?php echo $db_stpl_table; ?>"/>
<statusbarpanel>
<toolbarbutton id="statusbarpanel-ignore_kollision" label="Kollisionscheck <?php echo ($ignore_kollision=='true'?'AUS':'AN'); ?>" <?php echo ($ignore_kollision=='true'?'style="background-color: red;"':'');?> oncommand="updateignorekollision()"/>
</statusbarpanel>
<statusbarpanel id="statusbarpanel-text" label="<?php echo htmlspecialchars($error_msg); ?>" flex="4" crop="right" />
<statusbarpanel id="progress-panel" class="statusbarpanel-progress">
<progressmeter id="statusbar-progressmeter" class="progressmeter-statusbar" mode="determined" value="0%"/>
</statusbarpanel>
<statusbarpanel class="statusbarpanel-iconic" id="example-status" />
</statusbar>
</window>
<?php
/* Copyright (C) 2014 fhcomplete.org
*
* 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.
*
*/
require_once('../config/vilesci.config.inc.php');
require_once('../include/functions.inc.php');
require_once('../include/benutzerberechtigung.class.php');
require_once('../include/studiensemester.class.php');
$uid=get_uid();
$error_msg='';
loadVariables($uid);
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
if(!$rechte->isBerechtigt('basis/tempus'))
die('Sie haben keine Berechtigung fuer diese Seite');
header("Content-type: application/vnd.mozilla.xul+xml");
echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
/*echo '<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>';*/
echo '<?xml-stylesheet href="'.APP_ROOT.'skin/tempus.css" type="text/css"?>';
echo '<?xul-overlay href="'.APP_ROOT.'content/tempusoverlay.xul.php"?>';
echo '<?xml-stylesheet href="'.APP_ROOT.'content/bindings.css" type="text/css" ?>';
echo '<?xml-stylesheet href="datepicker/datepicker.css" type="text/css"?>';
?>
<!DOCTYPE window [
<?php require("../locale/de-AT/tempus.dtd"); ?>
]>
<window
id="tempus"
title="&window.title; - &window.version;"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
orient="vertical"
width="800"
height="600"
persist="screenX screenY width height sizemode"
onload="onLoad()"
>
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/tempus.js.php" />
<script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
<script type="application/x-javascript" src="<?php echo APP_ROOT; ?>content/DragAndDrop.js"/>
<?php require_once("../include/meta/jquery.php"); ?>
<script type="text/javascript" language="JavaScript" src="<?php echo APP_ROOT; ?>include/js/jqSOAPClient.js"></script>
<script type="text/javascript" language="JavaScript" src="<?php echo APP_ROOT; ?>include/js/jqXMLUtils.js"></script>
<commandset id="maincommands">
<command id="menu-file-close:command" oncommand="closeWindow();"/>
<command id="menu-properties-studiensemester:command" oncommand="studiensemesterChange();"/>
<command id="menu-prefs-stpltable-stundenplan:command" oncommand="stpltableChange('stundenplan');"/>
<command id="menu-prefs-stpltable-stundenplandev:command" oncommand="stpltableChange('stundenplandev');"/>
<command id="menu-prefs-ignore_kollision:command" oncommand="variableChange('ignore_kollision','menu-prefs-ignore_kollision');"/>
<command id="menu-prefs-ignore_zeitsperre:command" oncommand="variableChange('ignore_zeitsperre','menu-prefs-ignore_zeitsperre');"/>
<command id="menu-prefs-ignore_reservierung:command" oncommand="variableChange('ignore_reservierung','menu-prefs-ignore_reservierung');"/>
<command id="menu-prefs-alle_unr_mitladen:command" oncommand="variableChange('alle_unr_mitladen','menu-prefs-alle_unr_mitladen');"/>
<command id="menu-prefs-allow_lehrstunde_drop:command" oncommand="variableChange('allow_lehrstunde_drop','menu-prefs-allow_lehrstunde_drop');"/>
<command id="menu-prefs-kollision_student:command" oncommand="variableChange('kollision_student','menu-prefs-kollision_student');"/>
<command id="menu-prefs-max_kollision:command" oncommand="variableChangeValue('max_kollision');"/>
<command id="menu-extras-kollisionstudent:command" oncommand="KollisionStudentShow();"/>
<command id="menu-extras-lvplanwartung:command" oncommand="LVPlanWartungShow();"/>
<command id="menu-extras-rescheck:command" oncommand="ResCheckShow();"/>
<command id="menu-extras-synclvplan:command" oncommand="SyncLVPlan();"/>
<command id="menu-help-about:command" oncommand="OpenAboutDialog()"/>
<command id="menu-help-manual:command" oncommand="OpenManualTempus();"/>
</commandset>
<keyset id="mainkeys">
<key
id = "menu-file-close:key"
key = "&menu-file-close.key;"
observes = "menu-file-close:command"
modifiers = "accel" />
<key id="keycode_ignore_kollision" keycode="VK_F9" oncommand="toggleIgnoreKollision()"/>
</keyset>
<toolbox id="main-toolbox">
<menubar id="menu" >
<menu id="menu-file" label="&menu-file.label;" accesskey="&menu-file.accesskey;">
<menupopup id="menu-file-popup">
<menuitem
id = "menu-file-close"
key = "menu-file-close:key"
label = "&menu-file-close.label;"
command = "menu-file-close:command"
accesskey = "&menu-file-close.accesskey;"/>
</menupopup>
</menu>
<menu id="menu-edit" label="&menu-edit.label;" accesskey="&menu-edit.accesskey;" onclick="">
<menupopup id="menu-edit-popup" onpopupshowing="loadUndoList();">
<menu id="menu-edit-undo" label="&menu-edit-undo.label;"
datasources="rdf:null"
ref="http://www.technikum-wien.at/undo/liste"
>
<template>
<rule>
<menupopup id="menu-edit-undo-popup">
<menuitem uri="rdf:*" label="rdf:http://www.technikum-wien.at/undo/rdf#beschreibung"
value="rdf:http://www.technikum-wien.at/undo/rdf#log_id"
onclick="UnDo(this.value, this.label);"/>
</menupopup>
</rule>
</template>
</menu>
</menupopup>
</menu>
<menu id="menu-prefs" label="&menu-prefs.label;" accesskey="&menu-prefs.accesskey;">
<menupopup id="menu-prefs-popup">
<menu
id = "menu-properies-studiensemester"
label = "Studiensemester">
<menupopup id="menu-properties-popup">
<?php
$stsemobj = new studiensemester();
$stsemobj->getAll();
foreach ($stsemobj->studiensemester as $stsem)
{
echo "
<menuitem
id = 'menu-properies-studiensemester-name'
label = '$stsem->studiensemester_kurzbz'
type = 'radio'
command = 'menu-properties-studiensemester:command'
checked = ".($semester_aktuell==$stsem->studiensemester_kurzbz?"'true' ":"'false'")." />";
}
?>
</menupopup>
</menu>
<?php
if($rechte->isBerechtigt('lv-plan'))
{
?>
<menu id="menu-prefs-stpltable" label="&menu-prefs-stpltable.label;" accesskey="&menu-prefs-stpltable.accesskey;">
<menupopup id="menu-prefs-stpltable-popup">
<menuitem
id ="menu-prefs-stpltable-stundenplan"
type ="radio"
key ="menu-prefs-stpltable-stundenplan:key"
label ="&menu-prefs-stpltable-stundenplan.label;"
command ="menu-prefs-stpltable-stundenplan:command"
accesskey ="&menu-prefs-stpltable-stundenplan.accesskey;"
checked ="<?php echo ($db_stpl_table=='stundenplan'?'true':'false');?>" />
<menuitem
id ="menu-prefs-stpltable-stundenplandev"
type ="radio"
key ="menu-prefs-stpltable-stundenplandev:key"
label ="&menu-prefs-stpltable-stundenplandev.label;"
command ="menu-prefs-stpltable-stundenplandev:command"
accesskey ="&menu-prefs-stpltable-stundenplandev.accesskey;"
checked ="<?php echo ($db_stpl_table=='stundenplandev'?'true':'false');?>" />
</menupopup>
</menu>
<menuitem
id ="menu-prefs-ignore_kollision"
type ="checkbox"
key ="menu-prefs-ignore_kollision:key"
label ="&menu-prefs-ignore_kollision.label;"
command ="menu-prefs-ignore_kollision:command"
accesskey ="&menu-prefs-ignore_kollision.accesskey;"
checkbox ="true"
checked ="<?php echo $ignore_kollision;?>"
/>
<menuitem
id ="menu-prefs-ignore_zeitsperre"
type ="checkbox"
key ="menu-prefs-ignore_zeitsperre:key"
label ="&menu-prefs-ignore_zeitsperre.label;"
command ="menu-prefs-ignore_zeitsperre:command"
accesskey ="&menu-prefs-ignore_zeitsperre.accesskey;"
checkbox ="true"
checked ="<?php echo $ignore_zeitsperre;?>"
/>
<menuitem
id ="menu-prefs-ignore_reservierung"
type ="checkbox"
key ="menu-prefs-ignore_reservierung:key"
label ="&menu-prefs-ignore_reservierung.label;"
command ="menu-prefs-ignore_reservierung:command"
accesskey ="&menu-prefs-ignore_reservierung.accesskey;"
checkbox ="true"
checked ="<?php echo $ignore_reservierung;?>"
/>
<menuitem
id ="menu-prefs-kollision_student"
type ="checkbox"
key ="menu-prefs-kollision_student:key"
label ="&menu-prefs-kollision_student.label;"
command ="menu-prefs-kollision_student:command"
accesskey ="&menu-prefs-kollision_student.accesskey;"
checkbox ="true"
checked ="<?php echo $kollision_student;?>"
/>
<menuitem
id ="menu-prefs-alle_unr_mitladen"
type ="checkbox"
key ="menu-prefs-alle_unr_mitladen:key"
label ="&menu-prefs-alle_unr_mitladen.label;"
command ="menu-prefs-alle_unr_mitladen:command"
accesskey ="&menu-prefs-alle_unr_mitladen.accesskey;"
checkbox ="true"
checked ="<?php echo $alle_unr_mitladen;?>"
/>
<menuitem
id ="menu-prefs-allow_lehrstunde_drop"
type ="checkbox"
key ="menu-prefs-allow_lehrstunde_drop:key"
label ="&menu-prefs-allow_lehrstunde_drop.label;"
command ="menu-prefs-allow_lehrstunde_drop:command"
accesskey ="&menu-prefs-allow_lehrstunde_drop.accesskey;"
checkbox ="true"
checked ="<?php echo $allow_lehrstunde_drop;?>"
/>
<menuitem
id ="menu-prefs-max_kollision"
key ="menu-prefs-max_kollision:key"
label ="&menu-prefs-max_kollision.label;"
command ="menu-prefs-max_kollision:command"
accesskey ="&menu-prefs-max_kollision.accesskey;"
value ="<?php echo $max_kollision;?>"
/>
<?php
}
?>
</menupopup>
</menu>
<menu id="menu-extras" label="&menu-extras.label;" accesskey="&menu-extras.accesskey;">
<menupopup id="menu-extras-popup">
<menuitem
id = "menu-extras-kollisionstudent"
key = "menu-extras-kollisionstudent:key"
label = "&menu-extras-kollisionstudent.label;"
command = "menu-extras-kollisionstudent:command"
accesskey = "&menu-extras-kollisionstudent.accesskey;"/>
<menuitem
id = "menu-extras-lvplanwartung"
key = "menu-extras-lvplanwartung:key"
label = "&menu-extras-lvplanwartung.label;"
command = "menu-extras-lvplanwartung:command"
accesskey = "&menu-extras-lvplanwartung.accesskey;"/>
<menuitem
id = "menu-extras-rescheck"
key = "menu-extras-rescheck:key"
label = "&menu-extras-rescheck.label;"
command = "menu-extras-rescheck:command"
accesskey = "&menu-extras-rescheck.accesskey;"/>
<menuitem
id = "menu-extras-synclvplan"
key = "menu-extras-synclvplan:key"
label = "&menu-extras-synclvplan.label;"
command = "menu-extras-synclvplan:command"
accesskey = "&menu-extras-synclvplan.accesskey;"/>
</menupopup>
</menu>
<menu id="menu-help" label="&menu-help.label;" accesskey="&menu-help.accesskey;">
<menupopup id="menu-about-popup">
<menuitem
id = "menu-help-about"
key = "menu-help-about:key"
label = "&menu-help-about.label;"
command = "menu-help-about:command"
accesskey = "&menu-help-about.accesskey;"/>
<menuitem
id = "menu-help-manual"
key = "menu-help-manual:key"
label = "&menu-help-manual.label;"
command = "menu-help-manual:command"
accesskey = "&menu-help-manual.accesskey;"/>
</menupopup>
</menu>
</menubar>
</toolbox>
<hbox flex="1">
<tabbox id="tabbox-left" orient="vertical" flex="1">
<tabs orient="horizontal">
<tab id="tab-verband" label="Verband" />
<tab id="tab-ort" label="Ort" />
<tab id="tab-fachbereich" label="Institut" onclick="ChangeTabsToLehrveranstaltung()"/>
<tab id="tab-lektor" label="Lektor" />
</tabs>
<tabpanels id="tabpanels-left" flex="1">
<tree id="tree-verband" />
<tree id="tree-ort" />
<vbox id="vbox-fachbereich" />
<tree id="tree-lektor" />
</tabpanels>
</tabbox>
<splitter collapse="before" persist="state">
<grippy />
</splitter>
<vbox id="vbox-main" flex="15" />
</hbox>
<statusbar id="status-bar" persist="collapsed">
<statusbarpanel class="statusbarpanel-iconic" id="logo-icon" />
<statusbarpanel>
<toolbarbutton id="statusbarpanel-studiensemester-left"
tooltiptext="1 Studiensemester zurueck"
image="../skin/images/left.png"
oncommand="studiensemesterChange('', -1)"
/>
<toolbarbutton id="statusbarpanel-semester" label="<?php echo $semester_aktuell; ?>" oncommand="getStudiensemesterVariable()"/>
<toolbarbutton id="statusbarpanel-studiensemester-right"
tooltiptext="1 Studiensemester vor"
image="../skin/images/right.png"
oncommand="studiensemesterChange('', 1)"
/>
</statusbarpanel>
<?php
if($rechte->isBerechtigt('system/developer'))
echo '<statusbarpanel label="'.DB_NAME.'"/>';
?>
<statusbarpanel id="statusbarpanel-db_table" label="<?php echo $db_stpl_table; ?>"/>
<statusbarpanel>
<toolbarbutton id="statusbarpanel-ignore_kollision" label="Kollisionscheck <?php echo ($ignore_kollision=='true'?'AUS':'AN'); ?>" <?php echo ($ignore_kollision=='true'?'style="background-color: red;"':'');?> oncommand="updateignorekollision()"/>
</statusbarpanel>
<statusbarpanel id="statusbarpanel-text" label="<?php echo htmlspecialchars($error_msg); ?>" flex="4" crop="right" />
<statusbarpanel id="progress-panel" class="statusbarpanel-progress">
<progressmeter id="statusbar-progressmeter" class="progressmeter-statusbar" mode="determined" value="0%"/>
</statusbarpanel>
<statusbarpanel class="statusbarpanel-iconic" id="example-status" />
</statusbar>
</window>
+84 -75
View File
@@ -15,7 +15,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>
* Authors: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
* Andreas Moik <moik@technikum-wien.at>.
*/
/**
* Klasse zur Verwaltung der Anwesenheiten der Studierenden
@@ -469,92 +470,100 @@ class anwesenheit extends basis_db
/**
* Laedt die Anwesenheiten in Prozent von Studierenden bei Lehrveranstaltungen
* Wenn die StudentUID uebergeben wird, werden alle Lehrveranstaltungen zu denen der Studierenden zugeteilt ist inkl Prozent der Anwesenheit
* Wenn die Prestudent_id uebergeben wird, werden alle Lehrveranstaltungen zu denen der Studierenden zugeteilt ist inkl Prozent der Anwesenheit
* Wenn die LehrveranstaltungID uebergeben wird, werden alle Studierenden geholt die zugeteilt sind inkl Prozent der Anwesenheit
* Es werden pro Student die Anwesenheiten berechnet aufgrund der Lehreinheit zu der sie zugeordnet sind
* @param $studiensemester_kurzbz
* @param $student_uid
* @param $prestudent_id
* @param $lehrveranstaltung_id
* @return boolean true wenn ok, false im fehlerfall
*/
public function loadAnwesenheitStudiensemester($studiensemester_kurzbz, $student_uid=null, $lehrveranstaltung_id=null)
public function loadAnwesenheitStudiensemester($studiensemester_kurzbz, $prestudent_id=null, $lehrveranstaltung_id=null)
{
$qry = "SELECT lehrveranstaltung_id, bezeichnung, vorname, nachname, uid, sum(anwesend) as anwesend, sum(nichtanwesend) as nichtanwesend, sum(gesamtstunden) as gesamtstunden FROM (
SELECT
lehrveranstaltung_id, bezeichnung, vorname, nachname, uid,
(
SELECT
sum(einheiten)
FROM
campus.tbl_anwesenheit
WHERE
lehreinheit_id=vw_student_lehrveranstaltung.lehreinheit_id
AND uid=vw_student_lehrveranstaltung.uid
AND anwesend
) as anwesend,
(
SELECT
sum(einheiten)
FROM
campus.tbl_anwesenheit
WHERE
lehreinheit_id=vw_student_lehrveranstaltung.lehreinheit_id
AND uid=vw_student_lehrveranstaltung.uid
AND NOT anwesend
) as nichtanwesend,
(
SELECT count(*) anzahl FROM
(SELECT datum, stunde FROM campus.vw_stundenplan
WHERE lehreinheit_id=vw_student_lehrveranstaltung.lehreinheit_id
AND (vw_stundenplan.titel not like '%Nebenprüfung%' OR vw_stundenplan.titel is null) GROUP BY datum, stunde) as a
) as gesamtstunden
FROM
campus.vw_student_lehrveranstaltung
JOIN public.tbl_benutzer USING(uid)
JOIN public.tbl_person USING(person_id)
WHERE
studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
if(!is_null($lehrveranstaltung_id))
$qry.=" AND lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id);
if(!is_null($student_uid))
$qry.=" AND uid=".$this->db_add_param($student_uid);
$qry.=") as b GROUP BY lehrveranstaltung_id, bezeichnung, vorname, nachname, uid";
if($lehrveranstaltung_id!='')
$qry.=" order by nachname, vorname ";
elseif($student_uid!='')
$qry.=" order by bezeichnung";
if($result = $this->db_query($qry))
if(!is_null($prestudent_id) && !is_numeric($prestudent_id))
{
while($row = $this->db_fetch_object($result))
{
$obj = new stdClass();
$obj->bezeichnung = $row->bezeichnung;
$obj->anwesend = $row->anwesend;
$obj->nichtanwesend = $row->nichtanwesend;
$obj->gesamtstunden = $row->gesamtstunden;
$obj->erfassteanwesenheit = $row->anwesend+$row->nichtanwesend;
if($row->gesamtstunden=='' || $obj->erfassteanwesenheit=='')
$obj->prozent=100;
else
$obj->prozent = number_format(100-(100/$obj->gesamtstunden*$row->nichtanwesend),2);
$obj->vorname = $row->vorname;
$obj->nachname = $row->nachname;
$obj->uid = $row->uid;
$obj->lehrveranstaltung_id = $row->lehrveranstaltung_id;
$this->result[] = $obj;
}
return true;
$this->errormsg = "Prestudent_id ist ungueltig";
}
else
{
$this->errormsg='Fehler beim Laden der Daten';
return false;
$qry = "SELECT lehrveranstaltung_id, bezeichnung, vorname, nachname, uid, prestudent_id, sum(anwesend) as anwesend, sum(nichtanwesend) as nichtanwesend, sum(gesamtstunden) as gesamtstunden FROM (
SELECT
lehrveranstaltung_id, bezeichnung, vorname, nachname, uid, prestudent_id,
(
SELECT
sum(einheiten)
FROM
campus.tbl_anwesenheit
WHERE
lehreinheit_id=vw_student_lehrveranstaltung.lehreinheit_id
AND uid=vw_student_lehrveranstaltung.uid
AND anwesend
) as anwesend,
(
SELECT
sum(einheiten)
FROM
campus.tbl_anwesenheit
WHERE
lehreinheit_id=vw_student_lehrveranstaltung.lehreinheit_id
AND uid=vw_student_lehrveranstaltung.uid
AND NOT anwesend
) as nichtanwesend,
(
SELECT count(*) anzahl FROM
(SELECT datum, stunde FROM campus.vw_stundenplan
WHERE lehreinheit_id=vw_student_lehrveranstaltung.lehreinheit_id
AND (vw_stundenplan.titel not like '%Nebenprüfung%' OR vw_stundenplan.titel is null) GROUP BY datum, stunde) as a
) as gesamtstunden
FROM
campus.vw_student_lehrveranstaltung
JOIN public.tbl_benutzer USING(uid)
JOIN public.tbl_person USING(person_id)
WHERE
studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
if(!is_null($lehrveranstaltung_id))
$qry.=" AND lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id);
if(!is_null($prestudent_id))
$qry.=" AND prestudent_id=".$this->db_add_param($prestudent_id);
$qry.=") as b GROUP BY lehrveranstaltung_id, bezeichnung, vorname, nachname, prestudent_id, uid";
if($lehrveranstaltung_id!='')
$qry.=" order by nachname, vorname ";
elseif(is_numeric($prestudent_id))
$qry.=" order by bezeichnung";
if($result = $this->db_query($qry))
{
while($row = $this->db_fetch_object($result))
{
$obj = new stdClass();
$obj->bezeichnung = $row->bezeichnung;
$obj->anwesend = $row->anwesend;
$obj->nichtanwesend = $row->nichtanwesend;
$obj->gesamtstunden = $row->gesamtstunden;
$obj->erfassteanwesenheit = $row->anwesend+$row->nichtanwesend;
if($row->gesamtstunden=='' || $obj->erfassteanwesenheit=='')
$obj->prozent=100;
else
$obj->prozent = number_format(100-(100/$obj->gesamtstunden*$row->nichtanwesend),2);
$obj->vorname = $row->vorname;
$obj->nachname = $row->nachname;
$obj->uid = $row->uid;
$obj->prestudent_id = $row->prestudent_id;
$obj->lehrveranstaltung_id = $row->lehrveranstaltung_id;
$this->result[] = $obj;
}
return true;
}
else
{
$this->errormsg='Fehler beim Laden der Daten';
}
}
return false;
}
/**
+3 -2
View File
@@ -16,8 +16,9 @@
* 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>.
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
* Rudolf Hangl <rudolf.hangl@technikum-wien.at> and
* Andreas Moik <moik@technikum-wien.at>.
*/
/**
* Klasse benutzerfunktion (FAS-Online)
+1 -1
View File
@@ -316,7 +316,7 @@ class lehrstunde extends basis_db
if(!isset($this->ssnext))
$this->ssnext = $this->ss;
if(!$student = new student($uid))
if(!$student = new student($uid)) // TODO EINE
$this->errormsg = $student->errormsg;
+1 -1
View File
@@ -592,7 +592,7 @@ class lvregel extends basis_db
// Ausbildungssemester wird nur beim 1. durchlauf ermittelt
if(!isset($this->cache[$prestudent_id]) && !isset($this->cache[$prestudent_id][$studiensemester_kurzbz]))
{
$student = new student($prestudent_id);
$student = new student($prestudent_id); // TODO EINE
// Ausbildungssemester aus dem Status holen
$prestudent = new prestudent();
+66
View File
@@ -1868,6 +1868,72 @@ class prestudent extends person
}
}
/**
* Laden aller Prestudenten zu einer UID
* @return true wenn erfolgreich, false im Fehlerfall
*/
public function getPrestudentsFromUid($uid)
{
if(!isset($uid) || $uid == "")
{
$this->errormsg = "Diese UID ist ungueltig";
return false;
}
$qry='SELECT prestudent_id FROM public.tbl_prestudent WHERE uid='.$this->db_add_param($uid);
if(!$this->db_query($qry))
{
$this->errormsg = 'Fehler beim Laden der Prestudenten';
return false;
}
while($row = $this->db_fetch_object())
{
$ps=new prestudent($row->prestudent_id);
$this->result[]=$ps;
}
return true;
}
public function statusExists($prestudent_id, $studiensemester_kurzbz, $status_kurzbz = null)
{
if(!isset($studiensemester_kurzbz) && $studiensemester_kurzbz == "")
{
$this->errormsg = "studiensemester_kurzbz ist ungueltig";
return false;
}
$qry = "SELECT status_kurzbz FROM tbl_prestudentstatus
WHERE prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER)."
AND studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
if(isset($status_kurzbz))
$qry .= " AND status_kurzbz=".$this->db_add_param($status_kurzbz);
if($res = $this->db_query($qry))
{
if($row = $this->db_num_rows($res) > 0)
{
return true;
}
else
{
$this->errormsg = "Es wurde kein Status gefunden";
return false;
}
}
$this->errormsg = "Fehler bei der Datenabfrage";
return false;
}
/**
* Laedt die Rolle
*
+3 -2
View File
@@ -17,8 +17,9 @@
*
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
* Rudolf Hangl <rudolf.hangl@technikum-wien.at> and
* Gerald Raab <gerald.raab@technikum-wien.at>.
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>,
* Gerald Raab <gerald.raab@technikum-wien.at> and
* Andreas Moik <moik@technikum-wien.at>.
*/
require_once(dirname(__FILE__).'/basis_db.class.php');
+8 -4
View File
@@ -15,7 +15,8 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
*
* Authors: Andreas Oesterreicher <oesi@technikum-wien.at>
* Authors: Andreas Oesterreicher <oesi@technikum-wien.at> and
* Andreas Moik <moik@technikum-wien.at>.
*/
require_once('../config/vilesci.config.inc.php');
require_once('../include/rdf.class.php');
@@ -42,7 +43,7 @@ $datum_obj = new datum();
$oRdf = new rdf('ANWESENHEIT','http://www.technikum-wien.at/anwesenheit');
$student_uid = filter_input(INPUT_GET,'student_uid');
$prestudent_id = filter_input(INPUT_GET,'prestudent_id');
$lehrveranstaltung_id = filter_input(INPUT_GET,'lehrveranstaltung_id');
$studiensemester_kurzbz = filter_input(INPUT_GET,'studiensemester_kurzbz');
if($studiensemester_kurzbz=='')
@@ -52,10 +53,13 @@ $oRdf->sendHeader();
$db = new basis_db();
$anwesenheit = new anwesenheit();
if($student_uid!='')
$anwesenheit->loadAnwesenheitStudiensemester($studiensemester_kurzbz, $student_uid);
if(is_numeric($prestudent_id))
$anwesenheit->loadAnwesenheitStudiensemester($studiensemester_kurzbz, $prestudent_id);
elseif($lehrveranstaltung_id!='')
{
$anwesenheit->loadAnwesenheitStudiensemester($studiensemester_kurzbz,null,$lehrveranstaltung_id);
var_dump("TODO EINE");// TODO EINE TOTEST!
}
$i=0;
if(isset($anwesenheit->result) && is_array($anwesenheit->result))
+13 -13
View File
@@ -291,7 +291,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
}
if(!$student = new student($uid_arr[$i]))
if(!$student = new student($uid_arr[$i])) // TODO EINE
die("Student nicht gefunden");
$akadgrad_id='';
@@ -330,7 +330,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
$praktikum = false;
$auslandssemester = false;
if(!$student = new student($uid_arr[$i]))
if(!$student = new student($uid_arr[$i])) // TODO EINE
die($student->errormsg);
$qry = "SELECT projektarbeit_id FROM lehre.tbl_projektarbeit WHERE prestudent_id=".$db->db_add_param($student->prestudent_id)." AND (projekttyp_kurzbz='Praxis' OR projekttyp_kurzbz='Praktikum')";
@@ -344,7 +344,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
}
if(!$std = new student($uid_arr[$i]))
if(!$std = new student($uid_arr[$i])) // TODO EINE
die("Student nicht gefunden");
$qry = "SELECT von, bis FROM bis.tbl_bisio WHERE prestudent_id=".$db->db_add_param($std->prestudent_id);
@@ -383,7 +383,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
echo " <stgl>$stgl</stgl>";
if(!$student = new student($uid_arr[$i]))
if(!$student = new student($uid_arr[$i])) // TODO EINE
die("Student nicht gefunden!");
$abschlussbeurteilung='';
@@ -420,7 +420,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
/*
* Hole Notendurchschnitt vom Jahr nach dem letzten Status und 2 Jahre davor,
*/
if(!$student = new student($uid_arr[$i]))
if(!$student = new student($uid_arr[$i])) // TODO EINE
die("Student nicht gefunden");
$prestudent = new prestudent();
@@ -520,7 +520,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
echo " <gradePrevLastYearNb>".sprintf("%01.1f",($noteArrayPrev[7]/$noten_anzahl*100))."</gradePrevLastYearNb>";
echo " <gradePrevLastYearEa>".sprintf("%01.1f",($noteArrayPrev[12]/$noten_anzahl*100))."</gradePrevLastYearEa>";
if(!$student = new student($uid_arr[$i]))
if(!$student = new student($uid_arr[$i])) // TODO EINE
die("Student nicht gefunden");
//Projektarbeiten
@@ -555,7 +555,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
$semester_ects = 0;
//$thesis_beschreibung = '';
echo "<semesters>";
$student = new student($uid_arr[$i]);
$student = new student($uid_arr[$i]); // TODO EINE
// alle semester für das ausbildungssemester holen
// Semester wo Unterbrecher nicht holen
@@ -595,7 +595,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
$semester_kurzbz = 'Winter Semester '.$year.'/'.$helpyear;
}
$sqlStudent = new student($uid_arr[$i]);
$sqlStudent = new student($uid_arr[$i]); // TODO EINE
echo " <semesterKurzbz>Semester $start | $semester_kurzbz</semesterKurzbz>";
@@ -747,7 +747,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
}
$arrayLvAusbildungssemester[$row_stud->lehrveranstaltung_id]['lehrform_kurzbz']= $lehrform_kurzbz;
// echo " <lehrform_kurzbz>$lehrform_kurzbz</lehrform_kurzbz>";
$student = new student($uid_arr[$i]);
$student = new student($uid_arr[$i]); // TODO EINE
// hole benotungsdatum von aktueller LV
$qry_benotung = "SELECT benotungsdatum FROM
lehre.tbl_zeugnisnote WHERE lehrveranstaltung_id = ".$db->db_add_param($row_stud->lehrveranstaltung_id)."
@@ -768,7 +768,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
$bezeichnung_englisch = $row_stud->bezeichnung_english;
$bezeichnung = $row_stud->bezeichnung;
if(!$student = new student($uid_arr[$i]))
if(!$student = new student($uid_arr[$i])) // TODO EINE
die("Student nicht gefunden");
// Check ob Lehrveranstaltung ein Praktikum mit eingetragener Firma besitzt
@@ -794,7 +794,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
}
}
if(!$student = new student($uid_arr[$i]))
if(!$student = new student($uid_arr[$i])) // TODO EINE
die("Student nicht gefunden");
// Check ob an Lehrveranstaltung eine Thesis hängt
@@ -876,7 +876,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
</lv>';
}
if(!$student = new student($uid_arr[$i]))
if(!$student = new student($uid_arr[$i])) // TODO EINE
die("Student nicht gefunden");
// Ist er Outgoing in diesem semester
@@ -896,7 +896,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
$note_outgoing = 'ar';
$benotungsdatum_outgoing = '';
$lehrform_kurzbz_outgoing = '';
$student = new student($uid_arr[$i]);
$student = new student($uid_arr[$i]); // TODO EINE
$qry_outgoing_note = "SELECT anmerkung, benotungsdatum, lehrform_kurzbz
FROM lehre.tbl_zeugnisnote
+3 -3
View File
@@ -76,10 +76,10 @@ $lehrveranstaltungen = array();
$xml = "<?xml version='1.0' encoding='UTF-8' standalone='yes'?>";
$xml .= "<zeugnisse>";
foreach($uid_arr as $uid)
{
$student = new student();
{
$student = new student();// TODO EINE in der query weiter unten sollte prestudent_id nicht eindeutig sein!
if(!$student->load($uid))
die($student->errormsg);
+1 -1
View File
@@ -59,7 +59,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
$preoutgoingFirma = new preoutgoing();
$preoutgoingFirma->loadAuswahl($preoutgoing_id);
$preoutgoing_firma = $preoutgoingFirma->firma_id;
$prestudent->getLastStatus($student->prestudent_id);
$prestudent->getLastStatus($student->prestudent_id); // TODO EINE NICHT EINDEUTIG
$firma = new firma();
$nation = new nation();
+1 -1
View File
@@ -233,7 +233,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
$datum_aktuell = date('d.m.Y');
$xml .= "\n <ort_datum>Wien, am ".$datum_aktuell."</ort_datum>";
$student = new student($uid_arr[$i]);
$student = new student($uid_arr[$i]); // TODO EINE
$obj = new zeugnisnote();
$obj->load($lehrveranstaltung_id, $student->prestudent_id, $studiensemester_kurzbz);
+1 -1
View File
@@ -53,7 +53,7 @@ $projektarbeit = new projektarbeit();
if(isset($_GET['student_uid']))
{
$student = new student($_GET['student_uid']);
$student = new student($_GET['student_uid']); // TODO EINE
$projektarbeit->getProjektarbeit($student->prestudent_id);
+1 -1
View File
@@ -403,7 +403,7 @@ if($xmlformat=='rdf')
if(isset($uid))
{
$student=new student();
$student=new student(); // TODO EINE eindeutig?
$student->load($uid, $studiensemester_kurzbz);
$prestd = new prestudent();
+1 -1
View File
@@ -70,7 +70,7 @@ function draw_studienerfolg($uid, $studiensemester_kurzbz)
$studiensemester = new studiensemester();
$studiensemester_aktuell = $studiensemester->getNearest();
$student = new student();
$student = new student(); // TODO EINE
$student->load($uid);
$prestudentstatus = new prestudent();
$prestudentstatus->getLastStatus($student->prestudent_id,'','Student');
+1 -1
View File
@@ -218,7 +218,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
$datum_aktuell = date('d.m.Y');
$xml .= "\n <ort_datum>Wien, am ".$datum_aktuell."</ort_datum>";
$student = new student($uid_arr[$i]);
$student = new student($uid_arr[$i]);// TODO EINE
$obj = new zeugnisnote();
$obj->load($lehrveranstaltung_id, $student->prestudent_id, $studiensemester_kurzbz);
+229 -229
View File
@@ -1,229 +1,229 @@
<?php
/* Copyright (C) 2010 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: Karl Burkhart <burkhart@technikum-wien.at>.
*/
require_once('../config/vilesci.config.inc.php');
require_once('../include/student.class.php');
require_once('../include/benutzer.class.php');
require_once('../include/adresse.class.php');
require_once('../include/person.class.php');
require_once('../include/webservicelog.class.php');
ini_set("soap.wsdl_cache_enabled", "0");
$SOAPServer = new SoapServer(APP_ROOT."/soap/semesterticket.wsdl.php?".microtime());
$SOAPServer->addFunction("verifyData");
$SOAPServer->handle();
$fehler = '';
/**
*
* Nimmt Anfrage entgegen und überprüft ob Student auch wirklich Student ist (anhand Matrikelnummer)
* @param $parameters
*/
function verifyData($parameters)
{
global $fehler;
class foo{};
$obj = new foo();
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
// Eintrag in der LogTabelle anlegen
$log = new webservicelog();
$log->request_data = file_get_contents('php://input');
$log->webservicetyp_kurzbz = 'wienerlinien';
$log->request_id = $parameters->token;
$log->beschreibung = "Semesterticketanfrage";
$log->save(true);
if(!validateRequest($parameters))
{
$obj->result = 'false';
$obj->fehler = $fehler;
}
else
{
$student = new student();
$student_uid = $student->getUidFromMatrikelnummer($parameters->Matrikelnummer);
// überprüfe ob Benutzer aktiv ist
$benutzer = new benutzer();
$benutzer->load($student_uid);
if(!$benutzer->bnaktiv)
{
$obj->result = 'false';
$obj->fehler ='1';
return $obj;
}
// überprüfe vorname
if($benutzer->vorname != $parameters->Vorname)
{
// es wurde keine übereinstimmung gefunden
$obj->result = 'false';
$obj->fehler = '6';
return $obj;
}
if($benutzer->nachname != $parameters->Name)
{
// es wurde keine übereinstimmung gefunden
$obj->result = 'false';
$obj->fehler = '7';
return $obj;
}
// Überprüfe PLZ
$adresse = new adresse();
$adresse->load_pers($benutzer->person_id);
$foundAdr = false;
foreach($adresse->result as $adr)
{
if($adr->plz == $parameters->Postleitzahl && $adr->typ == 'h')
$foundAdr = true;
}
if($foundAdr == false)
{
// es wurde keine übereinstimmung gefunden
$obj->result = 'false';
$obj->fehler = '5';
return $obj;
}
// Überprüfe Geburtsdatum
$person = new person();
$person->load($benutzer->person_id);
if($person->gebdatum != $parameters->Geburtsdatum)
{
$obj->result = 'false';
$obj->fehler = '4';
return $obj;
}
// hole prestudentID
$student->load($student_uid);
if($student->prestudent_id == '')
{
// es wurde kein student gefunden
$obj->result = 'false';
$obj->fehler = '3';
return $obj;
}
// Übergabe von studiensemester -> z.b 11W, 12S auf WS2011, SS2012
$year = mb_substr($parameters->Semesterkuerzel, 0,2);
$semester = mb_substr($parameters->Semesterkuerzel,2,1);
if($semester == 'S')
{
$semester = 'SS';
}
else if($semester == 'W')
{
$semester= 'WS';
}
else
{
// ungültiges Semester
$obj->result = 'false';
$obj->fehler = '8';
return $obj;
}
$studiensemester = $semester.'20'.$year;
// letzten Status holen
$qry = "Select public.get_rolle_prestudent ('".$student->prestudent_id."', '".$studiensemester."')";
if($db->db_query($qry))
{
if($row = $db->db_fetch_object())
{
$status=$row->get_rolle_prestudent;
}
}
// Status Student und Diplomand gültig
if($status == 'Student' || $status == 'Diplomand')
{
$obj->result = 'true';
$obj->fehler = '';
}
else
{
$obj->result = 'false';
$obj->fehler ='1';
}
}
return $obj;
}
/**
*
* Prüft die übergebenen Parameter auf Richtigkeit
* @param $parameter
*/
function validateRequest($parameter)
{
/**
* Fehlercodes
* 1: Kein aufrechtes Studium
* 2: Fehlerhafter Request
* 3: Student wurde nicht gefunden
* 4: Fehler Geburtsdatum
* 5: Fehler Postleitzahl
* 6: Fehler Vorname
* 7: Fehler Nachname
* 8: Fehler Semester
* 9: Fehler Matrikelnummer
*/
global $fehler;
if(mb_strlen($parameter->Postleitzahl) > 10)
{
$fehler = '5';
return false;
}
if(mb_strlen($parameter->Vorname) > 255)
{
$fehler = '6';
return false;
}
if(mb_strlen($parameter->Name) > 255)
{
$fehler = '7';
return false;
}
if(mb_strlen($parameter->Matrikelnummer) >15 || $parameter->Matrikelnummer == '')
{
$fehler = '9';
return false;
}
return true;
}
?>
<?php
/* Copyright (C) 2010 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: Karl Burkhart <burkhart@technikum-wien.at>.
*/
require_once('../config/vilesci.config.inc.php');
require_once('../include/student.class.php');
require_once('../include/benutzer.class.php');
require_once('../include/adresse.class.php');
require_once('../include/person.class.php');
require_once('../include/webservicelog.class.php');
ini_set("soap.wsdl_cache_enabled", "0");
$SOAPServer = new SoapServer(APP_ROOT."/soap/semesterticket.wsdl.php?".microtime());
$SOAPServer->addFunction("verifyData");
$SOAPServer->handle();
$fehler = '';
/**
*
* Nimmt Anfrage entgegen und überprüft ob Student auch wirklich Student ist (anhand Matrikelnummer)
* @param $parameters
*/
function verifyData($parameters)
{
global $fehler;
class foo{};
$obj = new foo();
if (!$db = new basis_db())
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
// Eintrag in der LogTabelle anlegen
$log = new webservicelog();
$log->request_data = file_get_contents('php://input');
$log->webservicetyp_kurzbz = 'wienerlinien';
$log->request_id = $parameters->token;
$log->beschreibung = "Semesterticketanfrage";
$log->save(true);
if(!validateRequest($parameters))
{
$obj->result = 'false';
$obj->fehler = $fehler;
}
else
{
$student = new student();
$student_uid = $student->getUidFromMatrikelnummer($parameters->Matrikelnummer);
// überprüfe ob Benutzer aktiv ist
$benutzer = new benutzer();
$benutzer->load($student_uid);
if(!$benutzer->bnaktiv)
{
$obj->result = 'false';
$obj->fehler ='1';
return $obj;
}
// überprüfe vorname
if($benutzer->vorname != $parameters->Vorname)
{
// es wurde keine übereinstimmung gefunden
$obj->result = 'false';
$obj->fehler = '6';
return $obj;
}
if($benutzer->nachname != $parameters->Name)
{
// es wurde keine übereinstimmung gefunden
$obj->result = 'false';
$obj->fehler = '7';
return $obj;
}
// Überprüfe PLZ
$adresse = new adresse();
$adresse->load_pers($benutzer->person_id);
$foundAdr = false;
foreach($adresse->result as $adr)
{
if($adr->plz == $parameters->Postleitzahl && $adr->typ == 'h')
$foundAdr = true;
}
if($foundAdr == false)
{
// es wurde keine übereinstimmung gefunden
$obj->result = 'false';
$obj->fehler = '5';
return $obj;
}
// Überprüfe Geburtsdatum
$person = new person();
$person->load($benutzer->person_id);
if($person->gebdatum != $parameters->Geburtsdatum)
{
$obj->result = 'false';
$obj->fehler = '4';
return $obj;
}
// hole prestudentID
$student->load($student_uid);
if($student->prestudent_id == '')
{
// es wurde kein student gefunden
$obj->result = 'false';
$obj->fehler = '3';
return $obj;
}
// Übergabe von studiensemester -> z.b 11W, 12S auf WS2011, SS2012
$year = mb_substr($parameters->Semesterkuerzel, 0,2);
$semester = mb_substr($parameters->Semesterkuerzel,2,1);
if($semester == 'S')
{
$semester = 'SS';
}
else if($semester == 'W')
{
$semester= 'WS';
}
else
{
// ungültiges Semester
$obj->result = 'false';
$obj->fehler = '8';
return $obj;
}
$studiensemester = $semester.'20'.$year;
// letzten Status holen
$qry = "Select public.get_rolle_prestudent ('".$student->prestudent_id."', '".$studiensemester."')";
if($db->db_query($qry))
{
if($row = $db->db_fetch_object())
{
$status=$row->get_rolle_prestudent;
}
}
// Status Student und Diplomand gültig
if($status == 'Student' || $status == 'Diplomand')
{
$obj->result = 'true';
$obj->fehler = '';
}
else
{
$obj->result = 'false';
$obj->fehler ='1';
}
}
return $obj;
}
/**
*
* Prüft die übergebenen Parameter auf Richtigkeit
* @param $parameter
*/
function validateRequest($parameter)
{
/**
* Fehlercodes
* 1: Kein aufrechtes Studium
* 2: Fehlerhafter Request
* 3: Student wurde nicht gefunden
* 4: Fehler Geburtsdatum
* 5: Fehler Postleitzahl
* 6: Fehler Vorname
* 7: Fehler Nachname
* 8: Fehler Semester
* 9: Fehler Matrikelnummer
*/
global $fehler;
if(mb_strlen($parameter->Postleitzahl) > 10)
{
$fehler = '5';
return false;
}
if(mb_strlen($parameter->Vorname) > 255)
{
$fehler = '6';
return false;
}
if(mb_strlen($parameter->Name) > 255)
{
$fehler = '7';
return false;
}
if(mb_strlen($parameter->Matrikelnummer) >15 || $parameter->Matrikelnummer == '')
{
$fehler = '9';
return false;
}
return true;
}
?>
-2
View File
@@ -486,8 +486,6 @@ class stip extends basis_db
*/
public function getErfolg($prestudent_id, $studiensemester_kurzbz)
{
$student = new student();
$noten = new note();
$noten->getAll();
+1 -1
View File
@@ -181,4 +181,4 @@ function getStudentFromStudiengang($studiengang, $semester = null, $verband = nu
return $studentArray;
}
class foo{}
class foo{}
+1 -1
View File
@@ -645,4 +645,4 @@ function sendMailStudent($uid)
$mail = new mail($email, 'no-reply','Bestätigung des Auslandsemesters', 'Bitte sehen Sie sich die Nachricht in HTML Sicht an, um den Link vollständig darzustellen.');
$mail->setHTMLContent($emailtext);
$mail->send();
}
}
+1 -1
View File
@@ -190,4 +190,4 @@ if(isset($_POST['filter']))
?>
<br /><font color="gray">Studienabbrecher, welche den selben Studiengang erneut besuchen wollen können hier angelegt werden. <br />Diese Seite ist NICHT für das Wiederholen eines einzelnen Semesters/Jahres gedacht!</font>
</body>
</html>
</html>