mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
- Kandidaten für die Kollegiumswahl hinzugefügt
- News löschen wird nun mitgeloggt - Erweiterungen kreuzerltool - Erweiterungen Sync Scripte - Erweiterungen Kreuzerltool
This commit is contained in:
@@ -37,6 +37,10 @@ class beispiel
|
||||
var $insertamum; // timestamp
|
||||
var $insertvon; // varchar(16)
|
||||
|
||||
var $student_uid;
|
||||
var $vorbereitet;
|
||||
var $probleme;
|
||||
|
||||
// *************************************************************************
|
||||
// * Konstruktor - Uebergibt die Connection und laedt optional ein beispiel
|
||||
// * @param $conn Datenbank-Connection
|
||||
@@ -274,6 +278,30 @@ class beispiel
|
||||
}
|
||||
}
|
||||
|
||||
function studentbeispiel_exists($uid,$beispiel_id)
|
||||
{
|
||||
if(!is_numeric($beispiel_id))
|
||||
{
|
||||
$this->errormsg = 'Beispiel_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "SELECT vorbereitet FROM campus.tbl_studentbeispiel WHERE beispiel_id='$beispiel_id' AND student_uid='".addslashes($uid)."'";
|
||||
|
||||
if($result = pg_query($this->conn, $qry))
|
||||
{
|
||||
if(pg_num_rows($result)>0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim lesen der aus der DB';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function delete($beispiel_id)
|
||||
{
|
||||
if(!is_numeric($beispiel_id))
|
||||
@@ -292,5 +320,101 @@ class beispiel
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function load_studentbeispiel($uid, $beispiel_id)
|
||||
{
|
||||
if(!is_numeric($beispiel_id))
|
||||
{
|
||||
$this->errormsg = 'Beispiel_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
$qry = "SELECT * FROM campus.tbl_studentbeispiel WHERE student_uid='$uid' AND beispiel_id='$beispiel_id'";
|
||||
|
||||
if($result = pg_query($this->conn, $qry))
|
||||
{
|
||||
if($row = pg_fetch_object($result))
|
||||
{
|
||||
$this->beispiel_id = $row->beispiel_id;
|
||||
$this->student_uid = $row->student_uid;
|
||||
$this->vorbereitet = ($row->vorbereitet=='t'?true:false);
|
||||
$this->probleme = ($row->probleme=='t'?true:false);
|
||||
$this->updateamum = $row->updateamum;
|
||||
$this->udpatevon = $row->updatevon;
|
||||
$this->insertamum = $row->insertamum;
|
||||
$this->insertvon = $row->insertvon;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim laden des Student_Beispiels';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim laden des Student_Beispiels';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// **
|
||||
// * Prueft die studentbeispiel Daten auf gueltigkeit
|
||||
// *
|
||||
function studentbeispiel_validate()
|
||||
{
|
||||
if(!is_numeric($this->beispiel_id))
|
||||
{
|
||||
$this->errormsg = 'Beispiel_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// **
|
||||
// * Speichert einen Studentbeispiel Datensatz in die DB
|
||||
// *
|
||||
// *
|
||||
function studentbeispiel_save($new=null)
|
||||
{
|
||||
if(is_null($new))
|
||||
$new = $this->new;
|
||||
|
||||
//Variablen auf Gueltigkeit pruefen
|
||||
if(!$this->studentbeispiel_validate())
|
||||
return false;
|
||||
|
||||
if($new)
|
||||
{
|
||||
$qry = 'INSERT INTO campus.tbl_studentbeispiel(student_uid, beispiel_id, vorbereitet, probleme,
|
||||
updateamum, updatevon, insertamum, insertvon) VALUES('.
|
||||
$this->addslashes($this->student_uid).','.
|
||||
$this->addslashes($this->beispiel_id).','.
|
||||
$this->addslashes($this->vorbereitet).','.
|
||||
$this->addslashes($this->probleme).','.
|
||||
$this->addslashes($this->updateamum).','.
|
||||
$this->addslashes($this->updatevon).','.
|
||||
$this->addslashes($this->insertamum).','.
|
||||
$this->addslashes($this->insertvon).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry = 'UPDATE campus.tbl_studentbeispiel SET'.
|
||||
' vorbereitet='.$this->addslashes($this->vorbereitet).','.
|
||||
' probleme='.$this->addslashes($this->probleme).','.
|
||||
' updateamum='.$this->addslashes($this->updateamum).','.
|
||||
' updatevon='.$this->addslashes($this->updatevon).
|
||||
" WHERE beispiel_id=".$this->beispiel_id." AND student_uid=".$this->addslashes($this->student_uid).';';
|
||||
}
|
||||
|
||||
if(pg_query($this->conn,$qry))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Speichern des Beispiels';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -46,6 +46,7 @@ class lehreinheit
|
||||
var $insertvon; // varchar(16)
|
||||
var $updateamum; // timestamp
|
||||
var $updatevon; // varchar(16)
|
||||
var $sprache; // varchar(16)
|
||||
var $ext_id; // bigint
|
||||
|
||||
// *************************************************************************
|
||||
@@ -105,6 +106,7 @@ class lehreinheit
|
||||
$this->anmerkung = $row->anmerkung;
|
||||
$this->unr = $row->unr;
|
||||
$this->lvnr = $row->lvnr;
|
||||
$this->sprache = $row->sprache;
|
||||
$this->insertamum = $row->insertamum;
|
||||
$this->insertvon = $row->insertvon;
|
||||
$this->updateamum = $row->updateamum;
|
||||
@@ -143,6 +145,7 @@ class lehreinheit
|
||||
$le_obj->anmerkung = $row->anmerkung;
|
||||
$le_obj->unr = $row->unr;
|
||||
$le_obj->lvnr = $row->lvnr;
|
||||
$le_obj->sprache = $row->sprache;
|
||||
$le_obj->insertamum = $row->insertamum;
|
||||
$le_obj->insertvon = $row->insertvon;
|
||||
$le_obj->updateamum = $row->updateamum;
|
||||
@@ -293,7 +296,7 @@ class lehreinheit
|
||||
//ToDo ID entfernen
|
||||
$qry = 'INSERT INTO lehre.tbl_lehreinheit (lehrveranstaltung_id, studiensemester_kurzbz,
|
||||
lehrfach_id, lehrform_kurzbz, stundenblockung, wochenrythmus,
|
||||
start_kw, raumtyp, raumtypalternativ, lehre, anmerkung, unr, lvnr, insertamum, insertvon, updateamum, updatevon, ext_id)
|
||||
start_kw, raumtyp, raumtypalternativ, lehre, anmerkung, unr, lvnr, insertamum, insertvon, updateamum, updatevon, ext_id, sprache)
|
||||
VALUES('.$this->addslashes($this->lehrveranstaltung_id).','.
|
||||
$this->addslashes($this->studiensemester_kurzbz).','.
|
||||
$this->addslashes($this->lehrfach_id).','.
|
||||
@@ -311,7 +314,8 @@ class lehreinheit
|
||||
$this->addslashes($this->insertvon).','.
|
||||
$this->addslashes($this->updateamum).','.
|
||||
$this->addslashes($this->updatevon).','.
|
||||
$this->addslashes($this->ext_id).');';
|
||||
$this->addslashes($this->ext_id).','.
|
||||
$this->addslashes($this->sprache).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -331,6 +335,7 @@ class lehreinheit
|
||||
' lvnr='.$this->addslashes($this->lvnr).','.
|
||||
' updateamum='.$this->addslashes($this->updateamum).','.
|
||||
' updatevon='.$this->addslashes($this->updatevon).','.
|
||||
' sprache='.$this->addslashes($this->sprache).','.
|
||||
' ext_id='.$this->addslashes($this->ext_id).
|
||||
" WHERE lehreinheit_id=".$this->addslashes($this->lehreinheit_id).";";
|
||||
}
|
||||
|
||||
@@ -35,6 +35,7 @@ class lehreinheitmitarbeiter
|
||||
var $stundensatz; // numeric(6,2)
|
||||
var $faktor; // numeric(2,1)
|
||||
var $anmerkung; // varchar(256)
|
||||
var $lehrfunktion_kurzbz; // varchar(16)
|
||||
|
||||
// *************************************************************************
|
||||
// * Konstruktor - Uebergibt die Connection und laedt optional eine LE
|
||||
@@ -112,14 +113,15 @@ class lehreinheitmitarbeiter
|
||||
{
|
||||
//ToDo ID entfernen
|
||||
$qry = 'INSERT INTO lehre.tbl_lehreinheitmitarbeiter (lehreinheit_id, mitarbeiter_uid, semesterstunden, planstunden,
|
||||
stundensatz, faktor, anmerkung)
|
||||
stundensatz, faktor, anmerkung, lehrfunktion_kurzbz)
|
||||
VALUES('.$this->addslashes($this->lehreinheit_id).','.
|
||||
$this->addslashes($this->mitarbeiter_uid).','.
|
||||
$this->addslashes($this->semesterstunden).','.
|
||||
$this->addslashes($this->planstunden).','.
|
||||
$this->addslashes($this->stundensatz).','.
|
||||
$this->addslashes($this->faktor).','.
|
||||
$this->addslashes($this->anmerkung).');';
|
||||
$this->addslashes($this->anmerkung).','.
|
||||
$this->addslashes($this->lehrfunktion_kurzbz).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -129,6 +131,7 @@ class lehreinheitmitarbeiter
|
||||
' stundensatz='.$this->addslashes($this->stundensatz).','.
|
||||
' faktor='.$this->addslashes($this->faktor).','.
|
||||
' anmerkung='.$this->addslashes($this->anmerkung).','.
|
||||
' lehrfunktion_kurzbz='.$this->addslashes($this->lehrfunktion_kurzbz).
|
||||
" WHERE lehreinheit_id=".$this->addslashes($this->lehreinheit_id)." AND
|
||||
mitarbeiter_uid=".$this->addslashes($this->mitarbeiter_uid).";";
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ class student extends benutzer
|
||||
$this->addslashes($this->prestudent_id).','.
|
||||
$this->studiengang_kz.','.
|
||||
$this->semester.','.
|
||||
$this->ext_id_student.','.
|
||||
($this->ext_id_student!=''?$this->ext_id_student:'null').','.
|
||||
($this->verband!=''?"'".addslashes($this->verband)."'":' ').','.
|
||||
($this->gruppe!=''?"'".addslashes($this->gruppe)."'":' ').');';
|
||||
}
|
||||
@@ -198,7 +198,7 @@ class student extends benutzer
|
||||
' prestudent_id='.$this->addslashes($this->prestudent_id).','.
|
||||
' studiengang_kz='.$this->studiengang_kz.','.
|
||||
' semester='.$this->semester.','.
|
||||
' ext_id='.$this->ext_id_student;
|
||||
' ext_id='.($this->ext_id_student!=''?$this->ext_id_student:'null').','.
|
||||
' verband='.$this->addslashes($this->verband).','.
|
||||
' gruppe='.$this->addslashes($this->gruppe).
|
||||
" WHERE student_uid='".addslashes($this->uid)."';";
|
||||
|
||||
Reference in New Issue
Block a user