mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-29 18:09:28 +00:00
Merge branch 'master' of https://github.com/FH-Complete/FHC-Core
This commit is contained in:
+1
-4
@@ -1,7 +1,4 @@
|
||||
.htaccess
|
||||
/nbproject/
|
||||
/.idea/
|
||||
documents/dms/5501ab0195d74.pdf
|
||||
documents/dms/5501abcc7300b.pdf
|
||||
documents/dms/5501b6ed6b073.jpg
|
||||
documents/dms/5501d1a12fa02.jpg
|
||||
documents/
|
||||
|
||||
@@ -533,8 +533,10 @@ $refreshtime = ($sdtools?99999:(isset($_SESSION[constSESSIONNAME]["uid"]) && !em
|
||||
else
|
||||
{
|
||||
// Lageplan
|
||||
if(defined('CIS_INFOSCREEN_LAGEPLAN_ANZEIGEN') && CIS_INFOSCREEN_LAGEPLAN_ANZEIGEN)
|
||||
{
|
||||
echo '
|
||||
<tr class="cursor_hand">
|
||||
<tr class="cursor_hand">
|
||||
<td>
|
||||
<a href="'.htmlspecialchars($_SERVER['PHP_SELF']).'?work=lageplan&standort_id='.$standort_id.'">
|
||||
<span class="blau_mitteText">
|
||||
@@ -543,6 +545,7 @@ $refreshtime = ($sdtools?99999:(isset($_SESSION[constSESSIONNAME]["uid"]) && !em
|
||||
</a>
|
||||
</td>
|
||||
</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
echo '<tr><td> </td></tr>';
|
||||
|
||||
@@ -25,56 +25,61 @@
|
||||
* @create 20-03-2006
|
||||
* Aufruf: zipdownload.php?stg=255&sem=1$short=eng
|
||||
*/
|
||||
require_once('../../../../config/cis.config.inc.php');
|
||||
require_once('../../../../include/functions.inc.php');
|
||||
|
||||
require_once('../../../../config/cis.config.inc.php');
|
||||
require_once('../../../../include/functions.inc.php');
|
||||
$user = get_uid();
|
||||
$user = get_uid();
|
||||
|
||||
//Gueltigkeit der Parameter pruefen
|
||||
if(!isset($_GET['uebung_id']) || !is_numeric($_GET['uebung_id']))
|
||||
{
|
||||
die('Fehler bei der Parameteruebergabe');
|
||||
}
|
||||
if(!isset($_GET['lehreinheit_id']) || !is_numeric($_GET['lehreinheit_id']))
|
||||
{
|
||||
die('Fehler bei der Parameteruebergabe');
|
||||
}
|
||||
if(!isset($_GET['stsem']))
|
||||
{
|
||||
die('Fehler bei der Parameteruebergabe');
|
||||
}
|
||||
if(!isset($_GET['downloadname']))
|
||||
{
|
||||
die('Fehler bei der Parameteruebergabe');
|
||||
}
|
||||
if(!check_lektor($user))
|
||||
die('Sie haben keine Berechtigung fuer diese Seite');
|
||||
|
||||
|
||||
$uebung_id = $_GET['uebung_id'];
|
||||
$lehreinheit_id = $_GET['lehreinheit_id'];
|
||||
$stsem = $_GET['stsem'];
|
||||
$downloadname = $_GET['downloadname'];
|
||||
|
||||
//Gueltigkeit der Parameter pruefen
|
||||
if(!isset($_GET['uebung_id']) || !is_numeric($_GET['uebung_id']))
|
||||
{
|
||||
die('Fehler bei der Parameteruebergabe');
|
||||
}
|
||||
if(!isset($_GET['lehreinheit_id']) || !is_numeric($_GET['lehreinheit_id']))
|
||||
{
|
||||
die('Fehler bei der Parameteruebergabe');
|
||||
}
|
||||
if(!isset($_GET['stsem']))
|
||||
{
|
||||
die('Fehler bei der Parameteruebergabe');
|
||||
}
|
||||
if(!isset($_GET['downloadname']))
|
||||
{
|
||||
die('Fehler bei der Parameteruebergabe');
|
||||
}
|
||||
|
||||
//Pfade bauen
|
||||
$pfad = BENOTUNGSTOOL_PATH.'abgabe/';
|
||||
$filename = 'download_'.$user.'_'.$downloadname.'.zip';
|
||||
|
||||
|
||||
//Pfad wechseln
|
||||
chdir($pfad);
|
||||
|
||||
|
||||
//File loeschen falls es existiert
|
||||
//if(file_exists("download_".$user."*"))
|
||||
exec("rm download_".$user."*");
|
||||
|
||||
//Zip File erstellen
|
||||
exec("zip -r ".$filename." *_[WS]S[0-9][0-9][0-9][0-9]_".$uebung_id."_*");
|
||||
$uebung_id = $_GET['uebung_id'];
|
||||
$lehreinheit_id = $_GET['lehreinheit_id'];
|
||||
$stsem = $_GET['stsem'];
|
||||
$downloadname = $_GET['downloadname'];
|
||||
|
||||
//Auf Zip File Verweisen
|
||||
//header("Location: $pfad$filename");
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-disposition: attachment; filename="'.$filename.'"');
|
||||
readfile($filename);
|
||||
unlink($filename);
|
||||
?>
|
||||
if(mb_strstr($downloadname,'..'))
|
||||
die('Ungueltiger Parameter gefunden');
|
||||
|
||||
//Pfade bauen
|
||||
$pfad = BENOTUNGSTOOL_PATH.'abgabe/';
|
||||
$filename = 'download_'.$user.'_'.$downloadname.'.zip';
|
||||
|
||||
if(!check_filename($filename))
|
||||
die('Ungueltiger Parameter gefunden');
|
||||
|
||||
//Pfad wechseln
|
||||
chdir($pfad);
|
||||
|
||||
//File loeschen falls es existiert
|
||||
//if(file_exists("download_".$user."*"))
|
||||
exec('rm download_'.$user.'*');
|
||||
|
||||
//Zip File erstellen
|
||||
exec("zip -r ".escapeshellarg($filename).' *_[WS]S[0-9][0-9][0-9][0-9]_'.$uebung_id.'_*');
|
||||
|
||||
//Auf Zip File Verweisen
|
||||
//header("Location: $pfad$filename");
|
||||
header('Content-Type: application/octet-stream');
|
||||
header('Content-disposition: attachment; filename="'.$filename.'"');
|
||||
readfile($filename);
|
||||
unlink($filename);
|
||||
?>
|
||||
|
||||
@@ -92,11 +92,42 @@ if (isset($_GET["handbuch"])){
|
||||
readfile($filename);
|
||||
exit;
|
||||
}
|
||||
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
?><!DOCTYPE HTML>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<link href="../../../skin/jquery.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="../../../include/js/jquery1.9.min.js" type="text/javascript" ></script>
|
||||
|
||||
<?php
|
||||
|
||||
// ADDONS laden
|
||||
$addon_obj = new addon();
|
||||
$addon_obj->loadAddons();
|
||||
foreach($addon_obj->result as $addon)
|
||||
{
|
||||
if(file_exists('../../../addons/'.$addon->kurzbz.'/cis/init.js.php'))
|
||||
echo '<script type="application/x-javascript" src="../../../addons/'.$addon->kurzbz.'/cis/init.js.php" ></script>';
|
||||
}
|
||||
|
||||
// Wenn Seite fertig geladen ist Addons aufrufen
|
||||
echo '
|
||||
<script>
|
||||
$( document ).ready(function()
|
||||
{
|
||||
if(typeof addon !== \'undefined\')
|
||||
{
|
||||
for(i in addon)
|
||||
{
|
||||
addon[i].init("cis/private/lehre/lesson.php", {uid:\''.$user.'\',lvid:\''.$lvid.'\',studiensemester_kurzbz:\''.$studiensemester_kurzbz.'\'});
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
';
|
||||
|
||||
?>
|
||||
<style type="text/css">
|
||||
.transparent {
|
||||
filter:alpha(opacity=90);
|
||||
|
||||
@@ -453,9 +453,14 @@ function openDialog(lehrveranstaltung_id, termin_id, lvBezeichnung, terminVon, t
|
||||
*/
|
||||
function saveAnmeldung(lehrveranstaltung_id, termin_id)
|
||||
{
|
||||
var lehrveranstaltung_id = $("#lehrveranstaltungHidden").val();
|
||||
var termin_id = $("#terminHidden").val();
|
||||
var uid = $("#anmeldung_hinzufuegen_uid").val();
|
||||
if(lehrveranstaltung_id === undefined)
|
||||
lehrveranstaltung_id = $("#lehrveranstaltungHidden").val();
|
||||
if(termin_id === undefined)
|
||||
termin_id = $("#terminHidden").val();
|
||||
var bemerkungen = $("#anmeldungBemerkung").val();
|
||||
if(bemerkungen === undefined)
|
||||
bemerkungen = "von Lektor hinzugefügt";
|
||||
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
@@ -465,7 +470,8 @@ function saveAnmeldung(lehrveranstaltung_id, termin_id)
|
||||
method: "saveAnmeldung",
|
||||
termin_id: termin_id,
|
||||
lehrveranstaltung_id: lehrveranstaltung_id,
|
||||
bemerkung: bemerkungen
|
||||
bemerkung: bemerkungen,
|
||||
uid: uid
|
||||
},
|
||||
error: loadError
|
||||
}).success(function(data){
|
||||
@@ -480,7 +486,17 @@ function saveAnmeldung(lehrveranstaltung_id, termin_id)
|
||||
resetForm();
|
||||
}).complete(function(event, xhr, settings){
|
||||
$("#saveDialog").dialog("close");
|
||||
refresh();
|
||||
|
||||
if(uid === undefined)
|
||||
{
|
||||
//Wenn Anmeldung durch Student
|
||||
refresh();
|
||||
}
|
||||
else
|
||||
{
|
||||
//Wenn Anmeldung durch Lektor
|
||||
showAnmeldungen(termin_id, lehrveranstaltung_id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -653,6 +669,7 @@ function writeAnmeldungen(data)
|
||||
var ort_kurzbz = data.result.ort_kurzbz;
|
||||
var liste = "<ul id='sortable'>";
|
||||
var count = 0;
|
||||
var studiensemester = $("#filter_studiensemester option:selected").val();
|
||||
data.result.anmeldungen.forEach(function(d){
|
||||
count++;
|
||||
var vorname = d.student.vorname !== "null" ? d.student.vorname : "";
|
||||
@@ -683,8 +700,10 @@ function writeAnmeldungen(data)
|
||||
|
||||
});
|
||||
liste += "</ul>";
|
||||
$("#anmeldung_hinzufuegen").html("<input id='anmeldung_hinzufuegen_uid' type='text' placeholder='StudentIn-UID' /><input type='button' value='hinzufügen' onclick='saveAnmeldung(\""+lehrveranstaltung_id+"\",\""+terminId+"\");'/>");
|
||||
$("#reihungSpeichernButton").html("<input type='button' value='Reihung speichern' onclick='saveReihung(\""+terminId+"\", \""+lehrveranstaltung_id+"\");'>");
|
||||
$("#anmeldeDaten").html(liste);
|
||||
$("#listeDrucken").html("<a href='./pruefungsanmeldungen_liste.php?termin_id="+terminId+"&lehrveranstaltung_id="+lehrveranstaltung_id+"&studiensemester="+studiensemester+"' target='_blank'>Liste drucken</a>");
|
||||
if(ort_kurzbz !== null)
|
||||
{
|
||||
$("#raumLink").html("<span>Prüfungsraum: </span>"+ort_kurzbz);
|
||||
@@ -829,11 +848,12 @@ function loadStudiengaenge()
|
||||
$("#stgListe").empty();
|
||||
if(data.error === 'false')
|
||||
{
|
||||
var liste = "";
|
||||
var liste = "<select id='select_studiengang' onchange='loadPruefungStudiengang();'><option>Studiengang auswählen</option>";
|
||||
data.result.forEach(function(e){
|
||||
var kuerzel = e.typ+e.kurzbz
|
||||
liste += "<li id='stg"+e.studiengang_kz+"'><span class='studiengang'><a href='#' onclick='loadPruefungStudiengang(\""+e.studiengang_kz+"\");'>"+e.bezeichnung+" ("+kuerzel.toUpperCase()+")</a></span></li>";
|
||||
liste += "<option id='stg"+e.studiengang_kz+"' value='"+e.studiengang_kz+"'>"+e.bezeichnung+" ("+kuerzel.toUpperCase()+")</option>";
|
||||
});
|
||||
liste += "</select>";
|
||||
$("#stgListe").append(liste);
|
||||
}
|
||||
else
|
||||
@@ -848,15 +868,22 @@ function loadStudiengaenge()
|
||||
* @param {type} studiengang_kz Studiengangskennzahl
|
||||
* @returns {undefined}
|
||||
*/
|
||||
function loadPruefungStudiengang(studiengang_kz)
|
||||
function loadPruefungStudiengang(studiengang_kz, studiensemester)
|
||||
{
|
||||
if(studiengang_kz === undefined)
|
||||
studiengang_kz = $("#select_studiengang option:selected").val();
|
||||
|
||||
if(studiensemester === undefined)
|
||||
studiensemester = $("#filter_studiensemester option:selected").val();
|
||||
|
||||
$.ajax({
|
||||
dataType: 'json',
|
||||
url: "./pruefungsanmeldung.json.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
method: "getPruefungenStudiengang",
|
||||
studiengang_kz: studiengang_kz
|
||||
studiengang_kz: studiengang_kz,
|
||||
studiensemester: studiensemester
|
||||
},
|
||||
error: loadError
|
||||
}).success(function(data){
|
||||
@@ -867,6 +894,7 @@ function loadPruefungStudiengang(studiengang_kz)
|
||||
{
|
||||
var liste = "";
|
||||
data.result.forEach(function(e){
|
||||
console.log(e);
|
||||
liste += "<ul><li>"+e.bezeichnung+"<ul>";
|
||||
e.pruefung[0].termine.forEach(function(d){
|
||||
liste += "<li> <a onclick='showAnmeldungen(\""+d.pruefungstermin_id+"\", \""+e.lehrveranstaltung_id+"\");'>"+convertDateTime(d.von)+" "+convertDateTime(d.von, "time")+" - "+convertDateTime(d.bis, "time")+"</a></li>";
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -32,6 +32,9 @@ require_once('../../../../include/student.class.php');
|
||||
|
||||
|
||||
$uid = get_uid();
|
||||
//TODO uid entfernen
|
||||
|
||||
$uid="p20132443";
|
||||
$db = new basis_db();
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($uid);
|
||||
|
||||
@@ -0,0 +1,264 @@
|
||||
<!DOCTYPE html>
|
||||
<?php
|
||||
/*
|
||||
* Copyright 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., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301, USA.
|
||||
*
|
||||
*
|
||||
* Authors: Stefan Puraner <puraner@technikum-wien.at>
|
||||
*/
|
||||
|
||||
require_once('../../../../config/cis.config.inc.php');
|
||||
require_once('../../../../include/functions.inc.php');
|
||||
require_once('../../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../../include/pruefungsanmeldung.class.php');
|
||||
require_once('../../../../include/pruefungCis.class.php');
|
||||
require_once('../../../../include/pruefungstermin.class.php');
|
||||
require_once('../../../../include/studiensemester.class.php');
|
||||
require_once('../../../../include/lehrveranstaltung.class.php');
|
||||
require_once('../../../../include/mitarbeiter.class.php');
|
||||
require_once('../../../../include/student.class.php');
|
||||
require_once('../../../../include/datum.class.php');
|
||||
|
||||
$uid = get_uid();
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($uid);
|
||||
?>
|
||||
<html moznomarginboxes="">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<script src="../../../../include/js/jquery1.9.min.js"></script>
|
||||
<style type="text/css">
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
}
|
||||
|
||||
#page {
|
||||
width: 210mm;
|
||||
min-height: 297mm;
|
||||
padding: 20mm;
|
||||
margin: 10mm auto;
|
||||
border: 1px #D3D3D3 solid;
|
||||
border-radius: 5px;
|
||||
background: white;
|
||||
box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
|
||||
font-family: Arial, Helvetica;
|
||||
}
|
||||
|
||||
#subpage {
|
||||
padding: 10mm;
|
||||
border: 1px black solid;
|
||||
height: 256mm;
|
||||
outline: 20mm
|
||||
}
|
||||
|
||||
#liste {
|
||||
border: 1px solid black;
|
||||
border-collapse: collapse;
|
||||
width: 100%;
|
||||
margin-top: 5mm;
|
||||
font-size: 11pt;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bold {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
td {
|
||||
border: 1px solid black;
|
||||
padding: 1mm;
|
||||
}
|
||||
|
||||
th {
|
||||
border: 1px solid black;
|
||||
}
|
||||
|
||||
thead > tr {
|
||||
background-color: white !important;
|
||||
}
|
||||
|
||||
tr:nth-child(odd){
|
||||
background-color: lightgrey;
|
||||
}
|
||||
|
||||
span {
|
||||
line-height: 16pt;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
@page {
|
||||
size: A4;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
@media print {
|
||||
html, body {
|
||||
width: 210mm;
|
||||
height: 250mm;
|
||||
}
|
||||
#page {
|
||||
margin: 0;
|
||||
border: initial;
|
||||
border-radius: initial;
|
||||
width: initial;
|
||||
min-height: initial;
|
||||
box-shadow: initial;
|
||||
background: initial;
|
||||
page-break-after: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
* Workaround um beim Drucken jede zweite Zeile der Tabelle
|
||||
* grau darzustellen. Standardmäßig werden von Browsern keine
|
||||
* Hintergrundfarben gedruckt.
|
||||
*/
|
||||
tr:nth-child(odd) > td{
|
||||
box-shadow: inset 0 0 0 1000px lightgrey;
|
||||
}
|
||||
|
||||
//Veranlasst Chrome Hintergrundfarben zu drucken
|
||||
body{
|
||||
-webkit-print-color-adjust:exact;
|
||||
background-color: #FFFFFF;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
//Anweisungen nur für Firefox
|
||||
@-moz-document url-prefix() {
|
||||
html, body {
|
||||
height: 280mm;
|
||||
}
|
||||
}
|
||||
@-moz-document url-prefix() {
|
||||
#page {
|
||||
padding: 15mm 25mm 25mm 15mm !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
window.print();
|
||||
});
|
||||
</script>
|
||||
<div id="page">
|
||||
<div id="subpage">
|
||||
<h1>Anmeldungsliste</h1>
|
||||
<?php
|
||||
if(empty($pruefung->result) && !$rechte->isBerechtigt('lehre/pruefungsanmeldungAdmin'))
|
||||
die('Sie haben keine Berechtigung für diese Seite');
|
||||
|
||||
$termin_id = filter_input(INPUT_GET,"termin_id");
|
||||
$lehrveranstaltung_id = filter_input(INPUT_GET,"lehrveranstaltung_id");
|
||||
$studiensemester = filter_input(INPUT_GET, "studiensemester");
|
||||
|
||||
if(is_null($lehrveranstaltung_id))
|
||||
{
|
||||
die('Fehlender Parameter lehrveranstaltung_id');
|
||||
}
|
||||
else if(is_null($termin_id))
|
||||
{
|
||||
die('Fehlender Parameter termin_id');
|
||||
}
|
||||
else if(is_null($studiensemester))
|
||||
{
|
||||
die('Fehlender Parameter studiensemester');
|
||||
}
|
||||
else
|
||||
{
|
||||
$datum = new datum();
|
||||
$stdsem = new studiensemester($studiensemester);
|
||||
$pruefungsanmeldung = new pruefungsanmeldung();
|
||||
$anmeldungen = $pruefungsanmeldung->getAnmeldungenByTermin($termin_id, $lehrveranstaltung_id, $studiensemester, "bestaetigt");
|
||||
$lehrveranstaltung = new lehrveranstaltung($lehrveranstaltung_id);
|
||||
$einzeln = FALSE;
|
||||
if(!empty($anmeldungen))
|
||||
{
|
||||
$pruefung = new pruefungCis($anmeldungen[0]->pruefung_id);
|
||||
$pruefungstermin = new pruefungstermin($anmeldungen[0]->pruefungstermin_id);
|
||||
$mitarbeiter = new mitarbeiter($pruefung->mitarbeiter_uid);
|
||||
if($pruefung->einzeln)
|
||||
{
|
||||
$einzeln = TRUE;
|
||||
$pruefungsintervall = $pruefung->pruefungsintervall;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<span class="bold">Lehrveranstaltung: </span><span><?=$lehrveranstaltung->bezeichnung?></span><br/>
|
||||
<span class="bold">Studiensemester: </span><span><?=$stdsem->bezeichnung?></span><br/>
|
||||
<span class="bold">Prüfer: </span><span><?=$mitarbeiter->getFullName(FALSE)?></span><br/>
|
||||
<table id="liste">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>#</th>
|
||||
<th>Vorname</th>
|
||||
<th>Nachname</th>
|
||||
<th>Matrikelnummer</th>
|
||||
<th>Datum</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$count = 0;
|
||||
/*@var $anmeldung pruefungsanmeldung */
|
||||
foreach($anmeldungen as $anmeldung)
|
||||
{
|
||||
$student = new student($anmeldung->uid);
|
||||
$prfTermin = new pruefungstermin($anmeldung->pruefungstermin_id);
|
||||
|
||||
if($einzeln)
|
||||
{
|
||||
$date = $datum->formatDatum($prfTermin->von, "Y-m-d H:i:s");
|
||||
$date = strtotime($date);
|
||||
$date = $date+(60*$pruefungsintervall*($count));
|
||||
$date = $datum->formatDatum($prfTermin->von,"d.m.Y").' - '.date("h:i",$date);
|
||||
$count++;
|
||||
}
|
||||
else
|
||||
{
|
||||
$date = $datum->formatDatum($prfTermin->von,"d.m.Y - H:i");
|
||||
}
|
||||
echo '<tr>';
|
||||
echo '<td>'.$anmeldung->reihung.'</td>';
|
||||
echo '<td>'.$student->vorname.'</td>';
|
||||
echo '<td>'.$student->nachname.'</td>';
|
||||
echo '<td>'.$student->matrikelnr.'</td>';
|
||||
echo '<td>'.$date.'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
?>
|
||||
</tbody>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,269 +1,306 @@
|
||||
<!DOCTYPE html>
|
||||
<?php
|
||||
/*
|
||||
* Copyright 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., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301, USA.
|
||||
*
|
||||
*
|
||||
* Authors: Stefan Puraner <puraner@technikum-wien.at>
|
||||
*/
|
||||
|
||||
require_once('../../../../config/cis.config.inc.php');
|
||||
require_once('../../../../include/functions.inc.php');
|
||||
require_once('../../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../../include/pruefungCis.class.php');
|
||||
require_once('../../../../include/studiensemester.class.php');
|
||||
|
||||
$uid = get_uid();
|
||||
$db = new basis_db();
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($uid);
|
||||
|
||||
$studiensemester = new studiensemester();
|
||||
$pruefung = new pruefungCis();
|
||||
$pruefung->getPruefungByMitarbeiter($uid, $studiensemester->getaktorNext());
|
||||
if(empty($pruefung->result) && !$rechte->isBerechtigt('lehre/pruefungsanmeldungAdmin'))
|
||||
die('Sie haben keine Berechtigung für diese Seite');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Prüfungsanmeldung Verwaltung</title>
|
||||
<script src="../../../../include/js/datecheck.js"></script>
|
||||
<script src="../../../../include/js/jquery1.9.min.js"></script>
|
||||
<script src="../../../../include/js/jquery.tablesorter.min.js"></script>
|
||||
<script src="./pruefung.js"></script>
|
||||
<link rel="stylesheet" href="../../../../skin/jquery-ui-1.9.2.custom.min.css">
|
||||
<link rel="stylesheet" href="../../../../skin/fhcomplete.css">
|
||||
<link rel="stylesheet" href="../../../../skin/style.css.php">
|
||||
<link rel="stylesheet" href="../../../../skin/tablesort.css">
|
||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
|
||||
<style type="text/css">
|
||||
body {
|
||||
padding: 10px 0 0 10px;
|
||||
}
|
||||
|
||||
#stgWrapper {
|
||||
position: absolute;
|
||||
height: 80%;
|
||||
width: 450px;
|
||||
padding: 1.8em 1.5em 1.8em 1em;
|
||||
border-radius: 25px;
|
||||
/*border: 1px solid black;*/
|
||||
box-shadow: 0em 0em 2em 0.5em #888888 inset;
|
||||
}
|
||||
|
||||
#studiengaenge {
|
||||
/*border: 1px solid black;*/
|
||||
width: 94%;
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 0 1em 0em 1em;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
|
||||
#prfWrapper {
|
||||
position: absolute;
|
||||
height: 80%;
|
||||
width: 200px;
|
||||
left: 510px;
|
||||
padding: 1.8em 1.5em 1.8em 1em;
|
||||
border-radius: 25px;
|
||||
/*border: 1px solid black;*/
|
||||
box-shadow: 0em 0em 2em 0.5em #888888 inset;
|
||||
}
|
||||
|
||||
#pruefungen {
|
||||
/*border: 1px solid black;*/
|
||||
width: 94%;
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 0 1em 0em 1em;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#anmWrapper {
|
||||
position: absolute;
|
||||
/*top: 45px;*/
|
||||
left: 760px;
|
||||
width: 400px;
|
||||
height: 80%;
|
||||
padding: 1.8em 1.5em 1.8em 1em;
|
||||
border-radius: 25px;
|
||||
/*border: 1px solid black;*/
|
||||
box-shadow: 0em 0em 2em 0.5em #888888 inset;
|
||||
}
|
||||
|
||||
#anmeldungen {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#anmeldungen > * {
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
#raum > * {
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
#message {
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
height: 2em;
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#sortable {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
#sortable li {
|
||||
margin: 0 3px 3px 3px;
|
||||
padding: 0.2em 0.4em 0.4em;
|
||||
padding-left: 1.5em;
|
||||
font-size: 1.4em;
|
||||
height: 18px;
|
||||
list-style-image: none;
|
||||
display: block;
|
||||
}
|
||||
#sortable li span {
|
||||
/*position: absolute;*/
|
||||
margin-left: -1.3em;
|
||||
float:left;
|
||||
}
|
||||
|
||||
.resultOK {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.resultNotOK {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#sortable li a {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#sortable li div {
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.anmerkungInfo {
|
||||
text-align: right;
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
#progressbar {
|
||||
position: fixed;
|
||||
width: 300px;
|
||||
top: 30%;
|
||||
left: 50%;
|
||||
margin-left: -150px;
|
||||
z-index: 100;
|
||||
background: '#9CFF29';
|
||||
}
|
||||
.modalOverlay {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
background-color: rgba(0,0,0,0.3); /* black semi-transparent */
|
||||
}
|
||||
|
||||
.studiengang {
|
||||
font-size: 1em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
loadStudiengaenge();
|
||||
$("#raumDialog").dialog({
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
width: "400px"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h1>Anmeldungen Verwalten</h1>
|
||||
<div id='stgWrapper'>
|
||||
<div id='studiengaenge'>
|
||||
<h2>Studiengänge</h2>
|
||||
<ul id='stgListe'>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id='prfWrapper'>
|
||||
<div id='pruefungen'>
|
||||
<h2>Prüfungen</h2>
|
||||
<ul id="pruefungenListe">
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id='anmWrapper'>
|
||||
<div id="anmeldungen">
|
||||
<h2>Anmeldungen</h2>
|
||||
<div id="anmeldeDaten">
|
||||
|
||||
</div>
|
||||
<div id="reihungSpeichernButton">
|
||||
|
||||
</div>
|
||||
<div id="kommentar">
|
||||
|
||||
</div>
|
||||
<div id="kommentarSpeichernButton">
|
||||
|
||||
</div>
|
||||
<div id="raumLink">
|
||||
|
||||
</div>
|
||||
<div id="raumDialog">
|
||||
<div id="raum">
|
||||
|
||||
</div>
|
||||
<div id="raumSpeichernButton">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="message"></div>
|
||||
<div id="progressbar"></div>
|
||||
</body>
|
||||
</html>
|
||||
<!DOCTYPE html>
|
||||
<?php
|
||||
/*
|
||||
* Copyright 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., 51 Franklin Street, Fifth Floor, Boston,
|
||||
* MA 02110-1301, USA.
|
||||
*
|
||||
*
|
||||
* Authors: Stefan Puraner <puraner@technikum-wien.at>
|
||||
*/
|
||||
|
||||
require_once('../../../../config/cis.config.inc.php');
|
||||
require_once('../../../../include/functions.inc.php');
|
||||
require_once('../../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../../include/pruefungCis.class.php');
|
||||
require_once('../../../../include/studiensemester.class.php');
|
||||
|
||||
$uid = get_uid();
|
||||
$db = new basis_db();
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($uid);
|
||||
|
||||
$studiensemester = new studiensemester();
|
||||
$pruefung = new pruefungCis();
|
||||
$pruefung->getPruefungByMitarbeiter($uid, $studiensemester->getaktorNext());
|
||||
if(empty($pruefung->result) && !$rechte->isBerechtigt('lehre/pruefungsanmeldungAdmin'))
|
||||
die('Sie haben keine Berechtigung für diese Seite');
|
||||
|
||||
?>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Prüfungsanmeldung Verwaltung</title>
|
||||
<script src="../../../../include/js/datecheck.js"></script>
|
||||
<script src="../../../../include/js/jquery1.9.min.js"></script>
|
||||
<script src="../../../../include/js/jquery.tablesorter.min.js"></script>
|
||||
<script src="./pruefung.js"></script>
|
||||
<link rel="stylesheet" href="../../../../skin/jquery-ui-1.9.2.custom.min.css">
|
||||
<link rel="stylesheet" href="../../../../skin/fhcomplete.css">
|
||||
<link rel="stylesheet" href="../../../../skin/style.css.php">
|
||||
<link rel="stylesheet" href="../../../../skin/tablesort.css">
|
||||
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
|
||||
<style type="text/css">
|
||||
body {
|
||||
padding: 10px 0 0 10px;
|
||||
}
|
||||
|
||||
#stgWrapper {
|
||||
position: absolute;
|
||||
height: 70px;
|
||||
width: 850px;
|
||||
padding: 1.8em 1.5em 1.8em 1em;
|
||||
border-radius: 25px;
|
||||
/*border: 1px solid black;*/
|
||||
box-shadow: 0em 0em 2em 0.5em #888888 inset;
|
||||
}
|
||||
|
||||
#studiengaenge {
|
||||
/*border: 1px solid black;*/
|
||||
width: 94%;
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 0 1em 0em 1em;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
|
||||
#prfWrapper {
|
||||
position: absolute;
|
||||
height: 70%;
|
||||
width: 300px;
|
||||
top: 180px;
|
||||
padding: 1.8em 1.5em 1.8em 1em;
|
||||
border-radius: 25px;
|
||||
/*border: 1px solid black;*/
|
||||
box-shadow: 0em 0em 2em 0.5em #888888 inset;
|
||||
}
|
||||
|
||||
#pruefungen {
|
||||
/*border: 1px solid black;*/
|
||||
width: 94%;
|
||||
position: relative;
|
||||
float: left;
|
||||
padding: 0 1em 0em 1em;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#anmWrapper {
|
||||
position: absolute;
|
||||
/*top: 45px;*/
|
||||
left: 350px;
|
||||
top: 180px;
|
||||
width: 500px;
|
||||
height: 70%;
|
||||
padding: 1.8em 1.5em 1.8em 1em;
|
||||
border-radius: 25px;
|
||||
/*border: 1px solid black;*/
|
||||
box-shadow: 0em 0em 2em 0.5em #888888 inset;
|
||||
}
|
||||
|
||||
#anmeldungen {
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#anmeldungen > * {
|
||||
padding: 0.5em;
|
||||
}
|
||||
|
||||
#raum > * {
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
|
||||
#message {
|
||||
position: fixed;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
height: 2em;
|
||||
font-size: 1.5em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#sortable {
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
}
|
||||
#sortable li {
|
||||
margin: 0 3px 3px 3px;
|
||||
padding: 0.2em 0.4em 0.4em;
|
||||
padding-left: 1.5em;
|
||||
font-size: 1.4em;
|
||||
height: 18px;
|
||||
list-style-image: none;
|
||||
display: block;
|
||||
}
|
||||
#sortable li span {
|
||||
/*position: absolute;*/
|
||||
margin-left: -1.3em;
|
||||
float:left;
|
||||
}
|
||||
|
||||
.resultOK {
|
||||
color: green;
|
||||
}
|
||||
|
||||
.resultNotOK {
|
||||
color: red;
|
||||
}
|
||||
|
||||
#sortable li a {
|
||||
float: left;
|
||||
}
|
||||
|
||||
#sortable li div {
|
||||
float: right;
|
||||
margin-left: 5px;
|
||||
font-size: 0.8em;
|
||||
}
|
||||
|
||||
.anmerkungInfo {
|
||||
text-align: right;
|
||||
width: 10%;
|
||||
}
|
||||
|
||||
#progressbar {
|
||||
position: fixed;
|
||||
width: 300px;
|
||||
top: 30%;
|
||||
left: 50%;
|
||||
margin-left: -150px;
|
||||
z-index: 100;
|
||||
background: '#9CFF29';
|
||||
}
|
||||
.modalOverlay {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
background-color: rgba(0,0,0,0.3); /* black semi-transparent */
|
||||
}
|
||||
|
||||
.studiengang {
|
||||
font-size: 1em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#studiengaenge > div {
|
||||
float: left;
|
||||
width: 50%;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<script>
|
||||
$(document).ready(function(){
|
||||
loadStudiengaenge();
|
||||
$("#filter_studiensemester").css("visibility","visible");
|
||||
console.log($("#filter_studiensemester"));
|
||||
$("#raumDialog").dialog({
|
||||
modal: true,
|
||||
autoOpen: false,
|
||||
width: "400px"
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h1>Anmeldungen Verwalten</h1>
|
||||
<div id='stgWrapper'>
|
||||
<div id='studiengaenge'>
|
||||
<div>
|
||||
<h2>Studiengänge</h2>
|
||||
<div id='stgListe'>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h2>Studiensemester</h2>
|
||||
<?php
|
||||
echo '<select id="filter_studiensemester" onchange="loadPruefungStudiengang();" style="visibility: hidden;">';
|
||||
$aktuellesSemester = $studiensemester->getaktorNext();
|
||||
$studiensemester->getAll();
|
||||
foreach($studiensemester->studiensemester as $sem)
|
||||
{
|
||||
/*@var $sem studiensemester */
|
||||
if($aktuellesSemester == $sem->studiensemester_kurzbz)
|
||||
{
|
||||
echo '<option selected value="'.$sem->studiensemester_kurzbz.'">'.$sem->bezeichnung.'</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<option value="'.$sem->studiensemester_kurzbz.'">'.$sem->bezeichnung.'</option>';
|
||||
}
|
||||
}
|
||||
echo '</select></p>';
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='prfWrapper'>
|
||||
<div id='pruefungen'>
|
||||
<h2>Prüfungen</h2>
|
||||
<ul id="pruefungenListe">
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id='anmWrapper'>
|
||||
<div id="anmeldungen">
|
||||
<h2>Anmeldungen</h2>
|
||||
<div id="anmeldung_hinzufuegen">
|
||||
|
||||
</div>
|
||||
<div id="anmeldeDaten">
|
||||
|
||||
</div>
|
||||
<div id="reihungSpeichernButton">
|
||||
|
||||
</div>
|
||||
<div id="kommentar">
|
||||
|
||||
</div>
|
||||
<div id="kommentarSpeichernButton">
|
||||
|
||||
</div>
|
||||
<div id="raumLink">
|
||||
|
||||
</div>
|
||||
<div id="listeDrucken">
|
||||
|
||||
</div>
|
||||
<div id="raumDialog">
|
||||
<div id="raum">
|
||||
|
||||
</div>
|
||||
<div id="raumSpeichernButton">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="message"></div>
|
||||
<div id="progressbar"></div>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -102,7 +102,7 @@ $openpath = DOC_ROOT.'/documents/'.strtolower($stg_obj->kuerzel).'/'.$lv_obj->se
|
||||
if(is_file($openpath . $inhalt))
|
||||
{
|
||||
writeCISlog('DELETE', "rm -r '$openpath$inhalt'");
|
||||
exec("rm -r '$openpath$inhalt'");
|
||||
exec("rm -r ".escapeshellarg($openpath.$inhalt));
|
||||
echo '<center>'.$p->t('global/erfolgreichgelöscht').'</center>';
|
||||
}
|
||||
else
|
||||
@@ -132,11 +132,11 @@ $openpath = DOC_ROOT.'/documents/'.strtolower($stg_obj->kuerzel).'/'.$lv_obj->se
|
||||
{
|
||||
if(!stristr($fn, '.php') && !stristr($fn, '.php3') &&
|
||||
!stristr($fn,'.php4') && !stristr($fn, '.php5') &&
|
||||
!stristr($fn, '.cgi') && !stristr($fn, '.pl'))
|
||||
!stristr($fn, '.cgi') && !stristr($fn, '.pl') && !stristr($fn, '.phtml'))
|
||||
{
|
||||
if(move_uploaded_file($_FILES['userfile']['tmp_name'],$openpath . $fn))
|
||||
{
|
||||
exec('sudo chown www-data:teacher "'.$openpath.$fn.'"');
|
||||
exec('sudo chown www-data:teacher '.escapeshellarg($openpath.$fn));
|
||||
echo '<center>'.$p->t('semesterplan/fileErfolgreichHochgeladen').'</center>';
|
||||
}
|
||||
else
|
||||
@@ -181,4 +181,4 @@ $openpath = DOC_ROOT.'/documents/'.strtolower($stg_obj->kuerzel).'/'.$lv_obj->se
|
||||
?>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -623,7 +623,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!stristr($uploadfile, '.php') && !stristr($uploadfile, '.cgi') && !stristr($uploadfile, '.pl') && $file_name!='.htaccess')
|
||||
if(!stristr($uploadfile, '.php') && !stristr($uploadfile, '.cgi') && !stristr($uploadfile, '.pl') && !stristr($uploadfile, '.phtml') && $file_name!='.htaccess')
|
||||
{
|
||||
if(copy($_FILES[$file]['tmp_name'], $uploadfile))
|
||||
{
|
||||
@@ -646,7 +646,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!stristr($uploadfile, '.php') && !stristr($uploadfile, '.cgi') && !stristr($uploadfile, '.pl') && $file_name!='.htaccess')
|
||||
if(!stristr($uploadfile, '.php') && !stristr($uploadfile, '.cgi') && !stristr($uploadfile, '.pl') && !stristr($uploadfile, '.phtml') && $file_name!='.htaccess')
|
||||
{
|
||||
if(copy($_FILES[$file]['tmp_name'], $uploadfile))
|
||||
{
|
||||
@@ -679,7 +679,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!stristr($uploadfile, '.php') && !stristr($uploadfile, '.cgi') && !stristr($uploadfile, '.pl') && $file_name!='.htaccess')
|
||||
if(!stristr($uploadfile, '.php') && !stristr($uploadfile, '.cgi') && !stristr($uploadfile, '.pl') && !stristr($uploadfile, '.phtml') && $file_name!='.htaccess')
|
||||
{
|
||||
if(copy($_FILES[$file]['tmp_name'], $uploadfile))
|
||||
{
|
||||
@@ -702,7 +702,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!stristr($uploadfile, '.php') && !stristr($uploadfile, '.cgi') && !stristr($uploadfile, '.pl') && $file_name!='.htaccess')
|
||||
if(!stristr($uploadfile, '.php') && !stristr($uploadfile, '.cgi') && !stristr($uploadfile, '.pl') && !stristr($uploadfile, '.phtml') && $file_name!='.htaccess')
|
||||
{
|
||||
if(copy($_FILES[$file]['tmp_name'], $uploadfile))
|
||||
{
|
||||
@@ -1331,7 +1331,7 @@
|
||||
{
|
||||
if(!@file_exists($dest_dir->path.'/'.$new_file_name_) && !@is_dir($dest_dir->path.'/'.$new_file_name_))
|
||||
{
|
||||
if(!stristr($new_file_name_, '.php') && !stristr($new_file_name_, '.cgi') && !stristr($new_file_name_, '.pl') && $new_file_name_!='.htaccess')
|
||||
if(!stristr($new_file_name_, '.php') && !stristr($new_file_name_, '.cgi') && !stristr($new_file_name_, '.pl') && !stristr($new_file_name_, '.phtml') && $new_file_name_!='.htaccess')
|
||||
{
|
||||
rename($dest_dir->path.'/'.$entry, $dest_dir->path.'/'.$new_file_name_);
|
||||
|
||||
|
||||
+221
-49
@@ -33,6 +33,7 @@ require_once('../../include/akte.class.php');
|
||||
require_once('../../include/konto.class.php');
|
||||
require_once('../../include/benutzer.class.php');
|
||||
require_once('../../include/vorlage.class.php');
|
||||
require_once('../../include/addon.class.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die('Fehler beim Oeffnen der Datenbankverbindung');
|
||||
@@ -89,31 +90,34 @@ if(isset($_GET['abschlusspruefung_id']))
|
||||
$params.='&abschlusspruefung_id='.$_GET['abschlusspruefung_id'];
|
||||
if(isset($_GET['typ']))
|
||||
$params.='&typ='.$_GET['typ'];
|
||||
|
||||
if(isset($_GET['output']))
|
||||
$output=$_GET['output'];
|
||||
else
|
||||
$output='pdf';
|
||||
|
||||
$konto = new konto();
|
||||
if (($user == $_GET["uid"]) || $rechte->isBerechtigt('admin'))
|
||||
{
|
||||
if($xsl=='Inskription' && (!$konto->checkStudienbeitrag($user, $_GET["ss"])))
|
||||
die('Der Studienbeitrag wurde noch nicht bezahlt');
|
||||
if(($xsl=='Inskription' || $xsl == 'Studienblatt') && (!$konto->checkStudienbeitrag($user, $_GET["ss"])))
|
||||
die('Der Studienbeitrag wurde noch nicht bezahlt');
|
||||
|
||||
if(isset($_GET['buchungsnummern']))
|
||||
{
|
||||
//Beim Drucken von Buchungsbestaetigungen pruefen ob diese Buchungen auch zu diesem Benutzer gehoeren
|
||||
$buchungsnr = explode(';',$_GET['buchungsnummern']);
|
||||
$user_obj = new benutzer();
|
||||
$user_obj->load($user);
|
||||
foreach($buchungsnr as $bnr)
|
||||
//Beim Drucken von Buchungsbestaetigungen pruefen ob diese Buchungen auch zu diesem Benutzer gehoeren
|
||||
$buchungsnr = explode(';',$_GET['buchungsnummern']);
|
||||
$user_obj = new benutzer();
|
||||
$user_obj->load($user);
|
||||
foreach($buchungsnr as $bnr)
|
||||
{
|
||||
if($bnr!='')
|
||||
{
|
||||
if($bnr!='')
|
||||
{
|
||||
$konto->load($bnr);
|
||||
if($konto->person_id!=$user_obj->person_id)
|
||||
die('Sie haben keine Berechtigung fuer diese Buchung');
|
||||
if($konto->getDifferenz($bnr)!=0)
|
||||
die('Diese Zahlung wurde noch nicht beglichen');
|
||||
}
|
||||
$konto->load($bnr);
|
||||
if($konto->person_id!=$user_obj->person_id)
|
||||
die('Sie haben keine Berechtigung fuer diese Buchung');
|
||||
if($konto->getDifferenz($bnr)!=0)
|
||||
die('Diese Zahlung wurde noch nicht beglichen');
|
||||
}
|
||||
}
|
||||
}
|
||||
$xml_url=XML_ROOT.$xml.$params;
|
||||
//echo $xml_url;
|
||||
@@ -134,49 +138,217 @@ if (($user == $_GET["uid"]) || $rechte->isBerechtigt('admin'))
|
||||
{
|
||||
if($xsl_stg_kz=='')
|
||||
$xsl_stg_kz='0';
|
||||
|
||||
|
||||
$vorlage->getAktuelleVorlage($xsl_stg_kz, $xsl, $version);
|
||||
}
|
||||
|
||||
// Load the XSL source
|
||||
$xsl_doc = new DOMDocument;
|
||||
|
||||
if(!$xsl_doc->loadXML($vorlage->text))
|
||||
die('unable to load xsl');
|
||||
|
||||
// Configure the transformer
|
||||
$proc = new XSLTProcessor;
|
||||
$proc->importStyleSheet($xsl_doc); // attach the xsl rules
|
||||
|
||||
$buffer = $proc->transformToXml($xml_doc);
|
||||
//in $buffer steht nun das xsl-fo file mit den daten
|
||||
$buffer = '<?xml version="1.0" encoding="utf-8" ?>'.substr($buffer, strpos($buffer,"\n"),strlen($buffer));
|
||||
|
||||
//Pdf erstellen
|
||||
$fo2pdf = new XslFo2Pdf();
|
||||
|
||||
//wenn uid gefunden wird, dann den Nachnamen zum Dateinamen dazuhaengen
|
||||
$nachname='';
|
||||
|
||||
if(mb_strstr($vorlage->mimetype, 'application/vnd.oasis.opendocument'))
|
||||
{
|
||||
switch($vorlage->mimetype)
|
||||
{
|
||||
case 'application/vnd.oasis.opendocument.text':
|
||||
$endung = 'odt';
|
||||
break;
|
||||
case 'application/vnd.oasis.opendocument.spreadsheet':
|
||||
$endung = 'ods';
|
||||
break;
|
||||
default:
|
||||
$endung = 'pdf';
|
||||
}
|
||||
|
||||
// Load the XSL source
|
||||
$xsl_doc = new DOMDocument;
|
||||
|
||||
if(!$xsl_doc->loadXML($vorlage->text))
|
||||
die('unable to load xsl');
|
||||
|
||||
// Configure the transformer
|
||||
$proc = new XSLTProcessor;
|
||||
$proc->importStyleSheet($xsl_doc); // attach the xsl rules
|
||||
|
||||
$buffer = $proc->transformToXml($xml_doc);
|
||||
//echo $buffer;
|
||||
//exit;
|
||||
$tempfolder = '/tmp/'.uniqid();
|
||||
mkdir($tempfolder);
|
||||
chdir($tempfolder);
|
||||
file_put_contents('content.xml', $buffer);
|
||||
|
||||
// Wenn ein Style XSL uebergeben wurde wird ein zweites XML File erstellt mit den
|
||||
// Styleanweisungen und ebenfalls zum Zip hinzugefuegt
|
||||
if(isset($_GET['style_xsl']))
|
||||
{
|
||||
$style_xsl=$_GET['style_xsl'];
|
||||
$style_vorlage = new vorlage();
|
||||
$style_vorlage->getAktuelleVorlage($xsl_stg_kz, $style_xsl, $version);
|
||||
$style_xsl_doc = new DOMDocument;
|
||||
if(!$style_xsl_doc->loadXML($style_vorlage->text))
|
||||
die('unable to load xsl');
|
||||
|
||||
// Configure the transformer
|
||||
$style_proc = new XSLTProcessor;
|
||||
$style_proc->importStyleSheet($style_xsl_doc); // attach the xsl rules
|
||||
|
||||
$stylebuffer = $style_proc->transformToXml($xml_doc);
|
||||
|
||||
file_put_contents('styles.xml', $stylebuffer);
|
||||
}
|
||||
|
||||
$vorlage_found=false;
|
||||
$addons = new addon();
|
||||
|
||||
foreach($addons->aktive_addons as $addon)
|
||||
{
|
||||
$zipfile = DOC_ROOT.'addons/'.$addon.'/system/vorlage_zip/'.$vorlage->vorlage_kurzbz.'.'.$endung;
|
||||
|
||||
if(file_exists($zipfile))
|
||||
{
|
||||
$vorlage_found=true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!$vorlage_found)
|
||||
$zipfile = DOC_ROOT.'system/vorlage_zip/'.$vorlage->vorlage_kurzbz.'.'.$endung;
|
||||
|
||||
|
||||
$tempname_zip = 'out.zip';
|
||||
if(copy($zipfile, $tempname_zip))
|
||||
{
|
||||
exec("zip $tempname_zip content.xml");
|
||||
if(isset($_GET['style_xsl']))
|
||||
exec("zip $tempname_zip styles.xml");
|
||||
|
||||
clearstatcache();
|
||||
if($vorlage->bezeichnung!='')
|
||||
$filename = $vorlage->bezeichnung;
|
||||
else
|
||||
$filename = $vorlage->vorlage_kurzbz;
|
||||
if($output == 'pdf')
|
||||
{
|
||||
if($xsl == 'LV_Informationen')
|
||||
{
|
||||
$studiengang = new studiengang($_GET['stg_kz']);
|
||||
$studiensemester = new studiensemester($_GET['ss']);
|
||||
$tempPdfName = $vorlage->vorlage_kurzbz.'_'.$studiengang->kurzbzlang.'_'.$studiensemester->studiensemester_kurzbz.'.pdf';
|
||||
$filename = $filename.'_'.$studiengang->kurzbzlang.'_'.$studiensemester->studiensemester_kurzbz.'.pdf';
|
||||
}
|
||||
elseif($xsl == "Honorarvertrag")
|
||||
{
|
||||
$tempPdfName = $vorlage->vorlage_kurzbz.'_'.$benutzer_obj->nachname.'_'.$benutzer_obj->vorname.'.pdf';
|
||||
$filename = $filename.'_'.$benutzer_obj->nachname.'_'.$benutzer_obj->vorname.'.pdf';
|
||||
}
|
||||
elseif($xsl == "Studienordnung")
|
||||
{
|
||||
$studienordnung = new studienordnung();
|
||||
$studienordnung->loadStudienordnung($_GET['studienordnung_id']);
|
||||
$filename = $filename.'_'.$studienordnung->studiengangkurzbzlang.'.pdf';
|
||||
$tempPdfName = $vorlage->vorlage_kurzbz.'.pdf';
|
||||
}
|
||||
else
|
||||
{
|
||||
$tempPdfName = $vorlage->vorlage_kurzbz.'.pdf';
|
||||
$filename = $filename.'.pdf';
|
||||
}
|
||||
exec("unoconv -e IsSkipEmptyPages=false --stdout -f pdf $tempname_zip > $tempPdfName");
|
||||
|
||||
$fsize = filesize($tempPdfName);
|
||||
$handle = fopen($tempPdfName,'r');
|
||||
header('Content-type: application/pdf');
|
||||
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
||||
header('Content-Length: '.$fsize);
|
||||
}
|
||||
else if($output =='odt')
|
||||
{
|
||||
if($xsl == "Studienordnung")
|
||||
{
|
||||
$studienordnung = new studienordnung();
|
||||
$studienordnung->loadStudienordnung($_GET['studienordnung_id']);
|
||||
$filename = $filename.'_'.$studienordnung->studiengangkurzbzlang;
|
||||
}
|
||||
$fsize = filesize($tempname_zip);
|
||||
$handle = fopen($tempname_zip,'r');
|
||||
header('Content-type: '.$vorlage->mimetype);
|
||||
header('Content-Disposition: attachment; filename="'.$filename.'.'.$endung.'"');
|
||||
header('Content-Length: '.$fsize);
|
||||
}
|
||||
else if($output =='doc')
|
||||
{
|
||||
$tempPdfName = $vorlage->vorlage_kurzbz.'.doc';
|
||||
if($xsl == "Studienordnung")
|
||||
{
|
||||
$studienordnung = new studienordnung();
|
||||
$studienordnung->loadStudienordnung($_GET['studienordnung_id']);
|
||||
$filename = $filename.'_'.$studienordnung->studiengangkurzbzlang.'.doc';
|
||||
}
|
||||
else
|
||||
{
|
||||
$filename = $filename.'.doc';
|
||||
}
|
||||
exec("unoconv -e IsSkipEmptyPages=false --stdout -f doc $tempname_zip > $tempPdfName");
|
||||
|
||||
$fsize = filesize($tempPdfName);
|
||||
$handle = fopen($tempPdfName,'r');
|
||||
header('Content-type: application/vnd.ms-word');
|
||||
header('Content-Disposition: attachment; filename="'.$filename.'"');
|
||||
header('Content-Length: '.$fsize);
|
||||
}
|
||||
while (!feof($handle))
|
||||
{
|
||||
echo fread($handle, 8192);
|
||||
}
|
||||
fclose($handle);
|
||||
|
||||
unlink('content.xml');
|
||||
if(isset($_GET['style_xsl']))
|
||||
unlink('styles.xml');
|
||||
unlink($tempname_zip);
|
||||
if($output=='pdf' || $output=='doc')
|
||||
unlink($filename);
|
||||
rmdir($tempfolder);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Load the XSL source
|
||||
$xsl_doc = new DOMDocument;
|
||||
|
||||
if(!$xsl_doc->loadXML($vorlage->text))
|
||||
die('unable to load xsl');
|
||||
|
||||
// Configure the transformer
|
||||
$proc = new XSLTProcessor;
|
||||
$proc->importStyleSheet($xsl_doc); // attach the xsl rules
|
||||
|
||||
$buffer = $proc->transformToXml($xml_doc);
|
||||
//in $buffer steht nun das xsl-fo file mit den daten
|
||||
$buffer = '<?xml version="1.0" encoding="utf-8" ?>'.substr($buffer, strpos($buffer,"\n"),strlen($buffer));
|
||||
|
||||
//Pdf erstellen
|
||||
$fo2pdf = new XslFo2Pdf();
|
||||
|
||||
//wenn uid gefunden wird, dann den Nachnamen zum Dateinamen dazuhaengen
|
||||
$nachname='';
|
||||
|
||||
|
||||
if(isset($_GET['uid']) && $_GET['uid']!='')
|
||||
{
|
||||
if(isset($_GET['uid']) && $_GET['uid']!='')
|
||||
{
|
||||
$uid = str_replace(';','',$_GET['uid']);
|
||||
$qry = "SELECT nachname FROM campus.vw_benutzer WHERE uid=".$db->db_add_param($uid);
|
||||
|
||||
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
if($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$nachname = '_'.$row->nachname;
|
||||
}
|
||||
if($row = $db->db_fetch_object($result))
|
||||
{
|
||||
$nachname = '_'.$row->nachname;
|
||||
}
|
||||
}
|
||||
}
|
||||
$filename=$xsl.$nachname;
|
||||
|
||||
if (!$fo2pdf->generatePdf($buffer, $filename, "D"))
|
||||
{
|
||||
}
|
||||
$filename=$xsl.$nachname;
|
||||
|
||||
if (!$fo2pdf->generatePdf($buffer, $filename, "D"))
|
||||
{
|
||||
echo('Failed to generate PDF');
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -135,6 +135,7 @@ echo $p->t('global/studiensemester')."</b> <SELECT name='stsem' onChange=\"MM_ju
|
||||
echo "</SELECT><br />";
|
||||
|
||||
$konto = new konto();
|
||||
|
||||
if ($konto->checkStudienbeitrag($uid, $stsem))
|
||||
{
|
||||
echo "<a href='../pdfExport.php?xsl=Inskription&xml=student.rdf.php&ss=".$stsem."&uid=".$uid."&xsl_stg_kz=".$xsl_stg_kz."'>".$p->t('tools/inskriptionsbestaetigung')."</a>";
|
||||
@@ -145,6 +146,19 @@ else
|
||||
|
||||
echo "<hr>";
|
||||
|
||||
if(defined('CIS_DOKUMENTE_STUDIENBUCHLBATT_DRUCKEN') && CIS_DOKUMENTE_STUDIENBUCHLBATT_DRUCKEN)
|
||||
{
|
||||
if ($konto->checkStudienbeitrag($uid, $stsem))
|
||||
{
|
||||
echo "<a href='../pdfExport.php?xsl=Studienblatt&xml=studienblatt.xml.php&ss=".$stsem."&uid=".$uid."'>".$p->t('tools/studienbuchblatt')."</a>";
|
||||
echo ' - '.$p->t('tools/studienbeitragFuerSSBezahltAmDatum',array($stsem, $konto->buchungsdatum));
|
||||
}
|
||||
else
|
||||
echo $p->t('tools/studienbuchblatt')." - ".$p->t('tools/studienbeitragFuerSSNochNichtBezahlt',array($stsem));
|
||||
|
||||
echo "<hr>";
|
||||
}
|
||||
|
||||
echo "<a href='studienerfolgsbestaetigung.php' class='Item'>".$p->t('tools/studienerfolgsbestaetigung')." Deutsch</a><br>";
|
||||
echo "<a href='studienerfolgsbestaetigung.php?lang=en' class='Item'>".$p->t('tools/studienerfolgsbestaetigung')." Englisch</a>";
|
||||
echo "<hr><br>";
|
||||
|
||||
@@ -1,250 +0,0 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>,
|
||||
* Karl Burkhart <burkhart@technikum-wien.at>.
|
||||
*/
|
||||
|
||||
// Oberflaeche zur Aenderung von Beispielen und Upload von Bildern
|
||||
|
||||
require_once('../../config/cis.config.inc.php');
|
||||
require_once('../../include/functions.inc.php');
|
||||
require_once('../../include/person.class.php');
|
||||
require_once('../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../include/akte.class.php');
|
||||
require_once('../../include/dokument.class.php');
|
||||
require_once('../../include/mail.class.php');
|
||||
require_once('../../include/phrasen.class.php');
|
||||
require_once('../../include/dms.class.php');
|
||||
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
|
||||
session_cache_limiter('none'); //muss gesetzt werden sonst funktioniert der Download mit IE8 nicht
|
||||
session_start();
|
||||
if (!isset($_SESSION['bewerbung/user']) || $_SESSION['bewerbung/user']=='')
|
||||
{
|
||||
header('Location: registration.php?method=allgemein');
|
||||
exit;
|
||||
}
|
||||
|
||||
if(isset($_GET['lang']))
|
||||
setSprache($_GET['lang']);
|
||||
|
||||
$person_id = isset($_GET['person_id'])?$_GET['person_id']:'';
|
||||
|
||||
if(!isset($_SESSION['bewerbung/personId']))
|
||||
die('Sie haben keine Berechtigung für diese Seite');
|
||||
|
||||
if($person_id!=$_SESSION['bewerbung/personId'])
|
||||
die('Sie haben keine Berechtigung für diese Seite');
|
||||
|
||||
$dokumenttyp = (isset($_GET['dokumenttyp']))? $_GET['dokumenttyp'] : '';
|
||||
$kategorie_kurzbz = isset($_REQUEST['kategorie_kurzbz'])?$_REQUEST['kategorie_kurzbz']:'';
|
||||
$sprache = getSprache();
|
||||
$p=new phrasen($sprache);
|
||||
|
||||
$PHP_SELF = $_SERVER['PHP_SELF'];
|
||||
echo "<html>
|
||||
<head><title>File-Upload</title></head>
|
||||
<body>";
|
||||
|
||||
//Bei Upload des Bildes
|
||||
if(isset($_POST['submitbild']))
|
||||
{
|
||||
$error = false;
|
||||
|
||||
// dms Eintrag anlegen
|
||||
if(isset($_POST['fileupload']))
|
||||
{
|
||||
$ext = pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION);
|
||||
$filename = uniqid();
|
||||
$filename.=".".$ext;
|
||||
$uploadfile = DMS_PATH.$filename;
|
||||
|
||||
|
||||
if(move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile))
|
||||
{
|
||||
if(!chgrp($uploadfile,'dms'))
|
||||
echo 'CHGRP failed';
|
||||
if(!chmod($uploadfile, 0774))
|
||||
echo 'CHMOD failed';
|
||||
exec('sudo chown wwwrun '.$uploadfile);
|
||||
|
||||
$dms = new dms();
|
||||
|
||||
$dms->version='0';
|
||||
$dms->kategorie_kurzbz=$kategorie_kurzbz;
|
||||
|
||||
$dms->insertamum=date('Y-m-d H:i:s');
|
||||
//$dms->insertvon = $user;
|
||||
$dms->mimetype=$_FILES['file']['type'];
|
||||
$dms->filename = $filename;
|
||||
$dms->name = $_FILES['file']['name'];
|
||||
|
||||
if($dms->save(true))
|
||||
{
|
||||
$dms_id=$dms->dms_id;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Fehler beim Speichern der Daten';
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Fehler beim Hochladen der Datei';
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_FILES['file']['tmp_name']) && !$error)
|
||||
{
|
||||
//Extension herausfiltern
|
||||
$ext = explode('.',$_FILES['file']['name']);
|
||||
$ext = mb_strtolower($ext[count($ext)-1]);
|
||||
|
||||
$filename = $_FILES['file']['tmp_name'];
|
||||
|
||||
//$fp = fopen($filename,'r');
|
||||
//auslesen
|
||||
//$content = fread($fp, filesize($filename));
|
||||
//fclose($fp);
|
||||
|
||||
$akte = new akte();
|
||||
|
||||
if($akte->getAkten($_GET['person_id'], 'Lichtbil'))
|
||||
{
|
||||
if(count($akte->result)>0)
|
||||
{
|
||||
$akte = $akte->result[0];
|
||||
$akte->new = false;
|
||||
}
|
||||
else
|
||||
$akte->new = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$akte->new = true;
|
||||
}
|
||||
|
||||
$dokument = new dokument();
|
||||
$dokument->loadDokumenttyp($_REQUEST['dokumenttyp']);
|
||||
|
||||
$extension = end(explode(".",strtolower($_FILES['file']['name'])));
|
||||
$titel = '';
|
||||
|
||||
// da nur 32 zeichen gespeichert werden dürfen, muss anhand vom typ gekürzt werden
|
||||
if($_REQUEST['dokumenttyp']=='Lebenslf')
|
||||
$titel = $p->t('incoming/lebenslauf').".".$extension;
|
||||
if($_REQUEST['dokumenttyp']=='LearnAgr')
|
||||
$titel = $p->t('incoming/learningAgreement').".".$extension;
|
||||
if($_REQUEST['dokumenttyp']=='Motivat')
|
||||
$titel = $p->t('incoming/motivationsschreiben').".".$extension;
|
||||
if($_REQUEST['dokumenttyp']=='Zeugnis')
|
||||
$titel = $p->t('incoming/zeugnis').".".$extension;
|
||||
if($_REQUEST['dokumenttyp']=='Lichtbil')
|
||||
$titel = $p->t('incoming/lichtbild').".".$extension;
|
||||
|
||||
|
||||
$akte->dokument_kurzbz = $_REQUEST['dokumenttyp'];
|
||||
$akte->bezeichnung = $_FILES['file']['name'];
|
||||
$akte->person_id = $_GET['person_id'];
|
||||
//$akte->inhalt = base64_encode($content);
|
||||
$akte->mimetype = $_FILES['file']['type'];
|
||||
$akte->erstelltam = date('Y-m-d H:i:s');
|
||||
$akte->gedruckt = false;
|
||||
$akte->titel = $titel;
|
||||
//$akte->bezeichnung = $dokument->bezeichnung;
|
||||
$akte->updateamum = date('Y-m-d H:i:s');
|
||||
// $akte->updatevon = $user;
|
||||
$akte->insertamum = date('Y-m-d H:i:s');
|
||||
$akte->nachgereicht = false;
|
||||
$akte->anmerkung = '';
|
||||
// $akte->insertvon = $user;
|
||||
$akte->uid = '';
|
||||
$akte->dms_id = $dms_id;
|
||||
$akte->new = true;
|
||||
|
||||
|
||||
if (!$akte->save()) {
|
||||
echo "<b>Fehler: $akte->errormsg</b>";
|
||||
} else {
|
||||
echo "<b>" . $p->t('global/erfolgreichgespeichert') . "</b>";
|
||||
}
|
||||
|
||||
echo "<script>
|
||||
|
||||
var loc = window.opener.location;
|
||||
|
||||
if(!/active/.test(loc.href)) {
|
||||
window.opener.location = loc + '?active=dokumente';
|
||||
} else {
|
||||
window.opener.location.reload();
|
||||
}
|
||||
</script>";
|
||||
}
|
||||
}
|
||||
|
||||
if($person_id !='')
|
||||
{
|
||||
$dokument = new dokument();
|
||||
$dokument->getAllDokumenteForPerson($person_id);
|
||||
echo " <form method='POST' enctype='multipart/form-data' action='$PHP_SELF?person_id=".$_GET['person_id']."'>
|
||||
<table>
|
||||
<tr>
|
||||
<td>".$p->t('incoming/dokument').":</td>
|
||||
<td>
|
||||
<input type='file' name='file' />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>".$p->t('incoming/dokumenttyp').":</td>
|
||||
<td>
|
||||
<SELECT name='dokumenttyp'>";
|
||||
foreach ($dokument->result as $dok)
|
||||
{
|
||||
$selected=($dokumenttyp == $dok->dokument_kurzbz)?'selected':'';
|
||||
|
||||
echo '<option '.$selected.' value="'.$dok->dokument_kurzbz.'" >'.$dok->bezeichnung."</option>\n";
|
||||
|
||||
}
|
||||
echo " </select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td> </td></tr>
|
||||
<tr>
|
||||
<td><input type='hidden' name='kategorie_kurzbz' id='kategorie_kurzbz' value='Akte'>
|
||||
<td><input type='hidden' name='fileupload' id='fileupload'></td>
|
||||
<td><input type='submit' name='submitbild' value='Upload'></td>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</form>";
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Es wurde keine Person_id angegeben";
|
||||
}
|
||||
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
@@ -518,7 +518,7 @@ echo '<table width="100%"><tr><td>';
|
||||
|
||||
//Liste der Studiengänge
|
||||
echo 'Studiengang: <select onchange="window.location.href=this.value">';
|
||||
echo '<option value="'.$PHP_SELF.'?" '.$selected.'>Alle Studiengänge</option>';
|
||||
echo '<option value="'.$PHP_SELF.'?" >Alle Studiengänge</option>';
|
||||
foreach ($studiengang->result as $row)
|
||||
{
|
||||
$stg_arr[$row->studiengang_kz] = $row->kuerzel;
|
||||
|
||||
+4
-28
@@ -347,40 +347,16 @@ if(isset($_REQUEST['delete']))
|
||||
// DB Eintrag löschen
|
||||
if(!$dms->deleteVersion($dms_id, $version))
|
||||
echo '<span class="error">'.$dms->errormsg.'</span>';
|
||||
else
|
||||
{
|
||||
// File im Filesystem löschen
|
||||
if(unlink(DMS_PATH.$dms->filename))
|
||||
echo '<span class="ok">Erfolgreich gelöscht!</span>';
|
||||
else
|
||||
echo '<span class="error">Fehler beim löschen aus dem Filesystem aufgetreten!</span>';
|
||||
}
|
||||
}else
|
||||
}
|
||||
else
|
||||
{
|
||||
// lösche gesamten Eintrag
|
||||
$dms = new dms();
|
||||
$dms_id = $_REQUEST['dms_id'];
|
||||
|
||||
$dms = new dms();
|
||||
$error = false;
|
||||
|
||||
$dms->getAllVersions($dms_id);
|
||||
|
||||
// DB Einträge löschen
|
||||
// DB Einträge und Dokumente löschen
|
||||
if(!$dms->deleteDms($dms_id))
|
||||
echo '<span class="error">'.$dms->errormsg.'</span>';
|
||||
else
|
||||
{
|
||||
// Alle Versionen der Datei vom Filesystem löschen
|
||||
foreach($dms->result as $obj)
|
||||
{
|
||||
if(!unlink(DMS_PATH.$obj->filename))
|
||||
$error = true;
|
||||
}
|
||||
if($error)
|
||||
echo '<span class="error">Fehler beim löschen aus dem Filesystem aufgetreten!</span>';
|
||||
else
|
||||
echo '<span class="ok">Erfolgreich gelöscht!</span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ define('MAIL_INTERNATIONAL_OUTGOING', 'invalid@technikum-wien.at');
|
||||
|
||||
define('ANZAHL_PREINTERESSENT','5');
|
||||
|
||||
//Name der aktiven Addons getrennt mit ;
|
||||
//Name der aktiven Addons getrennt mit ;
|
||||
define('ACTIVE_ADDONS','');
|
||||
|
||||
// ***** MOODLE *****
|
||||
@@ -195,4 +195,11 @@ define('TABLE_ID','_id');
|
||||
define('TABLE_BEGIN','tbl_');
|
||||
define('VIEW_BEGIN','vw_');
|
||||
|
||||
//Gibt an, ob das Studienbuchblatt im CIS gedruckt werden kann
|
||||
define('CIS_DOKUMENTE_STUDIENBUCHLBATT_DRUCKEN',false);
|
||||
|
||||
//**** INFOSCREEN ****
|
||||
//Gibt an, ob der Lageplan im Infoterminal angezeigt werden soll.
|
||||
define('CIS_INFOSCREEN_LAGEPLAN_ANZEIGEN',true);
|
||||
|
||||
?>
|
||||
|
||||
@@ -135,4 +135,7 @@ define('PRESTUDENT_ID_DUMMY_STUDENT', 13478);
|
||||
//Legt fest ob die Option für alle Räume im Saalplan Dropdown angezeigt werden soll. (true|false)
|
||||
define('CIS_SAALPLAN_ALLERAEUME_OPTION', false);
|
||||
|
||||
//Legt fest ob Bestätigungsmails über eine Anmelung zu einer Prüfung an eine einzelne Person erfolgt oder an den jeweiligen Lektor. (Leerstring für jeweiligen Lektro);
|
||||
define('CIS_PRUEFUNG_MAIL_EMPFAENGER_ANMEDLUNG',"p.vondrak");
|
||||
|
||||
?>
|
||||
|
||||
+202
-5
@@ -86,6 +86,10 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#endeISO" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-dokumente" label="Dokumente" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#dokumente" />
|
||||
<xul:splitter class="tree-splitter"/>
|
||||
<xul:treecol anonid="treecol-notiz-erledigt" label="Erledigt" flex="2" hidden="false" persist="hidden width ordinal"
|
||||
class="sortDirectionIndicator" type="checkbox"
|
||||
sort="rdf:http://www.technikum-wien.at/notiz/rdf#erledigt_boolean" />
|
||||
@@ -114,6 +118,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<xul:treecell label="rdf:http://www.technikum-wien.at/notiz/rdf#bearbeiter_uid"/>
|
||||
<xul:treecell label="rdf:http://www.technikum-wien.at/notiz/rdf#start"/>
|
||||
<xul:treecell label="rdf:http://www.technikum-wien.at/notiz/rdf#ende"/>
|
||||
<xul:treecell label="rdf:http://www.technikum-wien.at/notiz/rdf#dokumente"/>
|
||||
<xul:treecell label="erledigt" value="rdf:http://www.technikum-wien.at/notiz/rdf#erledigt"/>
|
||||
<xul:treecell label="rdf:http://www.technikum-wien.at/notiz/rdf#notiz_id"/>
|
||||
<xul:treecell label="rdf:http://www.technikum-wien.at/notiz/rdf#startISO"/>
|
||||
@@ -150,6 +155,16 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<xul:label value="Text"/>
|
||||
<xul:box class="WYSIWYG" anonid="textbox-notiz-text" flex="1"/>
|
||||
</xul:row>
|
||||
<xul:row>
|
||||
<xul:spacer flex="1" />
|
||||
<xul:hbox anonid="hbox-notiz-dokumente"></xul:hbox>
|
||||
</xul:row>
|
||||
<xul:row>
|
||||
<xul:spacer flex="1" />
|
||||
<xul:hbox>
|
||||
<xul:button anonid="button-notiz-upload-dokument" oncommand="document.getBindingParent(this).UploadDokument()" label="Dokument hinzufügen" disabled="true" />
|
||||
</xul:hbox>
|
||||
</xul:row>
|
||||
<xul:row>
|
||||
<xul:label value="Gültig von"/>
|
||||
<xul:hbox>
|
||||
@@ -267,6 +282,8 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'menulist-notiz-bearbeiter').disabled=val;
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'checkbox-notiz-erledigt').disabled=val;
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'button-notiz-speichern').disabled=val;
|
||||
if(val)
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'button-notiz-upload-dokument').disabled=val;
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
@@ -292,6 +309,11 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'menulist-notiz-bearbeiter').value='';
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'checkbox-notiz-erledigt').checked=false;
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'label-notiz-updateamum').value='';
|
||||
var notizdoks = document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente');
|
||||
while(notizdoks.hasChildNodes())
|
||||
{
|
||||
notizdoks.removeChild(notizdoks.firstChild);
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
@@ -402,6 +424,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<![CDATA[
|
||||
this.ResetDetails();
|
||||
this.DisableDetails(false);
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'button-notiz-upload-dokument').disabled=true;
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'caption-notiz-detail').label="Neue Notiz";
|
||||
]]>
|
||||
</body>
|
||||
@@ -415,6 +438,15 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
<method name="RefreshNotizBlocking">
|
||||
<body>
|
||||
<![CDATA[
|
||||
//debug('Refresh Notiz');
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
this.TreeNotizDatasource.Refresh(true); //blocking
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
<method name="Loeschen">
|
||||
<body>
|
||||
<![CDATA[
|
||||
@@ -429,7 +461,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
//Abfrage ob wirklich geloescht werden soll
|
||||
if (confirm('Wollen Sie die Notiz mit der ID: '+notiz_id+' wirklich loeschen?'))
|
||||
{
|
||||
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'button-notiz-upload-dokument').disabled=true;
|
||||
var soapBody = new SOAPObject("deleteNotiz");
|
||||
soapBody.appendChild(new SOAPObject("notiz_id")).val(notiz_id);
|
||||
|
||||
@@ -536,10 +568,17 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
<body>
|
||||
<![CDATA[
|
||||
var id = this.value;
|
||||
|
||||
|
||||
if(id!='')
|
||||
{
|
||||
this.DisableDetails(false);
|
||||
var notizdoks = document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente');
|
||||
while(notizdoks.hasChildNodes())
|
||||
{
|
||||
notizdoks.removeChild(notizdoks.firstChild);
|
||||
}
|
||||
|
||||
this.DisableDetails(false);
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'button-notiz-upload-dokument').disabled=false;
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
//Daten holen
|
||||
var url = '<?php echo APP_ROOT ?>rdf/notiz.rdf.php?notiz_id='+id+'&'+gettimestamp();
|
||||
@@ -554,8 +593,7 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
var predicateNS = "http://www.technikum-wien.at/notiz/rdf";
|
||||
|
||||
//RDF parsen
|
||||
|
||||
titel = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#titel" ));
|
||||
titel = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#titel" ));
|
||||
text = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#text" ));
|
||||
start = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#start" ));
|
||||
ende = getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#ende" ));
|
||||
@@ -595,7 +633,48 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
menulist.selectedItem=null;
|
||||
}
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'caption-notiz-detail').label="Bearbeiten";
|
||||
|
||||
// Dokumente auslesen
|
||||
var url = '<?php echo APP_ROOT ?>rdf/dms.rdf.php?notiz_id='+id+'&'+gettimestamp();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
|
||||
getService(Components.interfaces.nsIRDFService);
|
||||
|
||||
dsource = rdfService.GetDataSourceBlocking(url);
|
||||
|
||||
// Alle Elemente aus dem RDF holen
|
||||
var dsResources = dsource.GetAllResources();
|
||||
var thisResource = null;
|
||||
|
||||
// Durchlaufen der Elemente
|
||||
while(dsResources.hasMoreElements())
|
||||
{
|
||||
thisResource = dsResources.getNext().QueryInterface( Components.interfaces.nsIRDFResource);
|
||||
|
||||
var predicateNS = "http://www.technikum-wien.at/dms/rdf";
|
||||
|
||||
//Spalten holen
|
||||
name = getTargetHelper(dsource,thisResource,rdfService.GetResource( predicateNS + "#name" ));
|
||||
dms_id = getTargetHelper(dsource,thisResource,rdfService.GetResource( predicateNS + "#dms_id" ));
|
||||
|
||||
if(dms_id!='')
|
||||
{
|
||||
// Download-Link für Dokument einfügen
|
||||
var dokurl = '<?php echo APP_ROOT ?>content/notizdokdownload.php?id='+dms_id;
|
||||
var dokbtn = document.createElement("button");
|
||||
dokbtn.setAttribute("label", name);
|
||||
dokbtn.setAttribute("onclick", "window.open('"+dokurl+"')");
|
||||
dokbtn.setAttribute("style", "margin-right: -5px;");
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente').appendChild(dokbtn);
|
||||
|
||||
// Link zum Löschen des Dokuments
|
||||
var delbtn = document.createElement("button");
|
||||
delbtn.setAttribute("image", "<?php echo APP_ROOT;?>skin/images/delete_x.png");
|
||||
delbtn.setAttribute("tooltiptext", "Datei "+name+" löschen");
|
||||
delbtn.setAttribute("onclick", "document.getBindingParent(this).LoeschenDokument("+dms_id+",'"+name+"')");
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente').appendChild(delbtn);
|
||||
}
|
||||
}
|
||||
}
|
||||
]]>
|
||||
</body>
|
||||
@@ -806,6 +885,124 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>';
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="UploadDokument">
|
||||
<body>
|
||||
<![CDATA[
|
||||
notiz_id = document.getAnonymousElementByAttribute(this ,'anonid', 'textbox-notiz-notiz_id').value;
|
||||
|
||||
if(notiz_id != '')
|
||||
{
|
||||
NotizDokumentUploadScope = this;
|
||||
this.selectID=notiz_id;
|
||||
var new_window = window.open("<?php echo APP_ROOT; ?>content/notizdokupload.php?notiz_id="+notiz_id ,"","chrome, status=no, width=800, height=350, centerscreen, resizable");
|
||||
}
|
||||
else
|
||||
alert("keine Notiz ausgewählt");
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<method name="LoeschenDokument">
|
||||
<parameter name="dms_id"/>
|
||||
<parameter name="dateiname"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
|
||||
//Abfrage ob wirklich geloescht werden soll
|
||||
if (confirm('Wollen Sie die Datei '+dateiname+' wirklich loeschen?'))
|
||||
{
|
||||
var soapBody = new SOAPObject("deleteDokument");
|
||||
soapBody.appendChild(new SOAPObject("dms_id")).val(dms_id);
|
||||
|
||||
var sr = new SOAPRequest("deleteDokument",soapBody);
|
||||
|
||||
SOAPClient.Proxy="<?php echo APP_ROOT;?>soap/notiz.soap.php?"+gettimestamp();
|
||||
SOAPClient.AjaxAsync=false;
|
||||
|
||||
function mycallb(obj) {
|
||||
var me=obj;
|
||||
this.invoke=function (respObj) {
|
||||
try
|
||||
{
|
||||
var result = respObj.Body[0].deleteDokumentResponse[0].message[0].Text;
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
try
|
||||
{
|
||||
var fehler = respObj.Body[0].Fault[0].faultstring[0].Text;
|
||||
}
|
||||
catch(e)
|
||||
{
|
||||
var fehler = e;
|
||||
}
|
||||
alert('Fehler: '+fehler);
|
||||
return;
|
||||
}
|
||||
me.RefreshNotiz();
|
||||
}
|
||||
}
|
||||
|
||||
var cb=new mycallb(this);
|
||||
|
||||
SOAPClient.SendRequest(sr, cb.invoke);
|
||||
|
||||
// Alle Download-Buttons der Dokumente entfernen
|
||||
var notizdoks = document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente');
|
||||
while(notizdoks.hasChildNodes())
|
||||
{
|
||||
notizdoks.removeChild(notizdoks.firstChild);
|
||||
}
|
||||
|
||||
// Dokumente auslesen
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var id = document.getAnonymousElementByAttribute(this ,'anonid', 'textbox-notiz-notiz_id').value;
|
||||
var url = '<?php echo APP_ROOT ?>rdf/dms.rdf.php?notiz_id='+id+'&'+gettimestamp();
|
||||
|
||||
var rdfService = Components.classes["@mozilla.org/rdf/rdf-service;1"].
|
||||
getService(Components.interfaces.nsIRDFService);
|
||||
|
||||
dsource = rdfService.GetDataSourceBlocking(url);
|
||||
|
||||
// Alle Elemente aus dem RDF holen
|
||||
var dsResources = dsource.GetAllResources();
|
||||
var thisResource = null;
|
||||
|
||||
// Durchlaufen der Elemente
|
||||
while(dsResources.hasMoreElements())
|
||||
{
|
||||
thisResource = dsResources.getNext().QueryInterface( Components.interfaces.nsIRDFResource);
|
||||
|
||||
var predicateNS = "http://www.technikum-wien.at/dms/rdf";
|
||||
|
||||
//Spalten holen
|
||||
name = getTargetHelper(dsource,thisResource,rdfService.GetResource( predicateNS + "#name" ));
|
||||
dms_id = getTargetHelper(dsource,thisResource,rdfService.GetResource( predicateNS + "#dms_id" ));
|
||||
|
||||
if(dms_id!='')
|
||||
{
|
||||
// Download-Link für Dokument einfügen
|
||||
var dokurl = '<?php echo APP_ROOT ?>content/notizdokdownload.php?id='+dms_id;
|
||||
var dokbtn = document.createElement("button");
|
||||
dokbtn.setAttribute("label", name);
|
||||
dokbtn.setAttribute("onclick", "window.open('"+dokurl+"')");
|
||||
dokbtn.setAttribute("style", "margin-right: -5px;");
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente').appendChild(dokbtn);
|
||||
|
||||
// Link zum Löschen des Dokuments
|
||||
var delbtn = document.createElement("button");
|
||||
delbtn.setAttribute("image", "<?php echo APP_ROOT;?>skin/images/delete_x.png");
|
||||
delbtn.setAttribute("tooltiptext", "Datei "+name+" löschen");
|
||||
delbtn.setAttribute("onclick", "document.getBindingParent(this).LoeschenDokument("+dms_id+",'"+name+"')");
|
||||
document.getAnonymousElementByAttribute(this ,'anonid', 'hbox-notiz-dokumente').appendChild(delbtn);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
]]>
|
||||
</body>
|
||||
</method>
|
||||
|
||||
<constructor>
|
||||
//debug('load notiz:'+this.getAttribute('id'));
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 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: Nikolaus Krondraf <nikolaus.krondraf@technikum-wien.at>
|
||||
*/
|
||||
/**
|
||||
* Die Dokumente werden entweder base64 kodiert in der Datenbank in der Spalte inhalt gespeichert
|
||||
* oder im Filesystem, in diesem Fall ist die Akte mit einer DMS ID verknuepft in welcher der Dateiname steht.
|
||||
*/
|
||||
require_once('../config/vilesci.config.inc.php');
|
||||
require_once('../include/dms.class.php');
|
||||
require_once('../include/benutzerberechtigung.class.php');
|
||||
require_once('../include/functions.inc.php');
|
||||
|
||||
$user = get_uid();
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
if(!$rechte->isBerechtigt('admin') && !$rechte->isBerechtigt('assistenz') && !$rechte->isBerechtigt('mitarbeiter'))
|
||||
die('Keine Berechtigung');
|
||||
|
||||
if(isset($_GET['id']) && is_numeric($_GET['id']))
|
||||
{
|
||||
$dms = new dms();
|
||||
if(!$dms->load($_GET['id']))
|
||||
die('Kein Dokument vorhanden');
|
||||
|
||||
$filename=DMS_PATH.$dms->filename;
|
||||
|
||||
if(!isset($_GET['notimeupdate']))
|
||||
$dms->touch($dms->dms_id, $dms->version);
|
||||
|
||||
if(file_exists($filename))
|
||||
{
|
||||
if($handle = fopen($filename,"r"))
|
||||
{
|
||||
if($dms->mimetype=='')
|
||||
$dms->mimetype='application/octetstream';
|
||||
|
||||
header('Content-type: '.$dms->mimetype);
|
||||
header('Content-Disposition: inline; filename="'.$dms->name.'"');
|
||||
header('Content-Length: ' .filesize($filename));
|
||||
|
||||
while (!feof($handle))
|
||||
{
|
||||
echo fread($handle, 8192);
|
||||
}
|
||||
fclose($handle);
|
||||
}
|
||||
else
|
||||
echo 'Fehler: Datei konnte nicht geoeffnet werden';
|
||||
}
|
||||
else
|
||||
echo 'Die Datei existiert nicht';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Ungueltige DMS-ID";
|
||||
}
|
||||
|
||||
?>
|
||||
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
/* Copyright (C) 2015 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: Nikolaus Krondraf <nikolaus.krondraf@technikum-wien.at>
|
||||
*/
|
||||
|
||||
// Oberflaeche zum Upload von Dokumenten zu Notizen aus dem FAS
|
||||
require_once('../config/vilesci.config.inc.php');
|
||||
require_once('../include/functions.inc.php');
|
||||
require_once('../include/benutzerberechtigung.class.php');
|
||||
require_once('../include/dms.class.php');
|
||||
require_once('../include/notiz.class.php');
|
||||
|
||||
header("Content-Type: text/html; charset=utf-8");
|
||||
|
||||
$PHP_SELF = $_SERVER['PHP_SELF'];
|
||||
echo "<html><body>";
|
||||
|
||||
$user = get_uid();
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
if(!$rechte->isBerechtigt('admin') && !$rechte->isBerechtigt('assistenz') && !$rechte->isBerechtigt('mitarbeiter'))
|
||||
die('Keine Berechtigung');
|
||||
|
||||
$kategorie_kurzbz = 'notiz';
|
||||
$dokument_kurzbz = isset($_REQUEST['dokument_kurzbz'])?$_REQUEST['dokument_kurzbz']:'';
|
||||
|
||||
if(isset($_POST['fileupload']))
|
||||
{
|
||||
$error = false;
|
||||
|
||||
// dms Eintrag anlegen
|
||||
if(isset($_GET['notiz_id']))
|
||||
{
|
||||
$ext = pathinfo($_FILES['file']['name'], PATHINFO_EXTENSION);
|
||||
$filename = uniqid();
|
||||
$filename.=".".$ext;
|
||||
$uploadfile = DMS_PATH.$filename;
|
||||
|
||||
|
||||
if(move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile))
|
||||
{
|
||||
if(!chgrp($uploadfile,'dms'))
|
||||
echo 'CHGRP failed';
|
||||
if(!chmod($uploadfile, 0774))
|
||||
echo 'CHMOD failed';
|
||||
exec('sudo chown wwwrun '.$uploadfile);
|
||||
|
||||
$dms = new dms();
|
||||
$dms->version='0';
|
||||
$dms->kategorie_kurzbz=$kategorie_kurzbz;
|
||||
$dms->insertamum=date('Y-m-d H:i:s');
|
||||
$dms->insertvon = $user;
|
||||
$dms->mimetype=$_FILES['file']['type'];
|
||||
$dms->filename = $filename;
|
||||
$dms->name = $_FILES['file']['name'];
|
||||
$dms->beschreibung = $_POST['anmerkung_intern'];
|
||||
|
||||
if($dms->save(true))
|
||||
{
|
||||
$dms_id=$dms->dms_id;
|
||||
|
||||
$notiz = new notiz($_GET['notiz_id']);
|
||||
if(!$notiz->saveDokument($dms_id))
|
||||
{
|
||||
echo 'Fehler beim Speichern des Dokuments';
|
||||
$error = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<script>window.opener.NotizDokumentUploadScope.RefreshNotizBlocking();window.opener.NotizDokumentUploadScope.selectItem();window.close();</script>';
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Fehler beim Speichern der Daten';
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Fehler beim Hochladen der Datei';
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Es muss eine Notiz ausgewaehlt werden';
|
||||
$error = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_GET['notiz_id']))
|
||||
{
|
||||
echo " <!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN' 'http://www.w3.org/TR/html4/loose.dtd'>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>
|
||||
<link href='../skin/style.css.php' rel='stylesheet' type='text/css'>
|
||||
<link rel='stylesheet' href='../skin/jquery.css' type='text/css'/>
|
||||
</head>
|
||||
<body style='padding:10px;'>
|
||||
<h1>Upload Dokumente</h1>
|
||||
<form method='POST' enctype='multipart/form-data' action='$PHP_SELF?notiz_id=".$_GET['notiz_id']."'>
|
||||
<table>
|
||||
<tr>
|
||||
<td align='right'>Dokument:</td>
|
||||
<td><input type='file' name='file' /></td>
|
||||
</tr>";
|
||||
|
||||
echo " <tr>
|
||||
<td align='right'>Anmerkung:</td><td><textarea name='anmerkung_intern' cols='45' id='anmerkung_intern'></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><input type='hidden' name='fileupload' id='fileupload'></td>
|
||||
<td><input type='submit' name='submitdok' value='Upload'></td>
|
||||
|
||||
</tr></table></form></body></html>";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "Es wurde keine notiz_id angegeben";
|
||||
}
|
||||
?>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -2436,11 +2436,14 @@ if(!$error)
|
||||
//Speichert einen Noteneintrag
|
||||
|
||||
$noten = new zeugnisnote();
|
||||
$lehrveranstaltung_id = filter_input(INPUT_POST, 'lehrveranstaltung_id');
|
||||
$student_uid = filter_input(INPUT_POST, 'student_uid');
|
||||
$studiensemester_kurzbz = filter_input(INPUT_POST, 'studiensemester_kurzbz');
|
||||
|
||||
if(isset($_POST['lehrveranstaltung_id']) && isset($_POST['student_uid']) && isset($_POST['studiensemester_kurzbz']))
|
||||
if(!is_null($lehrveranstaltung_id) && !is_null($student_uid) && !is_null($studiensemester_kurzbz))
|
||||
{
|
||||
//Berechtigung pruefen
|
||||
$qry = "SELECT studiengang_kz FROM lehre.tbl_lehrveranstaltung WHERE lehrveranstaltung_id=".$db->db_add_param($_POST['lehrveranstaltung_id'], FHC_INTEGER);
|
||||
$qry = "SELECT studiengang_kz FROM lehre.tbl_lehrveranstaltung WHERE lehrveranstaltung_id=".$db->db_add_param($lehrveranstaltung_id, FHC_INTEGER);
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
if($row = $db->db_fetch_object($result))
|
||||
@@ -2461,7 +2464,7 @@ if(!$error)
|
||||
$errormsg = 'Fehler beim Ermitteln der LVA';
|
||||
}
|
||||
|
||||
$qry = "SELECT studiengang_kz FROM public.tbl_student WHERE student_uid=".$db->db_add_param($_POST['student_uid']);
|
||||
$qry = "SELECT studiengang_kz FROM public.tbl_student WHERE student_uid=".$db->db_add_param($student_uid);
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
if($row = $db->db_fetch_object($result))
|
||||
@@ -2494,11 +2497,28 @@ if(!$error)
|
||||
else
|
||||
{
|
||||
|
||||
if($noten->load($_POST['lehrveranstaltung_id'], $_POST['student_uid'], $_POST['studiensemester_kurzbz']))
|
||||
if($noten->load($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz))
|
||||
{
|
||||
$noten->new = false;
|
||||
$noten->updateamum = date('Y-m-d H:i:s');
|
||||
$noten->updatevon = $user;
|
||||
$log = new log();
|
||||
$log->executetime = date('Y-m-d H:i:s');
|
||||
$log->mitarbeiter_uid = $user;
|
||||
$log->beschreibung = "Ändern der Note ".$noten->note." bei ".$noten->student_uid;
|
||||
$log->sql = 'UPDATE lehre.tbl_zeugnisnote SET '.
|
||||
'note='.$db->db_add_param($noten->note).', '.
|
||||
'punkte='.$db->db_add_param($noten->punkte).','.
|
||||
'uebernahmedatum='.$db->db_add_param($noten->uebernahmedatum).', '.
|
||||
'benotungsdatum='.$db->db_add_param($noten->benotungsdatum).', '.
|
||||
'bemerkung='.$db->db_add_param($noten->bemerkung).', '.
|
||||
'updateamum= '.$db->db_add_param($noten->updateamum).', '.
|
||||
'updatevon='.$db->db_add_param($noten->updatevon).' '.
|
||||
'WHERE lehrveranstaltung_id='.$db->db_add_param($noten->lehrveranstaltung_id, FHC_INTEGER).' '.
|
||||
'AND student_uid='.$db->db_add_param($noten->student_uid).' '.
|
||||
'AND studiensemester_kurzbz='.$db->db_add_param($noten->studiensemester_kurzbz).';';
|
||||
$log->sqlundo = $noten->getUndo('update');
|
||||
$log->save(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2789,11 +2809,14 @@ if(!$error)
|
||||
//Loescht einen Noteneintrag
|
||||
|
||||
$noten = new zeugnisnote();
|
||||
$lehrveranstaltung_id = filter_input(INPUT_POST, 'lehrveranstaltung_id');
|
||||
$student_uid = filter_input(INPUT_POST, 'student_uid');
|
||||
$studiensemester_kurzbz = filter_input(INPUT_POST, 'studiensemester_kurzbz');
|
||||
|
||||
if(isset($_POST['lehrveranstaltung_id']) && isset($_POST['student_uid']) && isset($_POST['studiensemester_kurzbz']))
|
||||
if(!is_null($lehrveranstaltung_id) && !is_null($student_uid) && !is_null($studiensemester_kurzbz))
|
||||
{
|
||||
//Berechtigung pruefen
|
||||
$qry = "SELECT studiengang_kz FROM lehre.tbl_lehrveranstaltung WHERE lehrveranstaltung_id=".$db->db_add_param($_POST['lehrveranstaltung_id'], FHC_INTEGER);
|
||||
$qry = "SELECT studiengang_kz FROM lehre.tbl_lehrveranstaltung WHERE lehrveranstaltung_id=".$db->db_add_param($lehrveranstaltung_id, FHC_INTEGER);
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
if($row = $db->db_fetch_object($result))
|
||||
@@ -2814,7 +2837,7 @@ if(!$error)
|
||||
$errormsg = 'Fehler beim Ermitteln der LVA';
|
||||
}
|
||||
|
||||
$qry = "SELECT studiengang_kz FROM public.tbl_student WHERE student_uid=".$db->db_add_param($_POST['student_uid']);
|
||||
$qry = "SELECT studiengang_kz FROM public.tbl_student WHERE student_uid=".$db->db_add_param($student_uid);
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
if($row = $db->db_fetch_object($result))
|
||||
@@ -2846,9 +2869,19 @@ if(!$error)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if($noten->delete($_POST['lehrveranstaltung_id'], $_POST['student_uid'], $_POST['studiensemester_kurzbz']))
|
||||
$noten->load($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz);
|
||||
if($noten->delete($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz))
|
||||
{
|
||||
$log = new log();
|
||||
$log->executetime = date('Y-m-d H:i:s');
|
||||
$log->mitarbeiter_uid = $user;
|
||||
$log->beschreibung = "Löschen der Note ".$noten->note." bei ".$noten->student_uid;
|
||||
$log->sql = "DELETE FROM lehre.tbl_zeugnisnote WHERE
|
||||
lehrveranstaltung_id=".$db->db_add_param($lehrveranstaltung_id, FHC_INTEGER, false)." AND
|
||||
student_uid=".$db->db_add_param($student_uid)." AND
|
||||
studiensemester_kurzbz=".$db->db_add_param($studiensemester_kurzbz).";";
|
||||
$log->sqlundo = $noten->getUndo('insert');
|
||||
$log->save(true);
|
||||
$return = true;
|
||||
}
|
||||
else
|
||||
|
||||
+83
-4
@@ -220,6 +220,9 @@ class dms extends basis_db
|
||||
*/
|
||||
public function deleteVersion($dms_id, $version)
|
||||
{
|
||||
$dms = new dms();
|
||||
$dms->load($dms_id, $version);
|
||||
|
||||
$qry ="DELETE FROM campus.tbl_dms_version WHERE dms_id = ".$this->db_add_param($dms_id, FHC_INTEGER)." and version =".$this->db_add_param($version, FHC_INTEGER).';';
|
||||
|
||||
if($this->db_query($qry))
|
||||
@@ -227,13 +230,20 @@ class dms extends basis_db
|
||||
$qry_anzahl ="SELECT 1 FROM campus.tbl_dms_version WHERE dms_id =".$this->db_add_param($dms_id, FHC_INTEGER).';';
|
||||
if($result = $this->db_query($qry_anzahl))
|
||||
{
|
||||
// Wenn letzte Version gelöscht wurde -> lösche gesamten Eintrag
|
||||
// File der Version im Filesystem löschen
|
||||
if(is_file(DMS_PATH.$dms->filename) && !unlink(DMS_PATH.$dms->filename))
|
||||
{
|
||||
$this->errormsg = "Fehler beim Löschen des Dokuments aufgetreten";
|
||||
return false;
|
||||
}
|
||||
|
||||
// Wenn letzte Version gelöscht wurde -> lösche gesamten Eintrag
|
||||
if($this->db_num_rows($result) == 0 )
|
||||
{
|
||||
if(!$this->deleteDms($dms_id))
|
||||
{
|
||||
$this->errormsg = "Fehler beim Löschen aufgetreten";
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return true;
|
||||
@@ -254,6 +264,10 @@ class dms extends basis_db
|
||||
*/
|
||||
public function deleteDms($dms_id)
|
||||
{
|
||||
$this->load($dms_id);
|
||||
$this->getAllVersions($dms_id);
|
||||
$error = false;
|
||||
|
||||
// lösche Versionen
|
||||
$qry ="BEGIN;DELETE FROM campus.tbl_dms_version WHERE dms_id =".$this->db_add_param($dms_id, FHC_INTEGER)."; ";
|
||||
$qry.="DELETE FROM fue.tbl_projekt_dokument WHERE dms_id=".$this->db_add_param($dms_id, FHC_INTEGER)."; ";
|
||||
@@ -261,12 +275,28 @@ class dms extends basis_db
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
$this->db_query('COMMIT;');
|
||||
return true;
|
||||
|
||||
// Alle Versionen der Datei im Filesystem löschen
|
||||
foreach($this->result as $obj)
|
||||
{
|
||||
if(is_file(DMS_PATH.$obj->filename) && !unlink(DMS_PATH.$obj->filename))
|
||||
$error = true;
|
||||
}
|
||||
|
||||
if($error)
|
||||
{
|
||||
$this->errormsg = "Fehler beim Löschen des Dokuments aufgetreten";
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->db_query('ROLLBACK;');
|
||||
$this->errormsg = "Fehler beim Löschen des Eintrages aufgetreten";
|
||||
$this->errormsg = "Fehler beim Löschen des Eintrages aufgetreten";
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -841,6 +871,55 @@ class dms extends basis_db
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gibt die Dokumente einer Notiz zurück
|
||||
* @param int $notiz_id
|
||||
* @return boolean
|
||||
*/
|
||||
public function getDokumenteNotiz($notiz_id)
|
||||
{
|
||||
$qry = "SELECT *
|
||||
FROM
|
||||
campus.tbl_dms
|
||||
JOIN campus.tbl_dms_version USING(dms_id)
|
||||
JOIN public.tbl_notiz_dokument USING(dms_id)
|
||||
WHERE (dms_id, version) in(
|
||||
SELECT dms_id, max(version)
|
||||
FROM campus.tbl_dms_version
|
||||
GROUP BY dms_id)
|
||||
AND tbl_notiz_dokument.notiz_id=".$this->db_add_param($notiz_id)."
|
||||
ORDER BY name;";
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$obj = new dms();
|
||||
|
||||
$obj->dms_id = $row->dms_id;
|
||||
$obj->version = $row->version;
|
||||
$obj->oe_kurzbz = $row->oe_kurzbz;
|
||||
$obj->dokument_kurzbz = $row->dokument_kurzbz;
|
||||
$obj->kategorie_kurzbz = $row->kategorie_kurzbz;
|
||||
$obj->filename = $row->filename;
|
||||
$obj->mimetype = $row->mimetype;
|
||||
$obj->name = $row->name;
|
||||
$obj->beschreibung = $row->beschreibung;
|
||||
$obj->letzterzugriff = $row->letzterzugriff;
|
||||
$obj->insertamum = $row->insertamum;
|
||||
$obj->insertvon = $row->insertvon;
|
||||
$obj->updateamum = $row->updateamum;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt die Dokumente einer Projektphase
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
*/
|
||||
//Singleton SOAP Client
|
||||
var SOAPClient = {
|
||||
AjaxAsync: true,
|
||||
Proxy: "",
|
||||
SOAPServer: "",
|
||||
ContentType: "text/xml",
|
||||
@@ -44,7 +45,8 @@ var SOAPClient = {
|
||||
}
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
async: SOAPClient.AjaxAsync,
|
||||
type: "POST",
|
||||
url: SOAPClient.Proxy,
|
||||
dataType: "xml",
|
||||
processData: false,
|
||||
|
||||
@@ -2088,8 +2088,7 @@ class lehrveranstaltung extends basis_db
|
||||
$qry.=" AND tbl_studienplan_lehrveranstaltung.semester=" . $this->db_add_param($semester, FHC_INTEGER);
|
||||
}
|
||||
$qry.=" ORDER BY bezeichnung;";
|
||||
//TODO
|
||||
$this->errormsg = $qry;
|
||||
|
||||
$this->lehrveranstaltungen = array();
|
||||
if ($result = $this->db_query($qry))
|
||||
{
|
||||
|
||||
+520
-458
@@ -1,458 +1,520 @@
|
||||
<?php
|
||||
/* Copyright (C) 2011 FH 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: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
|
||||
class notiz extends basis_db
|
||||
{
|
||||
public $new;
|
||||
public $result=array();
|
||||
|
||||
//Tabellenspalten
|
||||
public $notiz_id;
|
||||
public $titel;
|
||||
public $text;
|
||||
public $verfasser_uid;
|
||||
public $bearbeiter_uid;
|
||||
public $start;
|
||||
public $ende;
|
||||
public $erledigt;
|
||||
public $insertamum;
|
||||
public $insertvon;
|
||||
public $updateamum;
|
||||
public $updatevon;
|
||||
|
||||
public $projekt_kurzbz;
|
||||
public $projektphase_id;
|
||||
public $projekttask_id;
|
||||
public $uid;
|
||||
public $person_id;
|
||||
public $prestudent_id;
|
||||
public $bestellung_id;
|
||||
public $lehreinheit_id;
|
||||
public $anrechnung_id;
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
* @param $notiz_id
|
||||
*/
|
||||
public function __construct($notiz_id = null)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
if($notiz_id != null)
|
||||
$this->load($notiz_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt eine Notiz
|
||||
* @param $notiz_id
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function load($notiz_id)
|
||||
{
|
||||
if(!is_numeric($notiz_id))
|
||||
{
|
||||
$this->errormsg = 'NotizID ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "SELECT * FROM public.tbl_notiz WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER);
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->notiz_id=$row->notiz_id;
|
||||
$this->titel=$row->titel;
|
||||
$this->text=$row->text;
|
||||
$this->verfasser_uid=$row->verfasser_uid;
|
||||
$this->bearbeiter_uid=$row->bearbeiter_uid;
|
||||
$this->start=$row->start;
|
||||
$this->ende=$row->ende;
|
||||
$this->erledigt=$this->db_parse_bool($row->erledigt);
|
||||
$this->insertamum=$row->insertamum;
|
||||
$this->insertvon=$row->insertvon;
|
||||
$this->updateamum=$row->updateamum;
|
||||
$this->updatevon=$row->updatevon;
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Datensatz wurde nicht gefunden';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Löscht eine Notiz
|
||||
* @param $notiz_id
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function delete($notiz_id)
|
||||
{
|
||||
if(!is_numeric($notiz_id))
|
||||
{
|
||||
$this->errormsg = 'NotizID ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "Delete FROM public.tbl_notiz WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER);
|
||||
|
||||
if(!$this->db_query($qry))
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Loeschen der Daten';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prueft die Daten vor dem Speichern
|
||||
* auf Gueltigkeit
|
||||
*/
|
||||
public function validate()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Speichert den aktuellen Datensatz in die Datenbank
|
||||
* Wenn $neu auf true gesetzt ist wird ein neuer Datensatz angelegt
|
||||
* andernfalls wird der Datensatz mit der ID in $notiz_id aktualisiert
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function save($new=null)
|
||||
{
|
||||
if($new==null)
|
||||
$new=$this->new;
|
||||
|
||||
if(!$this->validate())
|
||||
return false;
|
||||
|
||||
if($new)
|
||||
{
|
||||
//Neuen Datensatz einfuegen
|
||||
$qry='BEGIN;INSERT INTO public.tbl_notiz (titel, text, verfasser_uid,
|
||||
bearbeiter_uid, start, ende, erledigt, insertamum, insertvon,
|
||||
updateamum, updatevon) VALUES('.
|
||||
$this->db_add_param($this->titel).', '.
|
||||
$this->db_add_param($this->text).', '.
|
||||
$this->db_add_param($this->verfasser_uid).','.
|
||||
$this->db_add_param($this->bearbeiter_uid).','.
|
||||
$this->db_add_param($this->start).','.
|
||||
$this->db_add_param($this->ende).','.
|
||||
$this->db_add_param($this->erledigt,FHC_BOOLEAN).','.
|
||||
$this->db_add_param($this->insertamum).','.
|
||||
$this->db_add_param($this->insertvon).','.
|
||||
$this->db_add_param($this->updateamum).','.
|
||||
$this->db_add_param($this->updatevon).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry='UPDATE public.tbl_notiz SET '.
|
||||
'titel='.$this->db_add_param($this->titel).', '.
|
||||
'text='.$this->db_add_param($this->text).', '.
|
||||
'verfasser_uid='.$this->db_add_param($this->verfasser_uid).', '.
|
||||
'bearbeiter_uid='.$this->db_add_param($this->bearbeiter_uid).', '.
|
||||
'start='.$this->db_add_param($this->start).', '.
|
||||
'ende='.$this->db_add_param($this->ende).', '.
|
||||
'erledigt='.$this->db_add_param($this->erledigt,FHC_BOOLEAN).', '.
|
||||
'updateamum='.$this->db_add_param($this->updateamum).', '.
|
||||
'updatevon='.$this->db_add_param($this->updatevon).' '.
|
||||
'WHERE notiz_id='.$this->db_add_param($this->notiz_id,FHC_INTEGER).';';
|
||||
}
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($new)
|
||||
{
|
||||
$qry="SELECT currval('seq_notiz_notiz_id') as id;";
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$this->notiz_id = $row->id;
|
||||
$this->db_query('COMMIT;');
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Lesen der Sequence';
|
||||
$this->db_query('ROLLBACK');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Lesen der Sequence';
|
||||
$this->db_query('ROLLBACK');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Speichern des Datensatzes';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Speichert die Zuordnung einer Notiz
|
||||
*
|
||||
*/
|
||||
public function saveZuordnung()
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_notizzuordnung(notiz_id, projekt_kurzbz, projektphase_id, projekttask_id,
|
||||
uid, person_id, prestudent_id, bestellung_id, lehreinheit_id, anrechnung_id) VALUES(".
|
||||
$this->db_add_param($this->notiz_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->projekt_kurzbz).','.
|
||||
$this->db_add_param($this->projektphase_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->projekttask_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->uid).','.
|
||||
$this->db_add_param($this->person_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->prestudent_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->bestellung_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->lehreinheit_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->anrechnung_id, FHC_INTEGER).');';
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Speichern der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Laedt die Notizen
|
||||
* @param $erledigt
|
||||
* @param $projekt_kurzbz
|
||||
* @param $projektphase_id
|
||||
* @param $projekttask_id
|
||||
* @param $uid
|
||||
* @param $person_id
|
||||
* @param $prestudent_id
|
||||
* @param $bestellung_id
|
||||
* @param $user
|
||||
* @param $lehreinheit_id
|
||||
* @param $anrechnung_id
|
||||
* @return boolean
|
||||
*/
|
||||
public function getNotiz($erledigt=null, $projekt_kurzbz=null, $projektphase_id=null, $projekttask_id=null, $uid=null, $person_id=null, $prestudent_id=null, $bestellung_id=null, $user=null, $lehreinheit_id=null, $stundenplandev_id=null, $anrechnung_id=null)
|
||||
{
|
||||
$qry = "SELECT
|
||||
*
|
||||
FROM
|
||||
public.tbl_notiz
|
||||
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
|
||||
WHERE 1=1";
|
||||
|
||||
if(!is_null($erledigt))
|
||||
{
|
||||
if($erledigt)
|
||||
$qry.=" AND erledigt=true";
|
||||
else
|
||||
$qry.=" AND erledigt=false";
|
||||
}
|
||||
if($projekt_kurzbz!='')
|
||||
$qry.=" AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz);
|
||||
if($projektphase_id!='')
|
||||
$qry.=" AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER);
|
||||
if($projekttask_id!='')
|
||||
$qry.=" AND projekttask_id=".$this->db_add_param($projekttask_id, FHC_INTEGER);
|
||||
if($uid!='')
|
||||
$qry.=" AND uid=".$this->db_add_param($uid);
|
||||
if($person_id!='')
|
||||
$qry.=" AND person_id=".$this->db_add_param($person_id, FHC_INTEGER);
|
||||
if($prestudent_id!='')
|
||||
$qry.=" AND prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER);
|
||||
if($bestellung_id!='')
|
||||
$qry.=" AND bestellung_id=".$this->db_add_param($bestellung_id, FHC_INTEGER);
|
||||
if($user!='')
|
||||
$qry.=" AND (verfasser_uid=".$this->db_add_param($user)." OR bearbeiter_uid=".$this->db_add_param($user).")";
|
||||
if($lehreinheit_id!='')
|
||||
$qry.=" AND lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER);
|
||||
if($anrechnung_id!='')
|
||||
$qry.=" AND anrechnung_id=".$this->db_add_param($anrechnung_id, FHC_INTEGER);
|
||||
|
||||
$qry.=' ORDER BY start, ende, titel';
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$obj = new notiz();
|
||||
|
||||
$obj->notiz_id=$row->notiz_id;
|
||||
$obj->titel=$row->titel;
|
||||
$obj->text=$row->text;
|
||||
$obj->verfasser_uid=$row->verfasser_uid;
|
||||
$obj->bearbeiter_uid=$row->bearbeiter_uid;
|
||||
$obj->start=$row->start;
|
||||
$obj->ende=$row->ende;
|
||||
$obj->erledigt=$this->db_parse_bool($row->erledigt);
|
||||
$obj->insertamum=$row->insertamum;
|
||||
$obj->insertvon=$row->insertvon;
|
||||
$obj->updateamum=$row->updateamum;
|
||||
$obj->updatevon=$row->updatevon;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Laedt die Notizen vom Bewerbungstool
|
||||
* @param $person_id int
|
||||
* @return boolean
|
||||
*/
|
||||
public function getBewerbungstoolNotizen($person_id)
|
||||
{
|
||||
$qry = 'SELECT
|
||||
*
|
||||
FROM
|
||||
public.tbl_notiz
|
||||
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
|
||||
WHERE person_id = ' . $this->db_add_param($person_id, FHC_INTEGER) .
|
||||
' AND insertvon = ' . $this->db_add_param('Bewerbungstool') .
|
||||
' ORDER BY notiz_id';
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$obj = new notiz();
|
||||
|
||||
$obj->notiz_id=$row->notiz_id;
|
||||
$obj->titel=$row->titel;
|
||||
$obj->text=$row->text;
|
||||
$obj->verfasser_uid=$row->verfasser_uid;
|
||||
$obj->bearbeiter_uid=$row->bearbeiter_uid;
|
||||
$obj->start=$row->start;
|
||||
$obj->ende=$row->ende;
|
||||
$obj->erledigt=$this->db_parse_bool($row->erledigt);
|
||||
$obj->insertamum=$row->insertamum;
|
||||
$obj->insertvon=$row->insertvon;
|
||||
$obj->updateamum=$row->updateamum;
|
||||
$obj->updatevon=$row->updatevon;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
*
|
||||
|
||||
* Laedt die Notizen
|
||||
* @param $erledigt
|
||||
* @param $projekt_kurzbz
|
||||
* @param $projektphase_id
|
||||
* @param $projekttask_id
|
||||
* @param $uid
|
||||
* @param $person_id
|
||||
* @param $prestudent_id
|
||||
* @param $bestellung_id
|
||||
* @param $user
|
||||
* @param $lehreinheit_id
|
||||
* @param $anrechnung_id
|
||||
* @return boolean
|
||||
*/
|
||||
public function getAnzahlNotizen($erledigt=null, $projekt_kurzbz=null, $projektphase_id=null, $projekttask_id=null, $uid=null, $person_id=null, $prestudent_id=null, $bestellung_id=null, $user=null, $lehreinheit_id=null, $anrechnung_id=null)
|
||||
{
|
||||
$qry = "SELECT
|
||||
count(*) as anzahl
|
||||
FROM
|
||||
public.tbl_notiz
|
||||
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
|
||||
WHERE 1=1";
|
||||
|
||||
if(!is_null($erledigt))
|
||||
{
|
||||
if($erledigt)
|
||||
$qry.=" AND erledigt=true";
|
||||
else
|
||||
$qry.=" AND erledigt=false";
|
||||
}
|
||||
if($projekt_kurzbz!='')
|
||||
$qry.=" AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz);
|
||||
if($projektphase_id!='')
|
||||
$qry.=" AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER);
|
||||
if($projekttask_id!='')
|
||||
$qry.=" AND projekttask_id=".$this->db_add_param($projekttask_id, FHC_INTEGER);
|
||||
if($uid!='')
|
||||
$qry.=" AND uid=".$this->db_add_param($uid);
|
||||
if($person_id!='')
|
||||
$qry.=" AND person_id=".$this->db_add_param($person_id, FHC_INTEGER);
|
||||
if($prestudent_id!='')
|
||||
$qry.=" AND prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER);
|
||||
if($bestellung_id!='')
|
||||
$qry.=" AND bestellung_id=".$this->db_add_param($bestellung_id, FHC_INTEGER);
|
||||
if($user!='')
|
||||
$qry.=" AND (verfasser_uid=".$this->db_add_param($user)." OR bearbeiter_uid=".$this->db_add_param($user).")";
|
||||
if($lehreinheit_id!='')
|
||||
$qry.=" AND lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER);
|
||||
if($anrechnung_id!='')
|
||||
$qry.=" AND anrechnung_id=".$this->db_add_param($anrechnung_id, FHC_INTEGER);
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object($result))
|
||||
return $row->anzahl;
|
||||
else
|
||||
{
|
||||
$this->errormsg='Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
<?php
|
||||
/* Copyright (C) 2011 FH 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: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
require_once(dirname(__FILE__).'/dms.class.php');
|
||||
|
||||
class notiz extends basis_db
|
||||
{
|
||||
public $new;
|
||||
public $result=array();
|
||||
public $dokumente=array();
|
||||
|
||||
//Tabellenspalten
|
||||
public $notiz_id;
|
||||
public $titel;
|
||||
public $text;
|
||||
public $verfasser_uid;
|
||||
public $bearbeiter_uid;
|
||||
public $start;
|
||||
public $ende;
|
||||
public $erledigt;
|
||||
public $insertamum;
|
||||
public $insertvon;
|
||||
public $updateamum;
|
||||
public $updatevon;
|
||||
|
||||
public $projekt_kurzbz;
|
||||
public $projektphase_id;
|
||||
public $projekttask_id;
|
||||
public $uid;
|
||||
public $person_id;
|
||||
public $prestudent_id;
|
||||
public $bestellung_id;
|
||||
public $lehreinheit_id;
|
||||
public $anrechnung_id;
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
* @param $notiz_id
|
||||
*/
|
||||
public function __construct($notiz_id = null)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
if($notiz_id != null)
|
||||
$this->load($notiz_id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt eine Notiz
|
||||
* @param $notiz_id
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function load($notiz_id)
|
||||
{
|
||||
if(!is_numeric($notiz_id))
|
||||
{
|
||||
$this->errormsg = 'NotizID ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "SELECT * FROM public.tbl_notiz WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER);
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->notiz_id=$row->notiz_id;
|
||||
$this->titel=$row->titel;
|
||||
$this->text=$row->text;
|
||||
$this->verfasser_uid=$row->verfasser_uid;
|
||||
$this->bearbeiter_uid=$row->bearbeiter_uid;
|
||||
$this->start=$row->start;
|
||||
$this->ende=$row->ende;
|
||||
$this->erledigt=$this->db_parse_bool($row->erledigt);
|
||||
$this->insertamum=$row->insertamum;
|
||||
$this->insertvon=$row->insertvon;
|
||||
$this->updateamum=$row->updateamum;
|
||||
$this->updatevon=$row->updatevon;
|
||||
$this->getDokumente($row->notiz_id);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Datensatz wurde nicht gefunden';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Löscht eine Notiz
|
||||
* @param $notiz_id
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function delete($notiz_id)
|
||||
{
|
||||
if(!is_numeric($notiz_id))
|
||||
{
|
||||
$this->errormsg = 'NotizID ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
|
||||
// Dokumente der Notiz löschen
|
||||
$this->getDokumente($notiz_id);
|
||||
if(!empty($this->dokumente))
|
||||
{
|
||||
$dms = new dms();
|
||||
|
||||
foreach($this->dokumente as $dms_id)
|
||||
{
|
||||
$dms->deleteDms($dms_id);
|
||||
}
|
||||
}
|
||||
|
||||
$qry = "Delete FROM public.tbl_notiz WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER);
|
||||
|
||||
if(!$this->db_query($qry))
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Loeschen der Daten';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prueft die Daten vor dem Speichern
|
||||
* auf Gueltigkeit
|
||||
*/
|
||||
public function validate()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Speichert den aktuellen Datensatz in die Datenbank
|
||||
* Wenn $neu auf true gesetzt ist wird ein neuer Datensatz angelegt
|
||||
* andernfalls wird der Datensatz mit der ID in $notiz_id aktualisiert
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function save($new=null)
|
||||
{
|
||||
if($new==null)
|
||||
$new=$this->new;
|
||||
|
||||
if(!$this->validate())
|
||||
return false;
|
||||
|
||||
if($new)
|
||||
{
|
||||
//Neuen Datensatz einfuegen
|
||||
$qry='BEGIN;INSERT INTO public.tbl_notiz (titel, text, verfasser_uid,
|
||||
bearbeiter_uid, start, ende, erledigt, insertamum, insertvon,
|
||||
updateamum, updatevon) VALUES('.
|
||||
$this->db_add_param($this->titel).', '.
|
||||
$this->db_add_param($this->text).', '.
|
||||
$this->db_add_param($this->verfasser_uid).','.
|
||||
$this->db_add_param($this->bearbeiter_uid).','.
|
||||
$this->db_add_param($this->start).','.
|
||||
$this->db_add_param($this->ende).','.
|
||||
$this->db_add_param($this->erledigt,FHC_BOOLEAN).','.
|
||||
$this->db_add_param($this->insertamum).','.
|
||||
$this->db_add_param($this->insertvon).','.
|
||||
$this->db_add_param($this->updateamum).','.
|
||||
$this->db_add_param($this->updatevon).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry='UPDATE public.tbl_notiz SET '.
|
||||
'titel='.$this->db_add_param($this->titel).', '.
|
||||
'text='.$this->db_add_param($this->text).', '.
|
||||
'verfasser_uid='.$this->db_add_param($this->verfasser_uid).', '.
|
||||
'bearbeiter_uid='.$this->db_add_param($this->bearbeiter_uid).', '.
|
||||
'start='.$this->db_add_param($this->start).', '.
|
||||
'ende='.$this->db_add_param($this->ende).', '.
|
||||
'erledigt='.$this->db_add_param($this->erledigt,FHC_BOOLEAN).', '.
|
||||
'updateamum='.$this->db_add_param($this->updateamum).', '.
|
||||
'updatevon='.$this->db_add_param($this->updatevon).' '.
|
||||
'WHERE notiz_id='.$this->db_add_param($this->notiz_id,FHC_INTEGER).';';
|
||||
}
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($new)
|
||||
{
|
||||
$qry="SELECT currval('seq_notiz_notiz_id') as id;";
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$this->notiz_id = $row->id;
|
||||
$this->db_query('COMMIT;');
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Lesen der Sequence';
|
||||
$this->db_query('ROLLBACK');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Lesen der Sequence';
|
||||
$this->db_query('ROLLBACK');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Speichern des Datensatzes';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Speichert die Zuordnung einer Notiz
|
||||
*
|
||||
*/
|
||||
public function saveZuordnung()
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_notizzuordnung(notiz_id, projekt_kurzbz, projektphase_id, projekttask_id,
|
||||
uid, person_id, prestudent_id, bestellung_id, lehreinheit_id, anrechnung_id) VALUES(".
|
||||
$this->db_add_param($this->notiz_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->projekt_kurzbz).','.
|
||||
$this->db_add_param($this->projektphase_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->projekttask_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->uid).','.
|
||||
$this->db_add_param($this->person_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->prestudent_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->bestellung_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->lehreinheit_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->anrechnung_id, FHC_INTEGER).');';
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Speichern der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Speichert ein Dokument zur Notiz
|
||||
* @param int $dms_id
|
||||
* @return boolean
|
||||
*/
|
||||
public function saveDokument($dms_id)
|
||||
{
|
||||
$qry = "INSERT INTO public.tbl_notiz_dokument(notiz_id, dms_id) VALUES(".
|
||||
$this->db_add_param($this->notiz_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($dms_id, FHC_INTEGER).');';
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Speichern der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Laedt die Notizen
|
||||
* @param $erledigt
|
||||
* @param $projekt_kurzbz
|
||||
* @param $projektphase_id
|
||||
* @param $projekttask_id
|
||||
* @param $uid
|
||||
* @param $person_id
|
||||
* @param $prestudent_id
|
||||
* @param $bestellung_id
|
||||
* @param $user
|
||||
* @param $lehreinheit_id
|
||||
* @param $anrechnung_id
|
||||
* @return boolean
|
||||
*/
|
||||
public function getNotiz($erledigt=null, $projekt_kurzbz=null, $projektphase_id=null, $projekttask_id=null, $uid=null, $person_id=null, $prestudent_id=null, $bestellung_id=null, $user=null, $lehreinheit_id=null, $stundenplandev_id=null, $anrechnung_id=null)
|
||||
{
|
||||
$qry = "SELECT
|
||||
*
|
||||
FROM
|
||||
public.tbl_notiz
|
||||
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
|
||||
WHERE 1=1";
|
||||
|
||||
if(!is_null($erledigt))
|
||||
{
|
||||
if($erledigt)
|
||||
$qry.=" AND erledigt=true";
|
||||
else
|
||||
$qry.=" AND erledigt=false";
|
||||
}
|
||||
if($projekt_kurzbz!='')
|
||||
$qry.=" AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz);
|
||||
if($projektphase_id!='')
|
||||
$qry.=" AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER);
|
||||
if($projekttask_id!='')
|
||||
$qry.=" AND projekttask_id=".$this->db_add_param($projekttask_id, FHC_INTEGER);
|
||||
if($uid!='')
|
||||
$qry.=" AND uid=".$this->db_add_param($uid);
|
||||
if($person_id!='')
|
||||
$qry.=" AND person_id=".$this->db_add_param($person_id, FHC_INTEGER);
|
||||
if($prestudent_id!='')
|
||||
$qry.=" AND prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER);
|
||||
if($bestellung_id!='')
|
||||
$qry.=" AND bestellung_id=".$this->db_add_param($bestellung_id, FHC_INTEGER);
|
||||
if($user!='')
|
||||
$qry.=" AND (verfasser_uid=".$this->db_add_param($user)." OR bearbeiter_uid=".$this->db_add_param($user).")";
|
||||
if($lehreinheit_id!='')
|
||||
$qry.=" AND lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER);
|
||||
if($anrechnung_id!='')
|
||||
$qry.=" AND anrechnung_id=".$this->db_add_param($anrechnung_id, FHC_INTEGER);
|
||||
|
||||
$qry.=' ORDER BY start, ende, titel';
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$obj = new notiz();
|
||||
|
||||
$obj->notiz_id=$row->notiz_id;
|
||||
$obj->titel=$row->titel;
|
||||
$obj->text=$row->text;
|
||||
$obj->verfasser_uid=$row->verfasser_uid;
|
||||
$obj->bearbeiter_uid=$row->bearbeiter_uid;
|
||||
$obj->start=$row->start;
|
||||
$obj->ende=$row->ende;
|
||||
$obj->erledigt=$this->db_parse_bool($row->erledigt);
|
||||
$obj->insertamum=$row->insertamum;
|
||||
$obj->insertvon=$row->insertvon;
|
||||
$obj->updateamum=$row->updateamum;
|
||||
$obj->updatevon=$row->updatevon;
|
||||
$obj->getDokumente($row->notiz_id);
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Laedt die Notizen vom Bewerbungstool
|
||||
* @param $person_id int
|
||||
* @return boolean
|
||||
*/
|
||||
public function getBewerbungstoolNotizen($person_id)
|
||||
{
|
||||
$qry = 'SELECT
|
||||
*
|
||||
FROM
|
||||
public.tbl_notiz
|
||||
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
|
||||
WHERE person_id = ' . $this->db_add_param($person_id, FHC_INTEGER) .
|
||||
' AND insertvon = ' . $this->db_add_param('Bewerbungstool') .
|
||||
' ORDER BY notiz_id';
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
{
|
||||
$obj = new notiz();
|
||||
|
||||
$obj->notiz_id=$row->notiz_id;
|
||||
$obj->titel=$row->titel;
|
||||
$obj->text=$row->text;
|
||||
$obj->verfasser_uid=$row->verfasser_uid;
|
||||
$obj->bearbeiter_uid=$row->bearbeiter_uid;
|
||||
$obj->start=$row->start;
|
||||
$obj->ende=$row->ende;
|
||||
$obj->erledigt=$this->db_parse_bool($row->erledigt);
|
||||
$obj->insertamum=$row->insertamum;
|
||||
$obj->insertvon=$row->insertvon;
|
||||
$obj->updateamum=$row->updateamum;
|
||||
$obj->updatevon=$row->updatevon;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
*
|
||||
|
||||
* Laedt die Notizen
|
||||
* @param $erledigt
|
||||
* @param $projekt_kurzbz
|
||||
* @param $projektphase_id
|
||||
* @param $projekttask_id
|
||||
* @param $uid
|
||||
* @param $person_id
|
||||
* @param $prestudent_id
|
||||
* @param $bestellung_id
|
||||
* @param $user
|
||||
* @param $lehreinheit_id
|
||||
* @param $anrechnung_id
|
||||
* @return boolean
|
||||
*/
|
||||
public function getAnzahlNotizen($erledigt=null, $projekt_kurzbz=null, $projektphase_id=null, $projekttask_id=null, $uid=null, $person_id=null, $prestudent_id=null, $bestellung_id=null, $user=null, $lehreinheit_id=null, $anrechnung_id=null)
|
||||
{
|
||||
$qry = "SELECT
|
||||
count(*) as anzahl
|
||||
FROM
|
||||
public.tbl_notiz
|
||||
LEFT JOIN public.tbl_notizzuordnung USING(notiz_id)
|
||||
WHERE 1=1";
|
||||
|
||||
if(!is_null($erledigt))
|
||||
{
|
||||
if($erledigt)
|
||||
$qry.=" AND erledigt=true";
|
||||
else
|
||||
$qry.=" AND erledigt=false";
|
||||
}
|
||||
if($projekt_kurzbz!='')
|
||||
$qry.=" AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz);
|
||||
if($projektphase_id!='')
|
||||
$qry.=" AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER);
|
||||
if($projekttask_id!='')
|
||||
$qry.=" AND projekttask_id=".$this->db_add_param($projekttask_id, FHC_INTEGER);
|
||||
if($uid!='')
|
||||
$qry.=" AND uid=".$this->db_add_param($uid);
|
||||
if($person_id!='')
|
||||
$qry.=" AND person_id=".$this->db_add_param($person_id, FHC_INTEGER);
|
||||
if($prestudent_id!='')
|
||||
$qry.=" AND prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER);
|
||||
if($bestellung_id!='')
|
||||
$qry.=" AND bestellung_id=".$this->db_add_param($bestellung_id, FHC_INTEGER);
|
||||
if($user!='')
|
||||
$qry.=" AND (verfasser_uid=".$this->db_add_param($user)." OR bearbeiter_uid=".$this->db_add_param($user).")";
|
||||
if($lehreinheit_id!='')
|
||||
$qry.=" AND lehreinheit_id=".$this->db_add_param($lehreinheit_id, FHC_INTEGER);
|
||||
if($anrechnung_id!='')
|
||||
$qry.=" AND anrechnung_id=".$this->db_add_param($anrechnung_id, FHC_INTEGER);
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object($result))
|
||||
return $row->anzahl;
|
||||
else
|
||||
{
|
||||
$this->errormsg='Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt die Dokumente der Notiz
|
||||
* @return boolean
|
||||
*/
|
||||
public function getDokumente($notiz_id)
|
||||
{
|
||||
$qry = "SELECT dms_id FROM public.tbl_notiz_dokument WHERE notiz_id=".$this->db_add_param($notiz_id, FHC_INTEGER);
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->dokumente[] = $row->dms_id;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -848,5 +848,24 @@ class person extends basis_db
|
||||
|
||||
}
|
||||
|
||||
public function getFullName($allFirstnames=FALSE)
|
||||
{
|
||||
$fullname = "";
|
||||
if((!is_null($this->titelpre)) && ($this->titelpre!=""))
|
||||
$fullname .= $this->titelpre." ";
|
||||
|
||||
$fullname .= $this->vorname." ";
|
||||
|
||||
if(($allFirstnames) && ($this->vornamen != "") && (!is_null($this->vornamen)))
|
||||
$fullname .= $this->vornamen." ";
|
||||
|
||||
$fullname .= $this->nachname;
|
||||
|
||||
if((!is_null($this->titelpost)) && ($this->titelpost!=""))
|
||||
$fullname .= " ".$this->titelpost;
|
||||
|
||||
return $fullname;
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
+718
-718
File diff suppressed because it is too large
Load Diff
@@ -260,7 +260,7 @@ class studiengang extends basis_db
|
||||
. 'USING (studienordnung_id) '
|
||||
. 'WHERE aktiv '
|
||||
. 'AND studiengang_kz = ' . $this->db_add_param($studiengang_kz, FHC_INTEGER)
|
||||
. ' AND orgform_kurzbz NOT IN (' . $this->db_add_param('DDP') . ', ' . $this->db_add_param('DL') . ')';
|
||||
. ' AND orgform_kurzbz!='. $this->db_add_param('DDP');
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
|
||||
+790
-789
File diff suppressed because it is too large
Load Diff
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
echo '
|
||||
<table class="tabcontent">
|
||||
<table class="tabcontent" id="lvmenue">
|
||||
<tr>';
|
||||
|
||||
$eintraegeprozeile=0;
|
||||
@@ -86,8 +86,8 @@ function checkZeilenUmbruch()
|
||||
$dir_name=$DOC_ROOT.'/documents';
|
||||
if(!is_dir($dir_name))
|
||||
{
|
||||
exec('mkdir -m 755 "'.$dir_name.'"');
|
||||
exec('sudo chown www-data:teacher "'.$dir_name.'"');
|
||||
exec('mkdir -m 755 '.escapeshellarg($dir_name));
|
||||
exec('sudo chown www-data:teacher '.escapeshellarg($dir_name));
|
||||
}
|
||||
$angemeldet = true;
|
||||
if(defined('CIS_LEHRVERANSTALTUNG_WENNANGEMELDET_DETAILS_ANZEIGEN') && CIS_LEHRVERANSTALTUNG_WENNANGEMELDET_DETAILS_ANZEIGEN && !$is_lector)
|
||||
@@ -123,23 +123,23 @@ function checkZeilenUmbruch()
|
||||
{
|
||||
if(!@is_dir(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz)))
|
||||
{
|
||||
exec('mkdir -m 755 "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'"');
|
||||
exec('sudo chown www-data:teacher "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'"');
|
||||
exec('mkdir -m 755 '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz)));
|
||||
exec('sudo chown www-data:teacher '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz)));
|
||||
}
|
||||
if(!@is_dir(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester))
|
||||
{
|
||||
exec('mkdir -m 755 "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'"');
|
||||
exec('sudo chown www-data:teacher "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'"');
|
||||
exec('mkdir -m 755 '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester));
|
||||
exec('sudo chown www-data:teacher '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester));
|
||||
}
|
||||
if(!@is_dir(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name)))
|
||||
{
|
||||
exec('mkdir -m 755 "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'"');
|
||||
exec('sudo chown www-data:teacher "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'"');
|
||||
exec('mkdir -m 755 '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name)));
|
||||
exec('sudo chown www-data:teacher '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name)));
|
||||
}
|
||||
if(!@is_dir(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/semesterplan'))
|
||||
{
|
||||
exec('mkdir -m 775 "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/semesterplan"');
|
||||
exec('sudo chown www-data:teacher "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/semesterplan"');
|
||||
exec('mkdir -m 775 '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/semesterplan'));
|
||||
exec('sudo chown www-data:teacher '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/semesterplan'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -206,23 +206,23 @@ function checkZeilenUmbruch()
|
||||
{
|
||||
if(!@is_dir(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz)))
|
||||
{
|
||||
exec('mkdir -m 755 "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'"');
|
||||
exec('sudo chown www-data:teacher "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'"');
|
||||
exec('mkdir -m 755 '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz)));
|
||||
exec('sudo chown www-data:teacher '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz)));
|
||||
}
|
||||
if(!@is_dir(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester))
|
||||
{
|
||||
exec('mkdir -m 755 "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'"');
|
||||
exec('sudo chown www-data:teacher "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'"');
|
||||
exec('mkdir -m 755 '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester));
|
||||
exec('sudo chown www-data:teacher '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester));
|
||||
}
|
||||
if(!@is_dir(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name)))
|
||||
{
|
||||
exec('mkdir -m 755 "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'"');
|
||||
exec('sudo chown www-data:teacher "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'"');
|
||||
exec('mkdir -m 755 '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name)));
|
||||
exec('sudo chown www-data:teacher '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name)));
|
||||
}
|
||||
if(!@is_dir(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/download'))
|
||||
{
|
||||
exec('mkdir -m 775 "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/download"');
|
||||
exec('sudo chown www-data:teacher "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/download"');
|
||||
exec('mkdir -m 775 '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/download'));
|
||||
exec('sudo chown www-data:teacher '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/download'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -294,23 +294,23 @@ function checkZeilenUmbruch()
|
||||
{
|
||||
if(!@is_dir(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz)))
|
||||
{
|
||||
exec('mkdir -m 755 "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'"');
|
||||
exec('sudo chown www-data:teacher "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'"');
|
||||
exec('mkdir -m 755 '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz)));
|
||||
exec('sudo chown www-data:teacher '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz)));
|
||||
}
|
||||
if(!@is_dir(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester))
|
||||
{
|
||||
exec('mkdir -m 755 "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'"');
|
||||
exec('sudo chown www-data:teacher "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'"');
|
||||
exec('mkdir -m 755 '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester));
|
||||
exec('sudo chown www-data:teacher '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester));
|
||||
}
|
||||
if(!@is_dir(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name)))
|
||||
{
|
||||
exec('mkdir -m 755 "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'"');
|
||||
exec('sudo chown www-data:teacher "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'"');
|
||||
exec('mkdir -m 755 '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name)));
|
||||
exec('sudo chown www-data:teacher '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name)));
|
||||
}
|
||||
if(!@is_dir(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/leistung'))
|
||||
{
|
||||
exec('mkdir -m 775 "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/leistung"');
|
||||
exec('sudo chown www-data:teacher "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/leistung"');
|
||||
exec('mkdir -m 775 '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/leistung'));
|
||||
exec('sudo chown www-data:teacher '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/leistung'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -453,7 +453,7 @@ function checkZeilenUmbruch()
|
||||
//Moodle
|
||||
$showmoodle=false;
|
||||
//Schauen ob Moodle fuer diesen Studiengang freigeschaltet ist
|
||||
$qry = "SELECT moodle FROM public.tbl_studiengang JOIN lehre.tbl_lehrveranstaltung USING(studiengang_kz) WHERE lehrveranstaltung_id='".addslashes($lvid)."'";
|
||||
$qry = "SELECT moodle FROM public.tbl_studiengang JOIN lehre.tbl_lehrveranstaltung USING(studiengang_kz) WHERE lehrveranstaltung_id=".$db->db_add_param($lvid, FHC_INTEGER);
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
if($row = $db->db_fetch_object($result))
|
||||
@@ -572,23 +572,23 @@ function checkZeilenUmbruch()
|
||||
{
|
||||
if(!@is_dir(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz)))
|
||||
{
|
||||
exec('mkdir -m 755 "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'"');
|
||||
exec('sudo chown www-data:teacher "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'"');
|
||||
exec('mkdir -m 755 '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz)));
|
||||
exec('sudo chown www-data:teacher '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz)));
|
||||
}
|
||||
if(!@is_dir(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester))
|
||||
{
|
||||
exec('mkdir -m 755 "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'"');
|
||||
exec('sudo chown www-data:teacher "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'"');
|
||||
exec('mkdir -m 755 '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester));
|
||||
exec('sudo chown www-data:teacher '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester));
|
||||
}
|
||||
if(!@is_dir(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name)))
|
||||
{
|
||||
exec('mkdir -m 755 "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'"');
|
||||
exec('sudo chown www-data:teacher "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'"');
|
||||
exec('mkdir -m 755 '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name)));
|
||||
exec('sudo chown www-data:teacher '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name)));
|
||||
}
|
||||
if(!@is_dir(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/upload'))
|
||||
{
|
||||
exec('mkdir -m 775 "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/upload"');
|
||||
exec('sudo chown www-data:student "'.DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/upload"');
|
||||
exec('mkdir -m 775 '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/upload'));
|
||||
exec('sudo chown www-data:student '.escapeshellarg(DOC_ROOT.'/documents/'.mb_strtolower($kurzbz).'/'.$semester.'/'.mb_strtolower($short_short_name).'/upload'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2438,6 +2438,8 @@ class wochenplan extends basis_db
|
||||
'Description'=>$description,
|
||||
'dtstart'=>$start_date_time_ical,
|
||||
'dtend'=>$end_date_time_ical,
|
||||
'reservierung'=>$this->std_plan[$i][$j][$idx]->reservierung,
|
||||
'reservierung_id'=>($this->std_plan[$i][$j][$idx]->reservierung?$this->std_plan[$i][$j][$idx]->stundenplan_id:''),
|
||||
'updateamum'=>$this->std_plan[$i][$j][$idx]->updateamum,
|
||||
'data'=>'BEGIN:VEVENT'.$this->crlf
|
||||
.'UID:'.$UID.$this->crlf
|
||||
@@ -2488,7 +2490,8 @@ class wochenplan extends basis_db
|
||||
$lektor1 = $this->std_plan[$tag][$stunde][$idx]->lektor;
|
||||
$lektor2 = $this->std_plan[$tag][$stunde][$idx1]->lektor;
|
||||
|
||||
if($unr1==$unr2 && ($ort1==$ort2 || $lektor1==$lektor2))
|
||||
if($unr1==$unr2 && ($ort1==$ort2 || $lektor1==$lektor2)
|
||||
&& !$this->std_plan[$tag][$stunde][$idx]->reservierung && !$this->std_plan[$tag][$stunde][$idx1]->reservierung)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
||||
+511
-466
@@ -1,466 +1,511 @@
|
||||
<?php
|
||||
/* Copyright (C) 2007 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
*/
|
||||
/**
|
||||
* Klasse Zeugnisnote
|
||||
* @create 2007-06-06
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
|
||||
class zeugnisnote extends basis_db
|
||||
{
|
||||
public $new; // boolean
|
||||
public $result=array();
|
||||
|
||||
//Tabellenspalten
|
||||
public $lehrveranstaltung_id; /// serial
|
||||
public $student_uid; // varchar(16)
|
||||
public $studiensemester_kurzbz; // varchar(16)
|
||||
public $note; // smalint
|
||||
public $uebernahmedatum; // date
|
||||
public $benotungsdatum; // date
|
||||
public $updateamum; // timestamp
|
||||
public $updatevon; // varchar(16)
|
||||
public $insertamum; // timestamp
|
||||
public $insertvon; // varchar(16)
|
||||
public $ext_id; // bigint
|
||||
public $bemerkung; // text
|
||||
public $punkte; // numeric(8,4)
|
||||
|
||||
public $lehrveranstaltung_bezeichung;
|
||||
public $note_bezeichnung;
|
||||
public $zeugnis;
|
||||
public $lv_lehrform_kurzbz;
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
* Laedt optional eine Zeugnisnote
|
||||
*
|
||||
* @param $lehrveranstaltung_id
|
||||
* @param $student_uid
|
||||
* @param $studiensemester_kurzbz
|
||||
*/
|
||||
public function __construct($lehrveranstaltung_id=null, $student_uid=null, $studiensemester_kurzbz=null)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
if($lehrveranstaltung_id!=null && $student_uid!=null && $studiensemester_kurzbz!=null)
|
||||
$this->load($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz);
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt eine Zeugnisnote
|
||||
*
|
||||
* @param $lehrveranstaltung_id
|
||||
* @param $student_uid
|
||||
* @param $studiensemester_kurzbz
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function load($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz)
|
||||
{
|
||||
if(!is_numeric($lehrveranstaltung_id))
|
||||
{
|
||||
$this->errormsg = 'Lehrveranstaltung_id ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "SELECT
|
||||
*
|
||||
FROM
|
||||
lehre.tbl_zeugnisnote
|
||||
WHERE
|
||||
lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id, FHC_INTEGER)."
|
||||
AND student_uid=".$this->db_add_param($student_uid)."
|
||||
AND studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->lehrveranstaltung_id = $row->lehrveranstaltung_id;
|
||||
$this->student_uid = $row->student_uid;
|
||||
$this->studiensemester_kurzbz = $row->studiensemester_kurzbz;
|
||||
$this->note = $row->note;
|
||||
$this->uebernahmedatum = $row->uebernahmedatum;
|
||||
$this->benotungsdatum = $row->benotungsdatum;
|
||||
$this->updateamum = $row->updateamum;
|
||||
$this->updatevon = $row->updatevon;
|
||||
$this->insertamum = $row->insertamum;
|
||||
$this->insertvon = $row->insertvon;
|
||||
$this->ext_id = $row->ext_id;
|
||||
$this->bemerkung = $row->bemerkung;
|
||||
$this->punkte = $row->punkte;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Datensatz wurde nicht gefunden';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prueft die Daten vor dem Speichern
|
||||
* auf Gueltigkeit
|
||||
*/
|
||||
protected function validate()
|
||||
{
|
||||
if(!is_numeric($this->lehrveranstaltung_id))
|
||||
{
|
||||
$this->errormsg = 'Lehrveranstaltung_id ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
if($this->student_uid=='')
|
||||
{
|
||||
$this->errormsg = 'UID muss angegeben werden';
|
||||
return false;
|
||||
}
|
||||
if($this->studiensemester_kurzbz=='')
|
||||
{
|
||||
$this->errormsg = 'Studiensemester muss angegeben werden';
|
||||
return false;
|
||||
}
|
||||
if($this->note!='' && !is_numeric($this->note))
|
||||
{
|
||||
$this->errormsg = 'Note ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
if($this->uebernahmedatum!='' && !mb_ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})",$this->uebernahmedatum))
|
||||
{
|
||||
$this->errormsg = 'Uebernahmedatum ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
if($this->benotungsdatum!='' && !mb_ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})",$this->benotungsdatum))
|
||||
{
|
||||
$this->errormsg = 'Benotungsdatum ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Speichert den aktuellen Datensatz in die Datenbank
|
||||
* Wenn $neu auf true gesetzt ist wird ein neuer Datensatz angelegt
|
||||
* andernfalls wird der Datensatz mit der ID in $betriebsmittel_id aktualisiert
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function save($new=null)
|
||||
{
|
||||
if($new==null)
|
||||
$new=$this->new;
|
||||
|
||||
if(!$this->validate())
|
||||
return false;
|
||||
|
||||
if($new)
|
||||
{
|
||||
//Neuen Datensatz einfuegen
|
||||
$qry='INSERT INTO lehre.tbl_zeugnisnote (lehrveranstaltung_id, student_uid,
|
||||
studiensemester_kurzbz, note, uebernahmedatum, benotungsdatum, bemerkung,
|
||||
updateamum, updatevon, insertamum, insertvon, ext_id, punkte) VALUES('.
|
||||
$this->db_add_param($this->lehrveranstaltung_id, FHC_INTEGER).', '.
|
||||
$this->db_add_param($this->student_uid).', '.
|
||||
$this->db_add_param($this->studiensemester_kurzbz).', '.
|
||||
$this->db_add_param($this->note).', '.
|
||||
$this->db_add_param($this->uebernahmedatum).', '.
|
||||
$this->db_add_param($this->benotungsdatum).', '.
|
||||
$this->db_add_param($this->bemerkung).', '.
|
||||
$this->db_add_param($this->updateamum).', '.
|
||||
$this->db_add_param($this->updatevon).', '.
|
||||
$this->db_add_param($this->insertamum).', '.
|
||||
$this->db_add_param($this->insertvon).', '.
|
||||
$this->db_add_param($this->ext_id).','.
|
||||
$this->db_add_param($this->punkte).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry='UPDATE lehre.tbl_zeugnisnote SET '.
|
||||
'note='.$this->db_add_param($this->note).', '.
|
||||
'punkte='.$this->db_add_param($this->punkte).','.
|
||||
'uebernahmedatum='.$this->db_add_param($this->uebernahmedatum).', '.
|
||||
'benotungsdatum='.$this->db_add_param($this->benotungsdatum).', '.
|
||||
'bemerkung='.$this->db_add_param($this->bemerkung).', '.
|
||||
'updateamum= '.$this->db_add_param($this->updateamum).', '.
|
||||
'updatevon='.$this->db_add_param($this->updatevon).' '.
|
||||
'WHERE lehrveranstaltung_id='.$this->db_add_param($this->lehrveranstaltung_id, FHC_INTEGER).' '.
|
||||
'AND student_uid='.$this->db_add_param($this->student_uid).' '.
|
||||
'AND studiensemester_kurzbz='.$this->db_add_param($this->studiensemester_kurzbz).';';
|
||||
}
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg='Fehler beim Speichern der Zeugnisnote';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loescht den Datenensatz mit der ID die uebergeben wird
|
||||
* @param $lehrveranstaltung_id
|
||||
* $student_uid
|
||||
* $studiensemester_kurzbz
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function delete($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz)
|
||||
{
|
||||
$qry = "DELETE FROM lehre.tbl_zeugnisnote WHERE
|
||||
lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id, FHC_INTEGER, false)." AND
|
||||
student_uid=".$this->db_add_param($student_uid)." AND
|
||||
studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
|
||||
|
||||
if($this->db_query($qry))
|
||||
return true;
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Loeschen der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt die Noten
|
||||
* @param $lehrveranstaltung_id
|
||||
* $student_uid
|
||||
* $studiensemester_kurzbz
|
||||
* @return true wenn ok, false wenn Fehler
|
||||
*/
|
||||
public function getZeugnisnoten($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz)
|
||||
{
|
||||
$where='';
|
||||
if($lehrveranstaltung_id!=null)
|
||||
$where.=" AND vw_student_lehrveranstaltung.lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id);
|
||||
if($student_uid!=null)
|
||||
$where.=" AND uid=".$this->db_add_param($student_uid);
|
||||
if($studiensemester_kurzbz!=null)
|
||||
$where.=" AND vw_student_lehrveranstaltung.studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
|
||||
$where2='';
|
||||
if($lehrveranstaltung_id!=null)
|
||||
$where2.=" AND lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id, FHC_INTEGER);
|
||||
if($student_uid!=null)
|
||||
$where2.=" AND student_uid=".$this->db_add_param($student_uid);
|
||||
if($studiensemester_kurzbz!=null)
|
||||
$where2.=" AND studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
|
||||
|
||||
$qry = "SELECT vw_student_lehrveranstaltung.lehrveranstaltung_id, uid,
|
||||
vw_student_lehrveranstaltung.studiensemester_kurzbz, note, punkte, uebernahmedatum, benotungsdatum,
|
||||
vw_student_lehrveranstaltung.ects, vw_student_lehrveranstaltung.semesterstunden,
|
||||
tbl_zeugnisnote.updateamum, tbl_zeugnisnote.updatevon, tbl_zeugnisnote.insertamum,
|
||||
tbl_zeugnisnote.insertvon, tbl_zeugnisnote.ext_id,
|
||||
vw_student_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung,
|
||||
vw_student_lehrveranstaltung.bezeichnung_english as lehrveranstaltung_bezeichnung_english,
|
||||
tbl_note.bezeichnung as note_bezeichnung,
|
||||
tbl_zeugnisnote.bemerkung as bemerkung,
|
||||
vw_student_lehrveranstaltung.sort,
|
||||
vw_student_lehrveranstaltung.zeugnis,
|
||||
vw_student_lehrveranstaltung.studiengang_kz,
|
||||
vw_student_lehrveranstaltung.lv_lehrform_kurzbz
|
||||
FROM
|
||||
(
|
||||
campus.vw_student_lehrveranstaltung LEFT JOIN lehre.tbl_zeugnisnote
|
||||
ON(uid=student_uid
|
||||
AND vw_student_lehrveranstaltung.studiensemester_kurzbz=tbl_zeugnisnote.studiensemester_kurzbz
|
||||
AND vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id
|
||||
)
|
||||
) LEFT JOIN lehre.tbl_note USING(note)
|
||||
WHERE true $where
|
||||
UNION
|
||||
SELECT lehre.tbl_lehrveranstaltung.lehrveranstaltung_id,student_uid AS uid,studiensemester_kurzbz, note, punkte,
|
||||
uebernahmedatum, benotungsdatum,lehre.tbl_lehrveranstaltung.ects,lehre.tbl_lehrveranstaltung.semesterstunden, tbl_zeugnisnote.updateamum, tbl_zeugnisnote.updatevon, tbl_zeugnisnote.insertamum,
|
||||
tbl_zeugnisnote.insertvon, tbl_zeugnisnote.ext_id, lehre.tbl_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung, lehre.tbl_lehrveranstaltung.bezeichnung_english as lehrveranstaltung_bezeichnung_english,
|
||||
tbl_note.bezeichnung as note_bezeichnung, tbl_zeugnisnote.bemerkung as bemerkung, tbl_lehrveranstaltung.sort, tbl_lehrveranstaltung.zeugnis, tbl_lehrveranstaltung.studiengang_kz,
|
||||
tbl_lehrveranstaltung.lehrform_kurzbz as lv_lehrform_kurzbz
|
||||
FROM
|
||||
lehre.tbl_zeugnisnote
|
||||
JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id)
|
||||
JOIN lehre.tbl_note USING(note)
|
||||
WHERE true $where2
|
||||
ORDER BY sort";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object())
|
||||
{
|
||||
$obj = new zeugnisnote();
|
||||
|
||||
$obj->lehrveranstaltung_id = $row->lehrveranstaltung_id;
|
||||
$obj->student_uid = $row->uid;
|
||||
$obj->studiensemester_kurzbz = $row->studiensemester_kurzbz;
|
||||
$obj->note = $row->note;
|
||||
$obj->punkte = $row->punkte;
|
||||
$obj->uebernahmedatum = $row->uebernahmedatum;
|
||||
$obj->benotungsdatum = $row->benotungsdatum;
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->insertamum = $row->insertamum;
|
||||
$obj->insertvon = $row->insertvon;
|
||||
$obj->ext_id = $row->ext_id;
|
||||
$obj->note_bezeichnung = $row->note_bezeichnung;
|
||||
$obj->lehrveranstaltung_bezeichnung = $row->lehrveranstaltung_bezeichnung;
|
||||
$obj->lehrveranstaltung_bezeichnung_english = $row->lehrveranstaltung_bezeichnung_english;
|
||||
$obj->bemerkung = $row->bemerkung;
|
||||
$obj->semesterstunden = $row->semesterstunden;
|
||||
$obj->ects = $row->ects;
|
||||
$obj->sort = $row->sort;
|
||||
$obj->studiengang_kz = $row->studiengang_kz;
|
||||
$obj->zeugnis = $this->db_parse_bool($row->zeugnis);
|
||||
$obj->lv_lehrform_kurzbz = $row->lv_lehrform_kurzbz;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt die Noten Studienjahr
|
||||
* @param $lehrveranstaltung_id
|
||||
* $student_uid
|
||||
* $studiensemester_kurzbz
|
||||
* @return true wenn ok, false wenn Fehler
|
||||
*/
|
||||
public function getZeugnisnotenStudienplan($student_uid, $studiensemester_arr, $studienplan_id)
|
||||
{
|
||||
|
||||
$stsem = $this->db_implode4SQL($studiensemester_arr);
|
||||
|
||||
/*
|
||||
* Alle Lehrveranstaltungen holen zu denen eine Note eingetragen ist und alle zu denen der Studierende zugeteilt ist.
|
||||
* Danach wird im Studienplan gesucht und eventuell darbueberliegenden Module zusaetzlich geladen
|
||||
*/
|
||||
$qry = "
|
||||
WITH RECURSIVE data(lvid, studienplan_lehrveranstaltung_id, studienplan_lehrveranstaltung_id_parent) as
|
||||
(
|
||||
SELECT
|
||||
vw_student_lehrveranstaltung.lehrveranstaltung_id,
|
||||
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id,
|
||||
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id_parent
|
||||
FROM
|
||||
(
|
||||
campus.vw_student_lehrveranstaltung LEFT JOIN lehre.tbl_zeugnisnote
|
||||
ON(uid=student_uid
|
||||
AND vw_student_lehrveranstaltung.studiensemester_kurzbz=tbl_zeugnisnote.studiensemester_kurzbz
|
||||
AND vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id
|
||||
)
|
||||
)
|
||||
LEFT JOIN lehre.tbl_note USING(note)
|
||||
LEFT JOIN lehre.tbl_studienplan_lehrveranstaltung ON(vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_studienplan_lehrveranstaltung.lehrveranstaltung_id)
|
||||
WHERE
|
||||
uid=".$this->db_add_param($student_uid)."
|
||||
AND vw_student_lehrveranstaltung.studiensemester_kurzbz IN(".$stsem.")
|
||||
AND tbl_studienplan_lehrveranstaltung.studienplan_id=".$this->db_add_param($studienplan_id, FHC_INTEGER)."
|
||||
UNION
|
||||
SELECT lehre.tbl_lehrveranstaltung.lehrveranstaltung_id,
|
||||
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id,
|
||||
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id_parent
|
||||
FROM
|
||||
lehre.tbl_zeugnisnote
|
||||
JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id)
|
||||
JOIN lehre.tbl_note USING(note)
|
||||
LEFT JOIN lehre.tbl_studienplan_lehrveranstaltung USING(lehrveranstaltung_id)
|
||||
WHERE
|
||||
student_uid=".$this->db_add_param($student_uid)."
|
||||
AND studiensemester_kurzbz IN(".$stsem.")
|
||||
AND tbl_studienplan_lehrveranstaltung.studienplan_id=".$this->db_add_param($studienplan_id, FHC_INTEGER)."
|
||||
|
||||
UNION ALL
|
||||
SELECT stpllv.lehrveranstaltung_id, stpllv.studienplan_lehrveranstaltung_id, stpllv.studienplan_lehrveranstaltung_id_parent
|
||||
FROM lehre.tbl_studienplan_lehrveranstaltung stpllv, data
|
||||
WHERE stpllv.studienplan_lehrveranstaltung_id=data.studienplan_lehrveranstaltung_id_parent
|
||||
)
|
||||
SELECT
|
||||
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id,
|
||||
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id_parent, tbl_studienplan_lehrveranstaltung.semester,
|
||||
tbl_lehrveranstaltung.lehrveranstaltung_id,tbl_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung, tbl_lehrveranstaltung.bezeichnung_english as lehrveranstaltung_bezeichnung_english,
|
||||
tbl_lehrveranstaltung.semesterstunden, tbl_lehrveranstaltung.ects, tbl_lehrveranstaltung.sort, tbl_lehrveranstaltung.studiengang_kz, tbl_lehrveranstaltung.zeugnis,
|
||||
tbl_lehrveranstaltung.lehrform_kurzbz as lv_lehrform_kurzbz,
|
||||
tbl_zeugnisnote.studiensemester_kurzbz, tbl_zeugnisnote.uebernahmedatum, tbl_zeugnisnote.benotungsdatum,
|
||||
tbl_zeugnisnote.note, tbl_zeugnisnote.updateamum, tbl_zeugnisnote.updatevon, tbl_zeugnisnote.insertamum, tbl_zeugnisnote.insertvon,
|
||||
tbl_note.bezeichnung as note_bezeichnung, tbl_zeugnisnote.bemerkung, tbl_lehrveranstaltung.lvnr, tbl_studienplan_lehrveranstaltung.sort as studienplan_lehrveranstaltung_sort
|
||||
FROM
|
||||
lehre.tbl_lehrveranstaltung
|
||||
LEFT JOIN lehre.tbl_zeugnisnote ON(tbl_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id AND tbl_zeugnisnote.student_uid=".$this->db_add_param($student_uid)." AND tbl_zeugnisnote.studiensemester_kurzbz IN(".$stsem."))
|
||||
LEFT JOIN lehre.tbl_studienplan_lehrveranstaltung ON(tbl_lehrveranstaltung.lehrveranstaltung_id=tbl_studienplan_lehrveranstaltung.lehrveranstaltung_id AND tbl_studienplan_lehrveranstaltung.studienplan_id=".$this->db_add_param($studienplan_id).")
|
||||
LEFT JOIN lehre.tbl_note USING(note)
|
||||
WHERE
|
||||
(tbl_zeugnisnote.studiensemester_kurzbz IN(".$stsem.") OR tbl_zeugnisnote.studiensemester_kurzbz is null)
|
||||
AND tbl_lehrveranstaltung.lehrveranstaltung_id in(SELECT lvid FROM data)
|
||||
ORDER BY studienplan_lehrveranstaltung_id_parent desc, studienplan_lehrveranstaltung_id
|
||||
";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object())
|
||||
{
|
||||
$obj = new zeugnisnote();
|
||||
|
||||
$obj->lehrveranstaltung_id = $row->lehrveranstaltung_id;
|
||||
$obj->student_uid = $student_uid;
|
||||
$obj->studiensemester_kurzbz = $row->studiensemester_kurzbz;
|
||||
$obj->note = $row->note;
|
||||
$obj->uebernahmedatum = $row->uebernahmedatum;
|
||||
$obj->benotungsdatum = $row->benotungsdatum;
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->insertamum = $row->insertamum;
|
||||
$obj->insertvon = $row->insertvon;
|
||||
$obj->note_bezeichnung = $row->note_bezeichnung;
|
||||
$obj->lehrveranstaltung_bezeichnung = $row->lehrveranstaltung_bezeichnung;
|
||||
$obj->lehrveranstaltung_bezeichnung_english = $row->lehrveranstaltung_bezeichnung_english;
|
||||
$obj->bemerkung = $row->bemerkung;
|
||||
$obj->semesterstunden = $row->semesterstunden;
|
||||
$obj->ects = $row->ects;
|
||||
$obj->sort = $row->sort;
|
||||
$obj->studiengang_kz = $row->studiengang_kz;
|
||||
$obj->zeugnis = $this->db_parse_bool($row->zeugnis);
|
||||
$obj->lv_lehrform_kurzbz = $row->lv_lehrform_kurzbz;
|
||||
$obj->lehrveranstaltung_lvnr = $row->lvnr;
|
||||
$obj->studienplan_lehrveranstaltung_id = $row->studienplan_lehrveranstaltung_id;
|
||||
$obj->studienplan_lehrveranstaltung_id_parent = $row->studienplan_lehrveranstaltung_id_parent;
|
||||
$obj->studienplan_lehrveranstaltung_semester = $row->semester;
|
||||
$obj->studienplan_lehrveranstaltung_sort = $row->studienplan_lehrveranstaltung_sort;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
/* Copyright (C) 2007 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
*/
|
||||
/**
|
||||
* Klasse Zeugnisnote
|
||||
* @create 2007-06-06
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
|
||||
class zeugnisnote extends basis_db
|
||||
{
|
||||
public $new; // boolean
|
||||
public $result=array();
|
||||
|
||||
//Tabellenspalten
|
||||
public $lehrveranstaltung_id; /// serial
|
||||
public $student_uid; // varchar(16)
|
||||
public $studiensemester_kurzbz; // varchar(16)
|
||||
public $note; // smalint
|
||||
public $uebernahmedatum; // date
|
||||
public $benotungsdatum; // date
|
||||
public $updateamum; // timestamp
|
||||
public $updatevon; // varchar(16)
|
||||
public $insertamum; // timestamp
|
||||
public $insertvon; // varchar(16)
|
||||
public $ext_id; // bigint
|
||||
public $bemerkung; // text
|
||||
public $punkte; // numeric(8,4)
|
||||
|
||||
public $lehrveranstaltung_bezeichung;
|
||||
public $note_bezeichnung;
|
||||
public $zeugnis;
|
||||
public $lv_lehrform_kurzbz;
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
* Laedt optional eine Zeugnisnote
|
||||
*
|
||||
* @param $lehrveranstaltung_id
|
||||
* @param $student_uid
|
||||
* @param $studiensemester_kurzbz
|
||||
*/
|
||||
public function __construct($lehrveranstaltung_id=null, $student_uid=null, $studiensemester_kurzbz=null)
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
if($lehrveranstaltung_id!=null && $student_uid!=null && $studiensemester_kurzbz!=null)
|
||||
$this->load($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz);
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt eine Zeugnisnote
|
||||
*
|
||||
* @param $lehrveranstaltung_id
|
||||
* @param $student_uid
|
||||
* @param $studiensemester_kurzbz
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function load($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz)
|
||||
{
|
||||
if(!is_numeric($lehrveranstaltung_id))
|
||||
{
|
||||
$this->errormsg = 'Lehrveranstaltung_id ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "SELECT
|
||||
*
|
||||
FROM
|
||||
lehre.tbl_zeugnisnote
|
||||
WHERE
|
||||
lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id, FHC_INTEGER)."
|
||||
AND student_uid=".$this->db_add_param($student_uid)."
|
||||
AND studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->lehrveranstaltung_id = $row->lehrveranstaltung_id;
|
||||
$this->student_uid = $row->student_uid;
|
||||
$this->studiensemester_kurzbz = $row->studiensemester_kurzbz;
|
||||
$this->note = $row->note;
|
||||
$this->uebernahmedatum = $row->uebernahmedatum;
|
||||
$this->benotungsdatum = $row->benotungsdatum;
|
||||
$this->updateamum = $row->updateamum;
|
||||
$this->updatevon = $row->updatevon;
|
||||
$this->insertamum = $row->insertamum;
|
||||
$this->insertvon = $row->insertvon;
|
||||
$this->ext_id = $row->ext_id;
|
||||
$this->bemerkung = $row->bemerkung;
|
||||
$this->punkte = $row->punkte;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Datensatz wurde nicht gefunden';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Prueft die Daten vor dem Speichern
|
||||
* auf Gueltigkeit
|
||||
*/
|
||||
protected function validate()
|
||||
{
|
||||
if(!is_numeric($this->lehrveranstaltung_id))
|
||||
{
|
||||
$this->errormsg = 'Lehrveranstaltung_id ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
if($this->student_uid=='')
|
||||
{
|
||||
$this->errormsg = 'UID muss angegeben werden';
|
||||
return false;
|
||||
}
|
||||
if($this->studiensemester_kurzbz=='')
|
||||
{
|
||||
$this->errormsg = 'Studiensemester muss angegeben werden';
|
||||
return false;
|
||||
}
|
||||
if($this->note!='' && !is_numeric($this->note))
|
||||
{
|
||||
$this->errormsg = 'Note ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
if($this->uebernahmedatum!='' && !mb_ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})",$this->uebernahmedatum))
|
||||
{
|
||||
$this->errormsg = 'Uebernahmedatum ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
if($this->benotungsdatum!='' && !mb_ereg("([0-9]{4})-([0-9]{2})-([0-9]{2})",$this->benotungsdatum))
|
||||
{
|
||||
$this->errormsg = 'Benotungsdatum ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Speichert den aktuellen Datensatz in die Datenbank
|
||||
* Wenn $neu auf true gesetzt ist wird ein neuer Datensatz angelegt
|
||||
* andernfalls wird der Datensatz mit der ID in $betriebsmittel_id aktualisiert
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function save($new=null)
|
||||
{
|
||||
if($new==null)
|
||||
$new=$this->new;
|
||||
|
||||
if(!$this->validate())
|
||||
return false;
|
||||
|
||||
if($new)
|
||||
{
|
||||
//Neuen Datensatz einfuegen
|
||||
$qry='INSERT INTO lehre.tbl_zeugnisnote (lehrveranstaltung_id, student_uid,
|
||||
studiensemester_kurzbz, note, uebernahmedatum, benotungsdatum, bemerkung,
|
||||
updateamum, updatevon, insertamum, insertvon, ext_id, punkte) VALUES('.
|
||||
$this->db_add_param($this->lehrveranstaltung_id, FHC_INTEGER).', '.
|
||||
$this->db_add_param($this->student_uid).', '.
|
||||
$this->db_add_param($this->studiensemester_kurzbz).', '.
|
||||
$this->db_add_param($this->note).', '.
|
||||
$this->db_add_param($this->uebernahmedatum).', '.
|
||||
$this->db_add_param($this->benotungsdatum).', '.
|
||||
$this->db_add_param($this->bemerkung).', '.
|
||||
$this->db_add_param($this->updateamum).', '.
|
||||
$this->db_add_param($this->updatevon).', '.
|
||||
$this->db_add_param($this->insertamum).', '.
|
||||
$this->db_add_param($this->insertvon).', '.
|
||||
$this->db_add_param($this->ext_id).','.
|
||||
$this->db_add_param($this->punkte).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry='UPDATE lehre.tbl_zeugnisnote SET '.
|
||||
'note='.$this->db_add_param($this->note).', '.
|
||||
'punkte='.$this->db_add_param($this->punkte).','.
|
||||
'uebernahmedatum='.$this->db_add_param($this->uebernahmedatum).', '.
|
||||
'benotungsdatum='.$this->db_add_param($this->benotungsdatum).', '.
|
||||
'bemerkung='.$this->db_add_param($this->bemerkung).', '.
|
||||
'updateamum= '.$this->db_add_param($this->updateamum).', '.
|
||||
'updatevon='.$this->db_add_param($this->updatevon).' '.
|
||||
'WHERE lehrveranstaltung_id='.$this->db_add_param($this->lehrveranstaltung_id, FHC_INTEGER).' '.
|
||||
'AND student_uid='.$this->db_add_param($this->student_uid).' '.
|
||||
'AND studiensemester_kurzbz='.$this->db_add_param($this->studiensemester_kurzbz).';';
|
||||
}
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg='Fehler beim Speichern der Zeugnisnote';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Loescht den Datenensatz mit der ID die uebergeben wird
|
||||
* @param $lehrveranstaltung_id
|
||||
* $student_uid
|
||||
* $studiensemester_kurzbz
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function delete($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz)
|
||||
{
|
||||
$qry = "DELETE FROM lehre.tbl_zeugnisnote WHERE
|
||||
lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id, FHC_INTEGER, false)." AND
|
||||
student_uid=".$this->db_add_param($student_uid)." AND
|
||||
studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
|
||||
|
||||
if($this->db_query($qry))
|
||||
return true;
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Loeschen der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt die Noten
|
||||
* @param $lehrveranstaltung_id
|
||||
* $student_uid
|
||||
* $studiensemester_kurzbz
|
||||
* @return true wenn ok, false wenn Fehler
|
||||
*/
|
||||
public function getZeugnisnoten($lehrveranstaltung_id, $student_uid, $studiensemester_kurzbz)
|
||||
{
|
||||
$where='';
|
||||
if($lehrveranstaltung_id!=null)
|
||||
$where.=" AND vw_student_lehrveranstaltung.lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id);
|
||||
if($student_uid!=null)
|
||||
$where.=" AND uid=".$this->db_add_param($student_uid);
|
||||
if($studiensemester_kurzbz!=null)
|
||||
$where.=" AND vw_student_lehrveranstaltung.studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
|
||||
$where2='';
|
||||
if($lehrveranstaltung_id!=null)
|
||||
$where2.=" AND lehrveranstaltung_id=".$this->db_add_param($lehrveranstaltung_id, FHC_INTEGER);
|
||||
if($student_uid!=null)
|
||||
$where2.=" AND student_uid=".$this->db_add_param($student_uid);
|
||||
if($studiensemester_kurzbz!=null)
|
||||
$where2.=" AND studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
|
||||
|
||||
$qry = "SELECT vw_student_lehrveranstaltung.lehrveranstaltung_id, uid,
|
||||
vw_student_lehrveranstaltung.studiensemester_kurzbz, note, punkte, uebernahmedatum, benotungsdatum,
|
||||
vw_student_lehrveranstaltung.ects, vw_student_lehrveranstaltung.semesterstunden,
|
||||
tbl_zeugnisnote.updateamum, tbl_zeugnisnote.updatevon, tbl_zeugnisnote.insertamum,
|
||||
tbl_zeugnisnote.insertvon, tbl_zeugnisnote.ext_id,
|
||||
vw_student_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung,
|
||||
vw_student_lehrveranstaltung.bezeichnung_english as lehrveranstaltung_bezeichnung_english,
|
||||
tbl_note.bezeichnung as note_bezeichnung,
|
||||
tbl_zeugnisnote.bemerkung as bemerkung,
|
||||
vw_student_lehrveranstaltung.sort,
|
||||
vw_student_lehrveranstaltung.zeugnis,
|
||||
vw_student_lehrveranstaltung.studiengang_kz,
|
||||
vw_student_lehrveranstaltung.lv_lehrform_kurzbz
|
||||
FROM
|
||||
(
|
||||
campus.vw_student_lehrveranstaltung LEFT JOIN lehre.tbl_zeugnisnote
|
||||
ON(uid=student_uid
|
||||
AND vw_student_lehrveranstaltung.studiensemester_kurzbz=tbl_zeugnisnote.studiensemester_kurzbz
|
||||
AND vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id
|
||||
)
|
||||
) LEFT JOIN lehre.tbl_note USING(note)
|
||||
WHERE true $where
|
||||
UNION
|
||||
SELECT lehre.tbl_lehrveranstaltung.lehrveranstaltung_id,student_uid AS uid,studiensemester_kurzbz, note, punkte,
|
||||
uebernahmedatum, benotungsdatum,lehre.tbl_lehrveranstaltung.ects,lehre.tbl_lehrveranstaltung.semesterstunden, tbl_zeugnisnote.updateamum, tbl_zeugnisnote.updatevon, tbl_zeugnisnote.insertamum,
|
||||
tbl_zeugnisnote.insertvon, tbl_zeugnisnote.ext_id, lehre.tbl_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung, lehre.tbl_lehrveranstaltung.bezeichnung_english as lehrveranstaltung_bezeichnung_english,
|
||||
tbl_note.bezeichnung as note_bezeichnung, tbl_zeugnisnote.bemerkung as bemerkung, tbl_lehrveranstaltung.sort, tbl_lehrveranstaltung.zeugnis, tbl_lehrveranstaltung.studiengang_kz,
|
||||
tbl_lehrveranstaltung.lehrform_kurzbz as lv_lehrform_kurzbz
|
||||
FROM
|
||||
lehre.tbl_zeugnisnote
|
||||
JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id)
|
||||
JOIN lehre.tbl_note USING(note)
|
||||
WHERE true $where2
|
||||
ORDER BY sort";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object())
|
||||
{
|
||||
$obj = new zeugnisnote();
|
||||
|
||||
$obj->lehrveranstaltung_id = $row->lehrveranstaltung_id;
|
||||
$obj->student_uid = $row->uid;
|
||||
$obj->studiensemester_kurzbz = $row->studiensemester_kurzbz;
|
||||
$obj->note = $row->note;
|
||||
$obj->punkte = $row->punkte;
|
||||
$obj->uebernahmedatum = $row->uebernahmedatum;
|
||||
$obj->benotungsdatum = $row->benotungsdatum;
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->insertamum = $row->insertamum;
|
||||
$obj->insertvon = $row->insertvon;
|
||||
$obj->ext_id = $row->ext_id;
|
||||
$obj->note_bezeichnung = $row->note_bezeichnung;
|
||||
$obj->lehrveranstaltung_bezeichnung = $row->lehrveranstaltung_bezeichnung;
|
||||
$obj->lehrveranstaltung_bezeichnung_english = $row->lehrveranstaltung_bezeichnung_english;
|
||||
$obj->bemerkung = $row->bemerkung;
|
||||
$obj->semesterstunden = $row->semesterstunden;
|
||||
$obj->ects = $row->ects;
|
||||
$obj->sort = $row->sort;
|
||||
$obj->studiengang_kz = $row->studiengang_kz;
|
||||
$obj->zeugnis = $this->db_parse_bool($row->zeugnis);
|
||||
$obj->lv_lehrform_kurzbz = $row->lv_lehrform_kurzbz;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Laedt die Noten Studienjahr
|
||||
* @param $lehrveranstaltung_id
|
||||
* $student_uid
|
||||
* $studiensemester_kurzbz
|
||||
* @return true wenn ok, false wenn Fehler
|
||||
*/
|
||||
public function getZeugnisnotenStudienplan($student_uid, $studiensemester_arr, $studienplan_id)
|
||||
{
|
||||
|
||||
$stsem = $this->db_implode4SQL($studiensemester_arr);
|
||||
|
||||
/*
|
||||
* Alle Lehrveranstaltungen holen zu denen eine Note eingetragen ist und alle zu denen der Studierende zugeteilt ist.
|
||||
* Danach wird im Studienplan gesucht und eventuell darbueberliegenden Module zusaetzlich geladen
|
||||
*/
|
||||
$qry = "
|
||||
WITH RECURSIVE data(lvid, studienplan_lehrveranstaltung_id, studienplan_lehrveranstaltung_id_parent) as
|
||||
(
|
||||
SELECT
|
||||
vw_student_lehrveranstaltung.lehrveranstaltung_id,
|
||||
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id,
|
||||
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id_parent
|
||||
FROM
|
||||
(
|
||||
campus.vw_student_lehrveranstaltung LEFT JOIN lehre.tbl_zeugnisnote
|
||||
ON(uid=student_uid
|
||||
AND vw_student_lehrveranstaltung.studiensemester_kurzbz=tbl_zeugnisnote.studiensemester_kurzbz
|
||||
AND vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id
|
||||
)
|
||||
)
|
||||
LEFT JOIN lehre.tbl_note USING(note)
|
||||
LEFT JOIN lehre.tbl_studienplan_lehrveranstaltung ON(vw_student_lehrveranstaltung.lehrveranstaltung_id=tbl_studienplan_lehrveranstaltung.lehrveranstaltung_id)
|
||||
WHERE
|
||||
uid=".$this->db_add_param($student_uid)."
|
||||
AND vw_student_lehrveranstaltung.studiensemester_kurzbz IN(".$stsem.")
|
||||
AND tbl_studienplan_lehrveranstaltung.studienplan_id=".$this->db_add_param($studienplan_id, FHC_INTEGER)."
|
||||
UNION
|
||||
SELECT lehre.tbl_lehrveranstaltung.lehrveranstaltung_id,
|
||||
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id,
|
||||
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id_parent
|
||||
FROM
|
||||
lehre.tbl_zeugnisnote
|
||||
JOIN lehre.tbl_lehrveranstaltung USING (lehrveranstaltung_id)
|
||||
JOIN lehre.tbl_note USING(note)
|
||||
LEFT JOIN lehre.tbl_studienplan_lehrveranstaltung USING(lehrveranstaltung_id)
|
||||
WHERE
|
||||
student_uid=".$this->db_add_param($student_uid)."
|
||||
AND studiensemester_kurzbz IN(".$stsem.")
|
||||
AND tbl_studienplan_lehrveranstaltung.studienplan_id=".$this->db_add_param($studienplan_id, FHC_INTEGER)."
|
||||
|
||||
UNION ALL
|
||||
SELECT stpllv.lehrveranstaltung_id, stpllv.studienplan_lehrveranstaltung_id, stpllv.studienplan_lehrveranstaltung_id_parent
|
||||
FROM lehre.tbl_studienplan_lehrveranstaltung stpllv, data
|
||||
WHERE stpllv.studienplan_lehrveranstaltung_id=data.studienplan_lehrveranstaltung_id_parent
|
||||
)
|
||||
SELECT
|
||||
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id,
|
||||
tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id_parent, tbl_studienplan_lehrveranstaltung.semester,
|
||||
tbl_lehrveranstaltung.lehrveranstaltung_id,tbl_lehrveranstaltung.bezeichnung as lehrveranstaltung_bezeichnung, tbl_lehrveranstaltung.bezeichnung_english as lehrveranstaltung_bezeichnung_english,
|
||||
tbl_lehrveranstaltung.semesterstunden, tbl_lehrveranstaltung.ects, tbl_lehrveranstaltung.sort, tbl_lehrveranstaltung.studiengang_kz, tbl_lehrveranstaltung.zeugnis,
|
||||
tbl_lehrveranstaltung.lehrform_kurzbz as lv_lehrform_kurzbz,
|
||||
tbl_zeugnisnote.studiensemester_kurzbz, tbl_zeugnisnote.uebernahmedatum, tbl_zeugnisnote.benotungsdatum,
|
||||
tbl_zeugnisnote.note, tbl_zeugnisnote.updateamum, tbl_zeugnisnote.updatevon, tbl_zeugnisnote.insertamum, tbl_zeugnisnote.insertvon,
|
||||
tbl_note.bezeichnung as note_bezeichnung, tbl_zeugnisnote.bemerkung, tbl_lehrveranstaltung.lvnr, tbl_studienplan_lehrveranstaltung.sort as studienplan_lehrveranstaltung_sort
|
||||
FROM
|
||||
lehre.tbl_lehrveranstaltung
|
||||
LEFT JOIN lehre.tbl_zeugnisnote ON(tbl_lehrveranstaltung.lehrveranstaltung_id=tbl_zeugnisnote.lehrveranstaltung_id AND tbl_zeugnisnote.student_uid=".$this->db_add_param($student_uid)." AND tbl_zeugnisnote.studiensemester_kurzbz IN(".$stsem."))
|
||||
LEFT JOIN lehre.tbl_studienplan_lehrveranstaltung ON(tbl_lehrveranstaltung.lehrveranstaltung_id=tbl_studienplan_lehrveranstaltung.lehrveranstaltung_id AND tbl_studienplan_lehrveranstaltung.studienplan_id=".$this->db_add_param($studienplan_id).")
|
||||
LEFT JOIN lehre.tbl_note USING(note)
|
||||
WHERE
|
||||
(tbl_zeugnisnote.studiensemester_kurzbz IN(".$stsem.") OR tbl_zeugnisnote.studiensemester_kurzbz is null)
|
||||
AND tbl_lehrveranstaltung.lehrveranstaltung_id in(SELECT lvid FROM data)
|
||||
ORDER BY studienplan_lehrveranstaltung_id_parent desc, studienplan_lehrveranstaltung_id
|
||||
";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object())
|
||||
{
|
||||
$obj = new zeugnisnote();
|
||||
|
||||
$obj->lehrveranstaltung_id = $row->lehrveranstaltung_id;
|
||||
$obj->student_uid = $student_uid;
|
||||
$obj->studiensemester_kurzbz = $row->studiensemester_kurzbz;
|
||||
$obj->note = $row->note;
|
||||
$obj->uebernahmedatum = $row->uebernahmedatum;
|
||||
$obj->benotungsdatum = $row->benotungsdatum;
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->insertamum = $row->insertamum;
|
||||
$obj->insertvon = $row->insertvon;
|
||||
$obj->note_bezeichnung = $row->note_bezeichnung;
|
||||
$obj->lehrveranstaltung_bezeichnung = $row->lehrveranstaltung_bezeichnung;
|
||||
$obj->lehrveranstaltung_bezeichnung_english = $row->lehrveranstaltung_bezeichnung_english;
|
||||
$obj->bemerkung = $row->bemerkung;
|
||||
$obj->semesterstunden = $row->semesterstunden;
|
||||
$obj->ects = $row->ects;
|
||||
$obj->sort = $row->sort;
|
||||
$obj->studiengang_kz = $row->studiengang_kz;
|
||||
$obj->zeugnis = $this->db_parse_bool($row->zeugnis);
|
||||
$obj->lv_lehrform_kurzbz = $row->lv_lehrform_kurzbz;
|
||||
$obj->lehrveranstaltung_lvnr = $row->lvnr;
|
||||
$obj->studienplan_lehrveranstaltung_id = $row->studienplan_lehrveranstaltung_id;
|
||||
$obj->studienplan_lehrveranstaltung_id_parent = $row->studienplan_lehrveranstaltung_id_parent;
|
||||
$obj->studienplan_lehrveranstaltung_semester = $row->semester;
|
||||
$obj->studienplan_lehrveranstaltung_sort = $row->studienplan_lehrveranstaltung_sort;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Generiert den SQL-Befehl für eine UNDO-Aktion
|
||||
* @param type $crud gewünschter Typ der UNDO-Aktion
|
||||
*/
|
||||
public function getUndo($crud)
|
||||
{
|
||||
if(strtoupper($crud) === 'INSERT')
|
||||
{
|
||||
return 'INSERT INTO lehre.tbl_zeugnisnote (lehrveranstaltung_id, student_uid,
|
||||
studiensemester_kurzbz, note, uebernahmedatum, benotungsdatum, bemerkung,
|
||||
updateamum, updatevon, insertamum, insertvon, ext_id, punkte) VALUES('.
|
||||
$this->db_add_param($this->lehrveranstaltung_id, FHC_INTEGER).', '.
|
||||
$this->db_add_param($this->student_uid).', '.
|
||||
$this->db_add_param($this->studiensemester_kurzbz).', '.
|
||||
$this->db_add_param($this->note).', '.
|
||||
$this->db_add_param($this->uebernahmedatum).', '.
|
||||
$this->db_add_param($this->benotungsdatum).', '.
|
||||
$this->db_add_param($this->bemerkung).', '.
|
||||
$this->db_add_param($this->updateamum).', '.
|
||||
$this->db_add_param($this->updatevon).', '.
|
||||
$this->db_add_param($this->insertamum).', '.
|
||||
$this->db_add_param($this->insertvon).', '.
|
||||
$this->db_add_param($this->ext_id).','.
|
||||
$this->db_add_param($this->punkte).');';
|
||||
}
|
||||
else if(strtoupper($crud) === 'UPDATE')
|
||||
{
|
||||
return 'UPDATE lehre.tbl_zeugnisnote SET '.
|
||||
'note='.$this->db_add_param($this->note).', '.
|
||||
'punkte='.$this->db_add_param($this->punkte).','.
|
||||
'uebernahmedatum='.$this->db_add_param($this->uebernahmedatum).', '.
|
||||
'benotungsdatum='.$this->db_add_param($this->benotungsdatum).', '.
|
||||
'bemerkung='.$this->db_add_param($this->bemerkung).', '.
|
||||
'updateamum= '.$this->db_add_param($this->updateamum).', '.
|
||||
'updatevon='.$this->db_add_param($this->updatevon).' '.
|
||||
'WHERE lehrveranstaltung_id='.$this->db_add_param($this->lehrveranstaltung_id, FHC_INTEGER).' '.
|
||||
'AND student_uid='.$this->db_add_param($this->student_uid).' '.
|
||||
'AND studiensemester_kurzbz='.$this->db_add_param($this->studiensemester_kurzbz).';';
|
||||
}
|
||||
else
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -37,6 +37,7 @@ $this->phrasen['bewerbung/egal']='egal';
|
||||
$this->phrasen['bewerbung/orgform']='Organisationsform';
|
||||
$this->phrasen['bewerbung/orgform/berufsbegleitend']='Berufsbegleitend';
|
||||
$this->phrasen['bewerbung/orgform/vollzeit']='Vollzeit';
|
||||
$this->phrasen['bewerbung/orgform/distance']='Fernstudium';
|
||||
$this->phrasen['bewerbung/sprache']='Sprache';
|
||||
$this->phrasen['bewerbung/sprache/deutsch']='Deutsch';
|
||||
$this->phrasen['bewerbung/sprache/englisch']='Englisch';
|
||||
|
||||
+74
-73
@@ -1,73 +1,74 @@
|
||||
<?php
|
||||
|
||||
//Dokumente
|
||||
$this->phrasen['tools/dokumente']='Dokumente';
|
||||
$this->phrasen['tools/inskriptionsbestaetigung']='Inskriptionsbestätigung';
|
||||
$this->phrasen['tools/studienbeitragFuerSSBezahltAmDatum']='Studienbeitrag für das %1$s bezahlt am %2$s';
|
||||
$this->phrasen['tools/studienbeitragFuerSSNochNichtBezahlt']='Studienbeitrag für das %1$s noch nicht bezahlt';
|
||||
$this->phrasen['tools/studienerfolgsbestaetigung']='Studienerfolgsbestätigung';
|
||||
$this->phrasen['tools/studiensemesterAuswaehlen']='Bitte wählen Sie das entsprechende Studiensemester aus';
|
||||
$this->phrasen['tools/vorlageWohnsitzfinanzamt']='zur Vorlage beim Wohnsitzfinanzamt';
|
||||
|
||||
//Leistungsbeurteilung
|
||||
$this->phrasen['tools/leistungsbeurteilung']='Leistungsbeurteilung';
|
||||
$this->phrasen['tools/studentWurdeNichtGefunden']='Student wurde nicht gefunden';
|
||||
$this->phrasen['tools/mussAlsStudentEingeloggtSein']='Sie müssen als Student eingeloggt sein um ihre Noten abzufragen!';
|
||||
$this->phrasen['tools/nochKeineBeurteilungEingetragen']='Es wurden noch keine Beurteilungen eingetragen';
|
||||
$this->phrasen['tools/fehlerBeimAuslesenDerNoten']='Fehler beim Auslesen der Noten';
|
||||
$this->phrasen['tools/benotungsdatumDerZeugnisnote']='Benotungsdatum der Zeugnisnote';
|
||||
|
||||
//Zahlungen
|
||||
$this->phrasen['tools/zahlungen']='Zahlungen';
|
||||
$this->phrasen['tools/zahlungstyp']='Typ';
|
||||
$this->phrasen['tools/buchungstext']='Buchungstext';
|
||||
$this->phrasen['tools/betrag']='Betrag';
|
||||
$this->phrasen['tools/zahlungsbestaetigung']='Zahlungsbestätigung';
|
||||
$this->phrasen['tools/bestaetigungDrucken']='Bestaetigung drucken';
|
||||
$this->phrasen['tools/offen']='offen';
|
||||
$this->phrasen['tools/keineZahlungenVorhanden']='Derzeit sind keine Zahlungen vorhanden';
|
||||
|
||||
//Ampeln
|
||||
$this->phrasen['tools/ampelsystem']='Ampelsystem';
|
||||
$this->phrasen['tools/ampel']='Ampel';
|
||||
$this->phrasen['tools/nichtZugeteilt']='Sie sind nicht zu dieser Ampel zugeteilt';
|
||||
$this->phrasen['tools/ampelNichtGefunden']='Die angegeben Ampel wurde nicht gefunden';
|
||||
$this->phrasen['tools/ampelStatus']='Status';
|
||||
$this->phrasen['tools/ampelBeschreibung']='Beschreibung';
|
||||
$this->phrasen['tools/ampelKurzbz']='Kurzbezeichnung';
|
||||
$this->phrasen['tools/ampelDeadline']='Deadline';
|
||||
$this->phrasen['tools/ampelAktion']='Aktion';
|
||||
$this->phrasen['tools/ampelErledigt']='Erledigt';
|
||||
$this->phrasen['tools/ampelBestaetigen']='bestätigen';
|
||||
$this->phrasen['tools/ampelBestaetigt']='bestätigt';
|
||||
$this->phrasen['tools/ampelMitarbeiter']='Mitarbeiter';
|
||||
$this->phrasen['tools/ampelRestdauer']='Restdauer in Tagen';
|
||||
$this->phrasen['tools/ampelBestaetigtAm']='Bestätigt am';
|
||||
$this->phrasen['tools/ampelBereitsBestaetigt']='Diese Ampel wurde bereits bestätigt';
|
||||
$this->phrasen['tools/dasAmpelsystemIstEinErinnerungsystem']='Das Ampelsystem ist ein ERINNERUNGS- und BESTÄTIGUNGSSYSTEM, welches Sie auf ausstehende Aufgaben aufmerksam machen soll.<br/>Die Ampel überprüft NICHT, ob die Aufgabe tatsächlich erledigt wurde. Weitere Details entnehmen Sie bitte dem CIS-Handbuch';
|
||||
$this->phrasen['tools/waehlenSieEineOEoderAmpel']='Bitte wählen Sie ein Organisationseinheit und/oder eine Ampel aus dem Dropdown';
|
||||
$this->phrasen['tools/uebersichtLeitung']='Ampel-Übersicht für LeiterInnen';
|
||||
|
||||
//Software fuer Lehre -> Softgrid
|
||||
$this->phrasen['tools/applikationsliste']='Applikationsliste';
|
||||
$this->phrasen['tools/naehereInformationenfindenSieUnter']='Nähere Informationen zu Softgrid sowie eine Installationsanleitung finden Sie unter "Infrastruktur - SoftGrid"';
|
||||
$this->phrasen['tools/einzelanwendung']='Einzelanwendung';
|
||||
$this->phrasen['tools/softwarepaket']='Softwarepaket';
|
||||
$this->phrasen['tools/datei']='Datei ';
|
||||
$this->phrasen['tools/wurdeNichtGefunden']=' wurde nicht gefunden!';
|
||||
$this->phrasen['tools/fehlerBeimLesenDerDatei']='Fehler beim Lesen der Datei ';
|
||||
$this->phrasen['tools/keineDatenGefunden']='Keine Daten gefunden';
|
||||
|
||||
//Suche
|
||||
$this->phrasen['tools/suche']='Globale Suche';
|
||||
$this->phrasen['tools/content']='Content';
|
||||
$this->phrasen['tools/suchbegriff']='Suchbegriff';
|
||||
$this->phrasen['tools/esWurdenMehrAlsXDokumenteGefunden']='Es wurden mehr als 40 Dokumente zu Ihrem Suchbegriff gefunden. Bitte spezifizieren Sie Ihre Suche.';
|
||||
$this->phrasen['tools/esWurdenMehrAlsXPersonenGefunden']='Es wurden mehr als 20 Personen zu Ihrem Suchbegriff gefunden. Bitte spezifizieren Sie Ihre Suche.';
|
||||
$this->phrasen['tools/esWurdenMehrAlsXInhalteGefunden']='Es wurden mehr als 20 Seiten zu Ihrem Suchbegriff gefunden. Bitte spezifizieren Sie Ihre Suche.';
|
||||
$this->phrasen['tools/aktuelleVersion']='Aktuelle Version';
|
||||
$this->phrasen['tools/telefonklappe']='Telefonklappe';
|
||||
$this->phrasen['tools/reservieren']='Reservieren';
|
||||
$this->phrasen['tools/maxPersonen']='Max. Personen';
|
||||
$this->phrasen['tools/esWurdenKeineErgebnisseGefunden']='Es wurden keine Ergebnisse gefunden.';
|
||||
?>
|
||||
<?php
|
||||
|
||||
//Dokumente
|
||||
$this->phrasen['tools/dokumente']='Dokumente';
|
||||
$this->phrasen['tools/inskriptionsbestaetigung']='Inskriptionsbestätigung';
|
||||
$this->phrasen['tools/studienbeitragFuerSSBezahltAmDatum']='Studienbeitrag für das %1$s bezahlt am %2$s';
|
||||
$this->phrasen['tools/studienbeitragFuerSSNochNichtBezahlt']='Studienbeitrag für das %1$s noch nicht bezahlt';
|
||||
$this->phrasen['tools/studienerfolgsbestaetigung']='Studienerfolgsbestätigung';
|
||||
$this->phrasen['tools/studiensemesterAuswaehlen']='Bitte wählen Sie das entsprechende Studiensemester aus';
|
||||
$this->phrasen['tools/vorlageWohnsitzfinanzamt']='zur Vorlage beim Wohnsitzfinanzamt';
|
||||
$this->phrasen['tools/studienbuchblatt']='Studienbuchblatt';
|
||||
|
||||
//Leistungsbeurteilung
|
||||
$this->phrasen['tools/leistungsbeurteilung']='Leistungsbeurteilung';
|
||||
$this->phrasen['tools/studentWurdeNichtGefunden']='Student wurde nicht gefunden';
|
||||
$this->phrasen['tools/mussAlsStudentEingeloggtSein']='Sie müssen als Student eingeloggt sein um ihre Noten abzufragen!';
|
||||
$this->phrasen['tools/nochKeineBeurteilungEingetragen']='Es wurden noch keine Beurteilungen eingetragen';
|
||||
$this->phrasen['tools/fehlerBeimAuslesenDerNoten']='Fehler beim Auslesen der Noten';
|
||||
$this->phrasen['tools/benotungsdatumDerZeugnisnote']='Benotungsdatum der Zeugnisnote';
|
||||
|
||||
//Zahlungen
|
||||
$this->phrasen['tools/zahlungen']='Zahlungen';
|
||||
$this->phrasen['tools/zahlungstyp']='Typ';
|
||||
$this->phrasen['tools/buchungstext']='Buchungstext';
|
||||
$this->phrasen['tools/betrag']='Betrag';
|
||||
$this->phrasen['tools/zahlungsbestaetigung']='Zahlungsbestätigung';
|
||||
$this->phrasen['tools/bestaetigungDrucken']='Bestaetigung drucken';
|
||||
$this->phrasen['tools/offen']='offen';
|
||||
$this->phrasen['tools/keineZahlungenVorhanden']='Derzeit sind keine Zahlungen vorhanden';
|
||||
|
||||
//Ampeln
|
||||
$this->phrasen['tools/ampelsystem']='Ampelsystem';
|
||||
$this->phrasen['tools/ampel']='Ampel';
|
||||
$this->phrasen['tools/nichtZugeteilt']='Sie sind nicht zu dieser Ampel zugeteilt';
|
||||
$this->phrasen['tools/ampelNichtGefunden']='Die angegeben Ampel wurde nicht gefunden';
|
||||
$this->phrasen['tools/ampelStatus']='Status';
|
||||
$this->phrasen['tools/ampelBeschreibung']='Beschreibung';
|
||||
$this->phrasen['tools/ampelKurzbz']='Kurzbezeichnung';
|
||||
$this->phrasen['tools/ampelDeadline']='Deadline';
|
||||
$this->phrasen['tools/ampelAktion']='Aktion';
|
||||
$this->phrasen['tools/ampelErledigt']='Erledigt';
|
||||
$this->phrasen['tools/ampelBestaetigen']='bestätigen';
|
||||
$this->phrasen['tools/ampelBestaetigt']='bestätigt';
|
||||
$this->phrasen['tools/ampelMitarbeiter']='Mitarbeiter';
|
||||
$this->phrasen['tools/ampelRestdauer']='Restdauer in Tagen';
|
||||
$this->phrasen['tools/ampelBestaetigtAm']='Bestätigt am';
|
||||
$this->phrasen['tools/ampelBereitsBestaetigt']='Diese Ampel wurde bereits bestätigt';
|
||||
$this->phrasen['tools/dasAmpelsystemIstEinErinnerungsystem']='Das Ampelsystem ist ein ERINNERUNGS- und BESTÄTIGUNGSSYSTEM, welches Sie auf ausstehende Aufgaben aufmerksam machen soll.<br/>Die Ampel überprüft NICHT, ob die Aufgabe tatsächlich erledigt wurde. Weitere Details entnehmen Sie bitte dem CIS-Handbuch';
|
||||
$this->phrasen['tools/waehlenSieEineOEoderAmpel']='Bitte wählen Sie ein Organisationseinheit und/oder eine Ampel aus dem Dropdown';
|
||||
$this->phrasen['tools/uebersichtLeitung']='Ampel-Übersicht für LeiterInnen';
|
||||
|
||||
//Software fuer Lehre -> Softgrid
|
||||
$this->phrasen['tools/applikationsliste']='Applikationsliste';
|
||||
$this->phrasen['tools/naehereInformationenfindenSieUnter']='Nähere Informationen zu Softgrid sowie eine Installationsanleitung finden Sie unter "Infrastruktur - SoftGrid"';
|
||||
$this->phrasen['tools/einzelanwendung']='Einzelanwendung';
|
||||
$this->phrasen['tools/softwarepaket']='Softwarepaket';
|
||||
$this->phrasen['tools/datei']='Datei ';
|
||||
$this->phrasen['tools/wurdeNichtGefunden']=' wurde nicht gefunden!';
|
||||
$this->phrasen['tools/fehlerBeimLesenDerDatei']='Fehler beim Lesen der Datei ';
|
||||
$this->phrasen['tools/keineDatenGefunden']='Keine Daten gefunden';
|
||||
|
||||
//Suche
|
||||
$this->phrasen['tools/suche']='Globale Suche';
|
||||
$this->phrasen['tools/content']='Content';
|
||||
$this->phrasen['tools/suchbegriff']='Suchbegriff';
|
||||
$this->phrasen['tools/esWurdenMehrAlsXDokumenteGefunden']='Es wurden mehr als 40 Dokumente zu Ihrem Suchbegriff gefunden. Bitte spezifizieren Sie Ihre Suche.';
|
||||
$this->phrasen['tools/esWurdenMehrAlsXPersonenGefunden']='Es wurden mehr als 20 Personen zu Ihrem Suchbegriff gefunden. Bitte spezifizieren Sie Ihre Suche.';
|
||||
$this->phrasen['tools/esWurdenMehrAlsXInhalteGefunden']='Es wurden mehr als 20 Seiten zu Ihrem Suchbegriff gefunden. Bitte spezifizieren Sie Ihre Suche.';
|
||||
$this->phrasen['tools/aktuelleVersion']='Aktuelle Version';
|
||||
$this->phrasen['tools/telefonklappe']='Telefonklappe';
|
||||
$this->phrasen['tools/reservieren']='Reservieren';
|
||||
$this->phrasen['tools/maxPersonen']='Max. Personen';
|
||||
$this->phrasen['tools/esWurdenKeineErgebnisseGefunden']='Es wurden keine Ergebnisse gefunden.';
|
||||
?>
|
||||
|
||||
@@ -44,6 +44,11 @@ elseif(isset($_GET['filter']))
|
||||
$filter = $_GET['filter'];
|
||||
$dms->search($filter);
|
||||
}
|
||||
elseif(isset($_GET['notiz_id']))
|
||||
{
|
||||
$notiz_id = $_GET['notiz_id'];
|
||||
$dms->getDokumenteNotiz($notiz_id);
|
||||
}
|
||||
else
|
||||
die('projekt_kurzbz oder projektphase_id muss uebergeben werden');
|
||||
|
||||
|
||||
@@ -93,6 +93,7 @@ foreach($notiz->result as $row)
|
||||
<NOTIZ:startISO><![CDATA['.$row->start.']]></NOTIZ:startISO>
|
||||
<NOTIZ:endeISO><![CDATA['.$row->ende.']]></NOTIZ:endeISO>
|
||||
<NOTIZ:erledigt><![CDATA['.($row->erledigt?'true':'false').']]></NOTIZ:erledigt>
|
||||
<NOTIZ:dokumente><![CDATA['.count($row->dokumente).']]></NOTIZ:dokumente>
|
||||
<NOTIZ:insertamum><![CDATA['.$row->insertamum.']]></NOTIZ:insertamum>
|
||||
<NOTIZ:insertvon><![CDATA['.$row->insertvon.']]></NOTIZ:insertvon>
|
||||
<NOTIZ:updateamum><![CDATA['.$datum_obj->formatDatum($row->updateamum,'d.m.Y H:i:s').']]></NOTIZ:updateamum>
|
||||
|
||||
@@ -30,10 +30,12 @@ require_once('../include/notiz.class.php');
|
||||
require_once('../include/datum.class.php');
|
||||
require_once('../include/functions.inc.php');
|
||||
require_once('../include/benutzerberechtigung.class.php');
|
||||
require_once('../include/dms.class.php');
|
||||
|
||||
$SOAPServer = new SoapServer(APP_ROOT."/soap/notiz.wsdl.php?".microtime());
|
||||
$SOAPServer->addFunction("saveNotiz");
|
||||
$SOAPServer->addFunction("deleteNotiz");
|
||||
$SOAPServer->addFunction("deleteDokument");
|
||||
$SOAPServer->addFunction("setErledigt");
|
||||
$SOAPServer->handle();
|
||||
|
||||
@@ -133,6 +135,29 @@ function deleteNotiz($username, $passwort, $notiz_id)
|
||||
return new SoapFault("Server", $projekttask->errormsg);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Löscht das Dokument mit der vom Webservice übergebenen DMS-ID
|
||||
* @param $dms_id
|
||||
*/
|
||||
function deleteDokument($username, $passwort, $dms_id)
|
||||
{
|
||||
if(!$user = check_user($username, $passwort))
|
||||
return new SoapFault("Server", "Invalid Credentials");
|
||||
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
if(!$rechte->isBerechtigt('basis/notiz', null, 'suid'))
|
||||
return new SoapFault("Server", "Sie haben keine Berechtigung zum Loeschen von Dokumenten");
|
||||
|
||||
$dms = new dms();
|
||||
if($dms->deleteDms($dms_id))
|
||||
return "OK";
|
||||
else
|
||||
return new SoapFault("Server", $dms->errormsg);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Setzt den erledigt Status
|
||||
|
||||
@@ -49,6 +49,14 @@ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
|
||||
<wsdl:message name="deleteNotizResponse">
|
||||
<wsdl:part name="message" type="xsd:string"></wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="deleteDokumentRequest">
|
||||
<wsdl:part name="username" type="xsd:string" minOccurs="0"></wsdl:part>
|
||||
<wsdl:part name="passwort" type="xsd:string" minOccurs="0"></wsdl:part>
|
||||
<wsdl:part name="dms_id" type="xsd:string"></wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="deleteDokumentResponse">
|
||||
<wsdl:part name="message" type="xsd:string"></wsdl:part>
|
||||
</wsdl:message>
|
||||
<wsdl:message name="setErledigtRequest">
|
||||
<wsdl:part name="notiz_id" type="xsd:string"></wsdl:part>
|
||||
<wsdl:part name="erledigt" type="xsd:boolean"></wsdl:part>
|
||||
@@ -66,6 +74,10 @@ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
|
||||
<wsdl:input message="tns:deleteNotizRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:deleteNotizResponse"></wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="deleteDokument">
|
||||
<wsdl:input message="tns:deleteDokumentRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:deleteDokumentResponse"></wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="setErledigt">
|
||||
<wsdl:input message="tns:setErledigtRequest"></wsdl:input>
|
||||
<wsdl:output message="tns:setErledigtResponse"></wsdl:output>
|
||||
@@ -92,6 +104,15 @@ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
|
||||
<soap:body use="encoded" namespace="http://www.technikum-wien.at/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="deleteDokument">
|
||||
<soap:operation soapAction="<?php echo APP_ROOT."soap/deleteDokument";?>" />
|
||||
<wsdl:input>
|
||||
<soap:body use="encoded" namespace="http://www.technikum-wien.at/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="encoded" namespace="http://www.technikum-wien.at/soap/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="setErledigt">
|
||||
<soap:operation soapAction="<?php echo APP_ROOT."soap/setErledigt";?>" />
|
||||
<wsdl:input>
|
||||
|
||||
+28
-3
@@ -2621,7 +2621,7 @@ if(!$result = @$db->db_query("SELECT pflicht FROM public.tbl_dokumentstudiengang
|
||||
}
|
||||
|
||||
// Spalten zgvnation, zgvmanation, zgvdoktornation in public.tbl_prestudent
|
||||
if(!$result = @$db->db_query("SELECT pflicht FROM public.tbl_prestudent LIMIT 1"))
|
||||
if(!$result = @$db->db_query("SELECT zgvnation FROM public.tbl_prestudent LIMIT 1"))
|
||||
{
|
||||
$qry = "ALTER TABLE public.tbl_prestudent ADD COLUMN zgvnation character varying(3);
|
||||
ALTER TABLE public.tbl_prestudent ADD COLUMN zgvmanation character varying(3) ;
|
||||
@@ -2826,6 +2826,30 @@ if($result = @$db->db_query("SELECT * FROM information_schema.role_table_grants
|
||||
}
|
||||
}
|
||||
|
||||
// Dokumentenupload für Notizen
|
||||
if(!$result = @$db->db_query("SELECT 1 FROM public.tbl_notiz_dokument LIMIT 1;"))
|
||||
{
|
||||
$qry = "
|
||||
|
||||
CREATE TABLE public.tbl_notiz_dokument
|
||||
(
|
||||
notiz_id integer NOT NULL,
|
||||
dms_id integer NOT NULL
|
||||
);
|
||||
|
||||
ALTER TABLE public.tbl_notiz_dokument ADD CONSTRAINT fk_notiz_dokument_notiz FOREIGN KEY (notiz_id) REFERENCES public.tbl_notiz (notiz_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
||||
ALTER TABLE public.tbl_notiz_dokument ADD CONSTRAINT fk_notiz_dokument_dms FOREIGN KEY (dms_id) REFERENCES campus.tbl_dms (dms_id) ON UPDATE CASCADE ON DELETE CASCADE;
|
||||
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_notiz_dokument TO vilesci;
|
||||
GRANT SELECT, INSERT, UPDATE, DELETE ON public.tbl_notiz_dokument TO web;
|
||||
";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>Dokumentenupload fuer Notizen: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo ' Tabellen fuer Dokumentenupload fuer Notizen hinzugefuegt!<br>';
|
||||
}
|
||||
|
||||
echo '<br><br><br>';
|
||||
|
||||
$tabellen=array(
|
||||
@@ -3003,7 +3027,8 @@ $tabellen=array(
|
||||
"public.tbl_mitarbeiter" => array("mitarbeiter_uid","personalnummer","telefonklappe","kurzbz","lektor","fixangestellt","bismelden","stundensatz","ausbildungcode","ort_kurzbz","standort_id","anmerkung","insertamum","insertvon","updateamum","updatevon","ext_id","kleriker"),
|
||||
"public.tbl_notiz" => array("notiz_id","titel","text","verfasser_uid","bearbeiter_uid","start","ende","erledigt","insertamum","insertvon","updateamum","updatevon","ext_id"),
|
||||
"public.tbl_notizzuordnung" => array("notizzuordnung_id","notiz_id","projekt_kurzbz","projektphase_id","projekttask_id","uid","person_id","prestudent_id","bestellung_id","lehreinheit_id","ext_id","anrechnung_id"),
|
||||
"public.tbl_ort" => array("ort_kurzbz","bezeichnung","planbezeichnung","max_person","lehre","reservieren","aktiv","lageplan","dislozierung","kosten","ausstattung","updateamum","updatevon","insertamum","insertvon","ext_id","stockwerk","standort_id","telefonklappe","content_id","m2","gebteil","oe_kurzbz"),
|
||||
"public.tbl_notiz_dokument" => array("notiz_id","dms_id"),
|
||||
"public.tbl_ort" => array("ort_kurzbz","bezeichnung","planbezeichnung","max_person","lehre","reservieren","aktiv","lageplan","dislozierung","kosten","ausstattung","updateamum","updatevon","insertamum","insertvon","ext_id","stockwerk","standort_id","telefonklappe","content_id","m2","gebteil","oe_kurzbz"),
|
||||
"public.tbl_ortraumtyp" => array("ort_kurzbz","hierarchie","raumtyp_kurzbz"),
|
||||
"public.tbl_organisationseinheit" => array("oe_kurzbz", "oe_parent_kurzbz", "bezeichnung","organisationseinheittyp_kurzbz", "aktiv","mailverteiler","freigabegrenze","kurzzeichen","lehre"),
|
||||
"public.tbl_organisationseinheittyp" => array("organisationseinheittyp_kurzbz", "bezeichnung", "beschreibung"),
|
||||
@@ -3019,7 +3044,7 @@ $tabellen=array(
|
||||
"public.tbl_preoutgoing_lehrveranstaltung" => array("preoutgoing_lehrveranstaltung_id","preoutgoing_id","bezeichnung","ects","endversion","insertamum","insertvon","updateamum","updatevon","wochenstunden","unitcode"),
|
||||
"public.tbl_preoutgoing_preoutgoing_status" => array("status_id","preoutgoing_status_kurzbz","preoutgoing_id","datum","insertamum","insertvon","updateamum","updatevon"),
|
||||
"public.tbl_preoutgoing_status" => array("preoutgoing_status_kurzbz","bezeichnung"),
|
||||
"public.tbl_prestudent" => array("prestudent_id","aufmerksamdurch_kurzbz","person_id","studiengang_kz","berufstaetigkeit_code","ausbildungcode","zgv_code","zgvort","zgvdatum","zgvmas_code","zgvmaort","zgvmadatum","aufnahmeschluessel","facheinschlberuf","reihungstest_id","anmeldungreihungstest","reihungstestangetreten","rt_gesamtpunkte","rt_punkte1","rt_punkte2","bismelden","anmerkung","dual","insertamum","insertvon","updateamum","updatevon","ext_id","ausstellungsstaat","rt_punkte3", "zgvdoktor_code", "zgvdoktorort", "zgvdoktordatum","mentor"),
|
||||
"public.tbl_prestudent" => array("prestudent_id","aufmerksamdurch_kurzbz","person_id","studiengang_kz","berufstaetigkeit_code","ausbildungcode","zgv_code","zgvort","zgvdatum","zgvmas_code","zgvmaort","zgvmadatum","aufnahmeschluessel","facheinschlberuf","reihungstest_id","anmeldungreihungstest","reihungstestangetreten","rt_gesamtpunkte","rt_punkte1","rt_punkte2","bismelden","anmerkung","dual","insertamum","insertvon","updateamum","updatevon","ext_id","ausstellungsstaat","rt_punkte3", "zgvdoktor_code", "zgvdoktorort", "zgvdoktordatum","mentor","zgvnation","zgvmanation","zgvdoktornation"),
|
||||
"public.tbl_prestudentstatus" => array("prestudent_id","status_kurzbz","studiensemester_kurzbz","ausbildungssemester","datum","orgform_kurzbz","insertamum","insertvon","updateamum","updatevon","ext_id","studienplan_id","bestaetigtam","bestaetigtvon","fgm","faktiv", "anmerkung"),
|
||||
"public.tbl_raumtyp" => array("raumtyp_kurzbz","beschreibung"),
|
||||
"public.tbl_reihungstest" => array("reihungstest_id","studiengang_kz","ort_kurzbz","anmerkung","datum","uhrzeit","updateamum","updatevon","insertamum","insertvon","ext_id","freigeschaltet","max_teilnehmer","oeffentlich"),
|
||||
|
||||
@@ -211,7 +211,7 @@ class MySabre_CalDAV_Backend extends \Sabre\CalDAV\Backend\AbstractBackend
|
||||
foreach($val as $row)
|
||||
{
|
||||
//einzelnen Eintrag holen
|
||||
if($row['dtstart']==$dtstart && $row['unr'][0]==$unr)
|
||||
if($row['dtstart']==$dtstart && ($row['unr'][0]==$unr) || $unr=='R'.$row['reservierung_id'])
|
||||
{
|
||||
return $row;
|
||||
}
|
||||
@@ -221,6 +221,7 @@ class MySabre_CalDAV_Backend extends \Sabre\CalDAV\Backend\AbstractBackend
|
||||
$data=array_merge($data, $val);
|
||||
}
|
||||
$endtime = microtime(true);
|
||||
//error_log("\n\nDATA".print_r($data,true));
|
||||
//error_log("getCalendarData time:".($endtime-$starttime));
|
||||
//$data.="\nEND:VCALENDAR";
|
||||
return $data;
|
||||
@@ -280,9 +281,16 @@ END:VTIMEZONE\n".$event."\nEND:VCALENDAR";
|
||||
$return = array();
|
||||
foreach($data as $row)
|
||||
{
|
||||
// Reservierungen werden mit einem R markiert und mit der ReservierungID da sonst
|
||||
// Termine verloren gehen koennen wenn zur selben Zeit eine Reservierung und ein LVPlan Eintrag vorhanden ist
|
||||
if($row['reservierung'])
|
||||
$uri = $row['dtstart'].'-R'.$row['reservierung_id'];
|
||||
else
|
||||
$uri = $row['dtstart'].'-'.$row['unr'][0];
|
||||
|
||||
$return[] = array("id"=>$row['UID'],
|
||||
"calendardata"=>$this->makeCal($row['data']),
|
||||
"uri"=>$row['dtstart'].'-'.$row['unr'][0],
|
||||
"uri"=>$uri,
|
||||
"lastmodified"=>$row['updateamum'],
|
||||
"etag"=>'"'.$row['UID'].'"',
|
||||
"calendarid"=>$calendarId);
|
||||
|
||||
Reference in New Issue
Block a user