mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
Merge branch 'master' of https://github.com/FH-Complete/FHC-Core
This commit is contained in:
@@ -22,22 +22,27 @@ require_once('../../config/vilesci.config.inc.php');
|
||||
|
||||
?>
|
||||
|
||||
var global_year;
|
||||
var global_url;
|
||||
var global_year;
|
||||
var global_url;
|
||||
|
||||
function getProperties()
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var tree=document.getElementById('tree-projektmenue');
|
||||
|
||||
|
||||
// Wenn auf die Ueberschrift geklickt wird, soll nix passieren
|
||||
if(tree.currentIndex==-1)
|
||||
{
|
||||
alert("Kein gültiges Projekt ausgewählt!");
|
||||
return;
|
||||
}
|
||||
projekt_kurzbz=getTreeCellText(tree, "treecol-projektmenue-projekt_kurzbz", tree.currentIndex);
|
||||
|
||||
if(typeof(ProjektSelectKurzbz)!='undefined')
|
||||
projekt_kurzbz = ProjektSelectKurzbz;
|
||||
else
|
||||
{
|
||||
alert("Kein gültiges Projekt ausgewählt!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
projekt_kurzbz=getTreeCellText(tree, "treecol-projektmenue-projekt_kurzbz", tree.currentIndex);
|
||||
}
|
||||
|
||||
function showStudienjahr()
|
||||
@@ -47,27 +52,35 @@ function showStudienjahr()
|
||||
{
|
||||
var datumAktuell = new Date();
|
||||
var jahrAktuell = datumAktuell.getFullYear();
|
||||
global_year = jahrAktuell;
|
||||
global_year = jahrAktuell;
|
||||
}
|
||||
|
||||
var tree=document.getElementById('tree-projektmenue');
|
||||
// Wenn auf die Ueberschrift geklickt wird, soll nix passieren
|
||||
if(tree.currentIndex==-1)
|
||||
{
|
||||
alert("Kein gültiges Projekt ausgewählt!");
|
||||
return;
|
||||
}
|
||||
projekt_kurzbz=getTreeCellText(tree, "treecol-projektmenue-projekt_kurzbz", tree.currentIndex);
|
||||
if(typeof(ProjektSelectKurzbz)!='undefined')
|
||||
projekt_kurzbz = ProjektSelectKurzbz;
|
||||
else
|
||||
{
|
||||
alert("Kein gültiges Projekt ausgewählt!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
projekt_kurzbz=getTreeCellText(tree, "treecol-projektmenue-projekt_kurzbz", tree.currentIndex);
|
||||
}
|
||||
if(projekt_kurzbz == '')
|
||||
{
|
||||
oe_kurzbz = getTreeCellText(tree, "treecol-projektmenue-oe", tree.currentIndex);
|
||||
oe_kurzbz = getTreeCellText(tree, "treecol-projektmenue-oe", tree.currentIndex);
|
||||
var url = 'projekt/gantt.svg.php?oe='+oe_kurzbz+'&studienjahr='+(global_year-1)+'&ansicht=studienjahr';
|
||||
global_url=url;
|
||||
global_url=url;
|
||||
}
|
||||
else
|
||||
{
|
||||
var url = 'projekt/gantt.svg.php?projekt='+projekt_kurzbz+'&studienjahr='+(global_year-1)+'&ansicht=studienjahr';
|
||||
global_url = url;
|
||||
global_url = url;
|
||||
}
|
||||
|
||||
document.getElementById('iframe-gant-projekt').contentWindow.location.href=url;
|
||||
@@ -79,33 +92,40 @@ function showKalenderjahr()
|
||||
{
|
||||
var datumAktuell = new Date();
|
||||
var jahrAktuell = datumAktuell.getFullYear();
|
||||
global_year = jahrAktuell;
|
||||
global_year = jahrAktuell;
|
||||
}
|
||||
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var tree=document.getElementById('tree-projektmenue');
|
||||
|
||||
|
||||
// Wenn auf die Ueberschrift geklickt wird, soll nix passieren
|
||||
if(tree.currentIndex==-1)
|
||||
{
|
||||
alert("Kein gültiges Projekt ausgewählt!");
|
||||
return;
|
||||
}
|
||||
projekt_kurzbz=getTreeCellText(tree, "treecol-projektmenue-projekt_kurzbz", tree.currentIndex);
|
||||
if(typeof(ProjektSelectKurzbz)!='undefined')
|
||||
projekt_kurzbz = ProjektSelectKurzbz;
|
||||
else
|
||||
{
|
||||
alert("Kein gültiges Projekt ausgewählt!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
projekt_kurzbz=getTreeCellText(tree, "treecol-projektmenue-projekt_kurzbz", tree.currentIndex);
|
||||
|
||||
if(projekt_kurzbz == '')
|
||||
{
|
||||
oe_kurzbz = getTreeCellText(tree, "treecol-projektmenue-oe", tree.currentIndex);
|
||||
oe_kurzbz = getTreeCellText(tree, "treecol-projektmenue-oe", tree.currentIndex);
|
||||
var url = 'projekt/gantt.svg.php?oe='+oe_kurzbz+'&studienjahr='+global_year+'&ansicht=kalenderjahr';
|
||||
global_url = url;
|
||||
global_url = url;
|
||||
}
|
||||
else
|
||||
{
|
||||
var url = 'projekt/gantt.svg.php?projekt='+projekt_kurzbz+'&studienjahr='+global_year+'&ansicht=kalenderjahr';
|
||||
global_url = url;
|
||||
global_url = url;
|
||||
}
|
||||
|
||||
global_url = url;
|
||||
document.getElementById('iframe-gant-projekt').contentWindow.location.href=url;
|
||||
document.getElementById('iframe-gant-projekt').contentWindow.location.href=url;
|
||||
}
|
||||
|
||||
function showZeitraum(beginn, ende)
|
||||
@@ -114,36 +134,36 @@ function showZeitraum(beginn, ende)
|
||||
{
|
||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||
var tree=document.getElementById('tree-projektmenue');
|
||||
|
||||
|
||||
// Wenn auf die Ueberschrift geklickt wird, soll nix passieren
|
||||
if(tree.currentIndex==-1)
|
||||
{
|
||||
alert("Kein gültiges Projekt ausgewählt!");
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
projekt_kurzbz=getTreeCellText(tree, "treecol-projektmenue-projekt_kurzbz", tree.currentIndex);
|
||||
if(projekt_kurzbz == '')
|
||||
{
|
||||
oe_kurzbz = getTreeCellText(tree, "treecol-projektmenue-oe", tree.currentIndex);
|
||||
oe_kurzbz = getTreeCellText(tree, "treecol-projektmenue-oe", tree.currentIndex);
|
||||
var url = 'projekt/gantt.svg.php?oe='+oe_kurzbz+'&beginn='+beginn+'&ende='+ende;
|
||||
global_url = url;
|
||||
global_url = url;
|
||||
}
|
||||
|
||||
global_url = url;
|
||||
document.getElementById('iframe-gant-projekt').contentWindow.location.href=url;
|
||||
document.getElementById('iframe-gant-projekt').contentWindow.location.href=url;
|
||||
}
|
||||
else
|
||||
alert('kein gültiges Datum eingetragen');
|
||||
|
||||
|
||||
}
|
||||
|
||||
function showYear()
|
||||
{
|
||||
var datumAktuell = new Date();
|
||||
var jahrAktuell = datumAktuell.getFullYear();
|
||||
global_year = jahrAktuell;
|
||||
|
||||
global_year = jahrAktuell;
|
||||
|
||||
foo = document.getElementById('toolbarbutton-menuitem-gantt-kalenderjahr');
|
||||
checked=foo.getAttribute('checked');
|
||||
// kalenderjahr checked
|
||||
@@ -207,7 +227,7 @@ function showYearPlus()
|
||||
}
|
||||
|
||||
function printGantt()
|
||||
{
|
||||
{
|
||||
foo = window.open(global_url);
|
||||
foo.onload = function ()
|
||||
{
|
||||
|
||||
@@ -63,7 +63,7 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/projekt/projektdetail.overlay.xul.
|
||||
<!-- ************* -->
|
||||
<!-- Bem.: style="visibility:collapse" versteckt eine Spalte -->
|
||||
<tree id="tree-projekt" seltype="single" hidecolumnpicker="false" flex="1"
|
||||
datasources="../../rdf/projekt.rdf.php?foo=<?php echo time(); ?>" ref="http://www.technikum-wien.at/projekt/alle-projekte"
|
||||
datasources="../rdf/projekt.rdf.php?nocache=<?php echo time(); ?>" ref="http://www.technikum-wien.at/projekt/alle-projekte"
|
||||
style="margin:0px;height:250px" enableColumnDrag="true"
|
||||
onselect="onselectProjekt(this);"
|
||||
persist="height"
|
||||
@@ -154,5 +154,5 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/projekt/projektdetail.overlay.xul.
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</overlay>
|
||||
|
||||
@@ -398,6 +398,8 @@ function StudentAbschlusspruefungAuswahl()
|
||||
document.getElementById('student-abschlusspruefung-menulist-notekommpruef').value=notekommpruef;
|
||||
document.getElementById('student-abschlusspruefung-menulist-akadgrad').value=akadgrad_id;
|
||||
document.getElementById('student-abschlusspruefung-datum-datum').value=datum;
|
||||
if(uhrzeit=='')
|
||||
uhrzeit='00:00';
|
||||
document.getElementById('student-abschlusspruefung-datum-uhrzeit').value=uhrzeit;
|
||||
document.getElementById('student-abschlusspruefung-datum-sponsion').value=sponsion;
|
||||
document.getElementById('student-abschlusspruefung-menulist-typ').value=pruefungstyp_kurzbz;
|
||||
|
||||
+79
-78
@@ -43,7 +43,7 @@ class mantis extends basis_db
|
||||
public $issue_summary; //Zusammendassung
|
||||
public $issue_reproducibility; //Reproduzierbar
|
||||
public $issue_date_submitted; //Meldungsdatum
|
||||
public $issue_sponsorship_total;
|
||||
public $issue_sponsorship_total;
|
||||
public $issue_projection; //Projektion
|
||||
public $issue_eta; //Aufwand
|
||||
public $issue_resolution; //Lösung
|
||||
@@ -52,10 +52,11 @@ class mantis extends basis_db
|
||||
public $issue_due_date;
|
||||
public $issue_steps_to_reproduce;
|
||||
public $issue_additional_information;
|
||||
public $issue_tags;
|
||||
|
||||
public $issue_tags;
|
||||
|
||||
public $soapClient;
|
||||
public $errormsg;
|
||||
public $result=array();
|
||||
|
||||
/**
|
||||
* Konstruktor
|
||||
@@ -71,61 +72,61 @@ class mantis extends basis_db
|
||||
*/
|
||||
public function initSoapClient()
|
||||
{
|
||||
try
|
||||
{
|
||||
$this->soapClient = new SoapClient(MANTIS_PFAD);
|
||||
try
|
||||
{
|
||||
$this->soapClient = new SoapClient(MANTIS_PFAD);
|
||||
}
|
||||
catch (Exception $e)
|
||||
{
|
||||
{
|
||||
echo $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @param type $issue_tags
|
||||
* @return type
|
||||
*/
|
||||
public function setTags($issue_tags)
|
||||
{
|
||||
|
||||
$tags = array();
|
||||
|
||||
$tags = array();
|
||||
$tags_array = explode(',', $issue_tags);
|
||||
|
||||
// Hole alle Tags
|
||||
$params_tags=array('username' => MANTIS_USERNAME, 'password' => MANTIS_PASSWORT, 'page_number'=>1, 'per_page'=>20);
|
||||
$result_tags = $this->soapClient->__soapCall('mc_tag_get_all',$params_tags);
|
||||
|
||||
|
||||
$test = array();
|
||||
$test = $result_tags->results;
|
||||
|
||||
|
||||
|
||||
$test = array();
|
||||
$test = $result_tags->results;
|
||||
|
||||
|
||||
foreach($tags_array as $t)
|
||||
{
|
||||
$tags_help = new stdClass();
|
||||
$tags_help->name = trim($t);
|
||||
|
||||
$tags_help->name = trim($t);
|
||||
|
||||
foreach($result_tags->results as $rt)
|
||||
{
|
||||
|
||||
if($rt->name == $tags_help->name)
|
||||
{
|
||||
$tags_help->id = $rt->id;
|
||||
$tags_help->id = $rt->id;
|
||||
}
|
||||
|
||||
}
|
||||
//$tags_help->id = 10;
|
||||
$tags[] = $tags_help;
|
||||
//$tags_help->id = 10;
|
||||
$tags[] = $tags_help;
|
||||
}
|
||||
|
||||
|
||||
$params=array('username' => MANTIS_USERNAME, 'password' => MANTIS_PASSWORT,'issue_id' =>$this->issue_id, $tags);
|
||||
$result = $this->soapClient->__soapCall('mc_issue_set_tags',$params);
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Ticket Update
|
||||
*/
|
||||
@@ -140,13 +141,13 @@ class mantis extends basis_db
|
||||
'priority'=>array('id'=>$this->issue_priority->id),
|
||||
'additional_information'=>$this->issue_additional_information,
|
||||
'reporter'=>array('id'=>$this->issue_reporter_id),
|
||||
);
|
||||
);
|
||||
|
||||
$params=array('username' => MANTIS_USERNAME, 'password' => MANTIS_PASSWORT,'issueId' => $this->issue_id, $issue);
|
||||
$result = $this->soapClient->__soapCall('mc_issue_update',$params);
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Neues Ticket anlegen
|
||||
*/
|
||||
@@ -161,84 +162,84 @@ class mantis extends basis_db
|
||||
'priority'=>array('id'=>$this->issue_priority->id),
|
||||
'additional_information'=>$this->issue_additional_information,
|
||||
);
|
||||
|
||||
|
||||
$params=array('username' => MANTIS_USERNAME, 'password' => MANTIS_PASSWORT, $issue);
|
||||
$result = $this->soapClient->__soapCall('mc_issue_add',$params);
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Ticket holen
|
||||
*/
|
||||
public function getIssue($issue_id=1)
|
||||
{
|
||||
try
|
||||
try
|
||||
{
|
||||
$params=array('username' => MANTIS_USERNAME, 'password' => MANTIS_PASSWORT,'issue_id' => $issue_id);
|
||||
$result = $this->soapClient->__soapCall('mc_issue_get',$params);
|
||||
|
||||
$this->issue_id = $result->id;
|
||||
|
||||
$this->issue_id = $result->id;
|
||||
$this->issue_view_state = new stdclass();
|
||||
$this->issue_view_state->id = $result->view_state->id;
|
||||
$this->issue_view_state->name = $result->view_state->name;
|
||||
$this->issue_last_updated = $result->last_updated;
|
||||
$this->issue_view_state->id = $result->view_state->id;
|
||||
$this->issue_view_state->name = $result->view_state->name;
|
||||
$this->issue_last_updated = $result->last_updated;
|
||||
$this->issue_project = new stdclass();
|
||||
$this->issue_project->id = $result->project->id;
|
||||
$this->issue_project->name = $result->project->name;
|
||||
$this->issue_category = $result->category;
|
||||
$this->issue_project->id = $result->project->id;
|
||||
$this->issue_project->name = $result->project->name;
|
||||
$this->issue_category = $result->category;
|
||||
$this->issue_priority = new stdclass();
|
||||
$this->issue_priority->id = $result->priority->id;
|
||||
$this->issue_priority->name = $result->priority->name;
|
||||
$this->issue_priority->name = $result->priority->name;
|
||||
$this->issue_severity = new stdclass();
|
||||
$this->issue_severity->id = $result->severity->id;
|
||||
$this->issue_severity->name = $result->severity->name;
|
||||
$this->issue_severity->id = $result->severity->id;
|
||||
$this->issue_severity->name = $result->severity->name;
|
||||
$this->issue_status = new stdclass();
|
||||
$this->issue_status->id = $result->status->id;
|
||||
$this->issue_status->name = $result->status->name;
|
||||
$this->issue_status->id = $result->status->id;
|
||||
$this->issue_status->name = $result->status->name;
|
||||
$this->issue_reporter = new stdclass();
|
||||
$this->issue_reporter->id = $result->reporter->id;
|
||||
$this->issue_reporter->name = $result->reporter->name;
|
||||
$this->issue_reporter->real_name = $result->reporter->real_name;
|
||||
$this->issue_reporter->email = $result->reporter->email;
|
||||
$this->issue_summary = $result->summary;
|
||||
$this->issue_reporter->id = $result->reporter->id;
|
||||
$this->issue_reporter->name = $result->reporter->name;
|
||||
$this->issue_reporter->real_name = $result->reporter->real_name;
|
||||
$this->issue_reporter->email = $result->reporter->email;
|
||||
$this->issue_summary = $result->summary;
|
||||
$this->issue_reproducibility = new stdclass();
|
||||
$this->issue_reproducibility->id = $result->reproducibility->id;
|
||||
$this->issue_reproducibility->name = $result->reproducibility->name;
|
||||
$this->issue_date_submitted = $result->date_submitted;
|
||||
$this->issue_sponsorship_total = $result->sponsorship_total;
|
||||
$this->issue_reproducibility->name = $result->reproducibility->name;
|
||||
$this->issue_date_submitted = $result->date_submitted;
|
||||
$this->issue_sponsorship_total = $result->sponsorship_total;
|
||||
$this->issue_projection = new stdclass();
|
||||
$this->issue_projection->id = $result->projection->id;
|
||||
$this->issue_projection->name = $result->projection->name;
|
||||
$this->issue_projection->id = $result->projection->id;
|
||||
$this->issue_projection->name = $result->projection->name;
|
||||
$this->issue_eta = new stdclass();
|
||||
$this->issue_eta->id = $result->eta->id;
|
||||
$this->issue_eta->id = $result->eta->id;
|
||||
$this->issue_eta->name = $result->eta->name;
|
||||
$this->issue_resolution = new stdclass();
|
||||
$this->issue_resolution->id = $result->resolution->id;
|
||||
$this->issue_resolution->name = $result->resolution->name;
|
||||
$this->issue_tags = new stdclass();
|
||||
$anzTags = count($result->tags);
|
||||
$i = 1;
|
||||
$this->issue_resolution->id = $result->resolution->id;
|
||||
$this->issue_resolution->name = $result->resolution->name;
|
||||
$this->issue_tags = new stdclass();
|
||||
$anzTags = count($result->tags);
|
||||
$i = 1;
|
||||
foreach($result->tags as $r)
|
||||
{
|
||||
if($i == $anzTags)
|
||||
$this->issue_tags->name.= $r->name;
|
||||
$this->issue_tags->name.= $r->name;
|
||||
else
|
||||
$this->issue_tags->name.=$r->name.',';
|
||||
|
||||
$i++;
|
||||
$this->issue_tags->name.=$r->name.',';
|
||||
|
||||
$i++;
|
||||
}
|
||||
if($anzTags == 0)
|
||||
$this->issue_tags->name = '';
|
||||
$this->issue_tags->name = '';
|
||||
|
||||
$this->issue_description = $result->description;
|
||||
//$this->issue_attachments = $result->attachments;
|
||||
$this->issue_due_date = $result->due_date;
|
||||
$this->issue_description = $result->description;
|
||||
//$this->issue_attachments = $result->attachments;
|
||||
$this->issue_due_date = $result->due_date;
|
||||
$this->issue_steps_to_reproduce = (isset($result->steps_to_reproduce)?$result->steps_to_reproduce:'');
|
||||
$this->issue_additional_information = (isset($result->additional_information)?$result->additional_information:'');
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (SoapFault $fault)
|
||||
}
|
||||
catch (SoapFault $fault)
|
||||
{
|
||||
$this->errormsg="SOAP-Fehler: ".$fault->faultstring;
|
||||
return false;
|
||||
@@ -254,7 +255,7 @@ class mantis extends basis_db
|
||||
try
|
||||
{
|
||||
$params=array('username' => MANTIS_USERNAME, 'password' => MANTIS_PASSWORT);
|
||||
|
||||
|
||||
$result = $this->soapClient->__soapCall('mc_projects_get_user_accessible',$params);
|
||||
|
||||
foreach($result as $row)
|
||||
@@ -265,7 +266,7 @@ class mantis extends basis_db
|
||||
$obj->issue_project->id = $row->id;
|
||||
|
||||
$this->result[] = $obj;
|
||||
|
||||
|
||||
if(isset($row->subprojects))
|
||||
{
|
||||
foreach($row->subprojects as $row_sub)
|
||||
@@ -274,15 +275,15 @@ class mantis extends basis_db
|
||||
$obj->issue_project = new stdclass();
|
||||
$obj->issue_project->name = $row_sub->name;
|
||||
$obj->issue_project->id = $row_sub->id;
|
||||
|
||||
|
||||
$this->result[] = $obj;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (SoapFault $fault)
|
||||
}
|
||||
catch (SoapFault $fault)
|
||||
{
|
||||
$this->errormsg="SOAP-Fehler: ".$fault->faultstring;
|
||||
return false;
|
||||
@@ -307,8 +308,8 @@ class mantis extends basis_db
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
catch (SoapFault $fault)
|
||||
}
|
||||
catch (SoapFault $fault)
|
||||
{
|
||||
$this->errormsg="SOAP-Fehler: ".$fault->faultstring;
|
||||
return false;
|
||||
|
||||
+110
-111
@@ -17,7 +17,7 @@
|
||||
*
|
||||
* Authors: Karl Burkhart <burkhart@technikum-wien.at>.
|
||||
*/
|
||||
|
||||
|
||||
require_once(dirname(__FILE__).'/basis_db.class.php');
|
||||
|
||||
class ressource extends basis_db
|
||||
@@ -31,13 +31,13 @@ class ressource extends basis_db
|
||||
public $beschreibung; //string
|
||||
public $mitarbeiter_uid; //string
|
||||
public $student_uid; //string
|
||||
public $betriebsmittel_id; //integer
|
||||
public $firma_id; //integer
|
||||
public $betriebsmittel_id; //integer
|
||||
public $firma_id; //integer
|
||||
public $insertamum; //timestamp
|
||||
public $insertvon; //string
|
||||
public $updateamum; //timestamp
|
||||
public $updatevon; //string
|
||||
|
||||
|
||||
// zwischentabelle projekt_ressource
|
||||
public $projekt_ressource_id;
|
||||
public $projektphase_id;
|
||||
@@ -53,7 +53,7 @@ class ressource extends basis_db
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
if($ressource_id != null)
|
||||
if($ressource_id != null)
|
||||
$this->load($ressource_id);
|
||||
}
|
||||
|
||||
@@ -69,9 +69,9 @@ class ressource extends basis_db
|
||||
$this->errormsg = 'Ressource_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$qry = "SELECT * FROM fue.tbl_ressource WHERE ressource_id=".$this->db_add_param($ressource_id, FHC_INTEGER);
|
||||
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
@@ -90,13 +90,13 @@ class ressource extends basis_db
|
||||
$this->funktion_kurzbz = $row->funktion_kurzbz;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Datensatz wurde nicht gefunden';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
@@ -105,21 +105,21 @@ class ressource extends basis_db
|
||||
|
||||
/**
|
||||
* Laedt alle Ressourcen
|
||||
* @param $projekt_kurzbz, wenn null -> werden alle ressourcen geladen
|
||||
* @param $projekt_kurzbz, wenn null -> werden alle ressourcen geladen
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function getAllRessourcen()
|
||||
{
|
||||
$qry = "SELECT * FROM fue.tbl_ressource order by bezeichnung";
|
||||
|
||||
|
||||
$this->result=array();
|
||||
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object())
|
||||
{
|
||||
$obj = new ressource();
|
||||
|
||||
|
||||
$obj->ressource_id = $row->ressource_id;
|
||||
$obj->bezeichnung = $row->bezeichnung;
|
||||
$obj->beschreibung = $row->beschreibung;
|
||||
@@ -131,21 +131,20 @@ class ressource extends basis_db
|
||||
$obj->insertvon = $row->insertvon;
|
||||
$obj->updateamum = $row->updateamum;
|
||||
$obj->updatevon = $row->updatevon;
|
||||
$obj->funktion_kurzbz = $row->funktion_kurzbz;
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
//var_dump($this->result);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Lädt alle Ressourcen zu einem Projekt
|
||||
* @param $project_kurzbz
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
@@ -153,17 +152,17 @@ class ressource extends basis_db
|
||||
public function getProjectRessourcen($project_kurzbz)
|
||||
{
|
||||
$qry = "SELECT ressource.*, project.projekt_ressource_id, project.aufwand, project.funktion_kurzbz FROM fue.tbl_ressource as ressource
|
||||
JOIN fue.tbl_projekt_ressource project ON(project.ressource_id = ressource.ressource_id)
|
||||
JOIN fue.tbl_projekt_ressource project ON(project.ressource_id = ressource.ressource_id)
|
||||
WHERE project.projekt_kurzbz =".$this->db_add_param($project_kurzbz).";";
|
||||
|
||||
|
||||
$this->result=array();
|
||||
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object())
|
||||
{
|
||||
$obj = new ressource();
|
||||
|
||||
|
||||
$obj->ressource_id = $row->ressource_id;
|
||||
$obj->bezeichnung = $row->bezeichnung;
|
||||
$obj->beschreibung = $row->beschreibung;
|
||||
@@ -178,22 +177,22 @@ class ressource extends basis_db
|
||||
$obj->aufwand = $row->aufwand;
|
||||
$obj->funktion_kurzbz = $row->funktion_kurzbz;
|
||||
$obj->projekt_ressource_id= $row->projekt_ressource_id;
|
||||
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
//var_dump($this->result);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Lädt die Projektressource
|
||||
* @param $project_ressource_id
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
@@ -202,7 +201,7 @@ class ressource extends basis_db
|
||||
{
|
||||
$qry = "select * from fue.tbl_projekt_ressource where projekt_ressource_id = ".$this->db_add_param($projekt_ressource_id);
|
||||
$this->result=array();
|
||||
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
@@ -213,13 +212,13 @@ class ressource extends basis_db
|
||||
$this->funktion_kurzbz = $row->funktion_kurzbz;
|
||||
$this->projekt_ressource_id= $row->projekt_ressource_id;
|
||||
$this->projekt_kurzbz = $row->projekt_kurzbz;
|
||||
$this->projektphase_id = $row->projektphase_id;
|
||||
$this->projektphase_id = $row->projektphase_id;
|
||||
return true;
|
||||
}
|
||||
//var_dump($this->result);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
@@ -227,7 +226,7 @@ class ressource extends basis_db
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Lädt alle Ressourcen zu einer Phase
|
||||
* @param $project_kurzbz
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
@@ -235,17 +234,17 @@ class ressource extends basis_db
|
||||
public function getPhaseRessourcen($projektphase_id)
|
||||
{
|
||||
$qry = "SELECT ressource.*, project.aufwand, project.funktion_kurzbz, project.projekt_ressource_id FROM fue.tbl_ressource as ressource
|
||||
JOIN fue.tbl_projekt_ressource project ON(project.ressource_id = ressource.ressource_id)
|
||||
JOIN fue.tbl_projekt_ressource project ON(project.ressource_id = ressource.ressource_id)
|
||||
WHERE project.projektphase_id =".$this->db_add_param($projektphase_id, FHC_INTEGER).";";
|
||||
|
||||
|
||||
$this->result=array();
|
||||
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object())
|
||||
{
|
||||
$obj = new ressource();
|
||||
|
||||
|
||||
$obj->ressource_id = $row->ressource_id;
|
||||
$obj->bezeichnung = $row->bezeichnung;
|
||||
$obj->beschreibung = $row->beschreibung;
|
||||
@@ -265,13 +264,13 @@ class ressource extends basis_db
|
||||
//var_dump($this->result);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Speichert den aktuellen Datensatz in die Datenbank
|
||||
* Wenn $neu auf true gesetzt ist wird ein neuer Datensatz angelegt
|
||||
@@ -279,14 +278,14 @@ class ressource extends basis_db
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function saveProjektRessource($new=null)
|
||||
{
|
||||
{
|
||||
if($new==null)
|
||||
$new = $this->new;
|
||||
|
||||
|
||||
if($new)
|
||||
{
|
||||
//Neuen Datensatz einfuegen
|
||||
$qry='BEGIN; INSERT INTO fue.tbl_projekt_ressource (projektphase_id, projekt_kurzbz,
|
||||
$qry='BEGIN; INSERT INTO fue.tbl_projekt_ressource (projektphase_id, projekt_kurzbz,
|
||||
ressource_id, funktion_kurzbz, beschreibung, aufwand) VALUES ('.
|
||||
$this->db_add_param($this->projektphase_id, FHC_INTEGER).', '.
|
||||
$this->db_add_param($this->projekt_kurzbz).', '.
|
||||
@@ -307,7 +306,7 @@ class ressource extends basis_db
|
||||
'aufwand='.$this->db_add_param($this->aufwand).' '.
|
||||
'WHERE projekt_ressource_id='.$this->db_add_param($this->projekt_ressource_id, FHC_INTEGER).';';
|
||||
}
|
||||
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($new)
|
||||
@@ -322,21 +321,21 @@ class ressource extends basis_db
|
||||
$this->db_query('COMMIT');
|
||||
return true;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Auslesen der Sequence';
|
||||
$this->db_query('ROLLBACK;');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Auslesen der Sequence';
|
||||
$this->db_query('ROLLBACK;');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -344,7 +343,7 @@ class ressource extends basis_db
|
||||
$this->errormsg = $qry;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Speichert den aktuellen Datensatz in die Datenbank
|
||||
@@ -353,14 +352,14 @@ class ressource extends basis_db
|
||||
* @return true wenn ok, false im Fehlerfall
|
||||
*/
|
||||
public function save($new=null)
|
||||
{
|
||||
{
|
||||
if($new==null)
|
||||
$new = $this->new;
|
||||
|
||||
|
||||
if($new)
|
||||
{
|
||||
//Neuen Datensatz einfuegen
|
||||
$qry='BEGIN; INSERT INTO fue.tbl_ressource (bezeichnung, beschreibung,
|
||||
$qry='BEGIN; INSERT INTO fue.tbl_ressource (bezeichnung, beschreibung,
|
||||
mitarbeiter_uid, student_uid, betriebsmittel_id, firma_id, insertvon, insertamum, updatevon, updateamum) VALUES ('.
|
||||
$this->db_add_param($this->bezeichnung).', '.
|
||||
$this->db_add_param($this->beschreibung).', '.
|
||||
@@ -385,7 +384,7 @@ class ressource extends basis_db
|
||||
'updatevon='.$this->db_add_param($this->updatevon).' '.
|
||||
'WHERE ressource_id='.$this->db_add_param($this->ressource_id, FHC_INTEGER).';';
|
||||
}
|
||||
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($new)
|
||||
@@ -400,21 +399,21 @@ class ressource extends basis_db
|
||||
$this->db_query('COMMIT');
|
||||
return true;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Auslesen der Sequence';
|
||||
$this->db_query('ROLLBACK;');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Auslesen der Sequence';
|
||||
$this->db_query('ROLLBACK;');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -423,8 +422,8 @@ class ressource extends basis_db
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Laedt die Ressource mit der ID $ressource_id
|
||||
* @param $ressource_id ID der zu ladenden Ressource
|
||||
@@ -437,9 +436,9 @@ class ressource extends basis_db
|
||||
$this->errormsg = 'Ressource_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$qry = "SELECT * FROM fue.tbl_projekt_ressource WHERE projekt_ressource_id=".$this->db_add_param($projekt_ressource_id, FHC_INTEGER);
|
||||
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
@@ -453,13 +452,13 @@ class ressource extends basis_db
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Datensatz wurde nicht gefunden';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
@@ -468,26 +467,26 @@ class ressource extends basis_db
|
||||
|
||||
/**
|
||||
* Liefert die Ressourcen aller Projekte die zu einem bestimmten Datum aktiv sind
|
||||
*
|
||||
*
|
||||
* @param $datum
|
||||
*/
|
||||
public function getProjektRessourceDatum($datum, $endedatum)
|
||||
{
|
||||
$qry = "
|
||||
SELECT
|
||||
SELECT
|
||||
distinct
|
||||
tbl_projekt_ressource.*, tbl_projekt.beginn as start, tbl_projekt.ende,
|
||||
tbl_ressource.student_uid, tbl_ressource.mitarbeiter_uid, tbl_ressource.betriebsmittel_id, tbl_ressource.firma_id,
|
||||
tbl_projekt_ressource.*, tbl_projekt.beginn as start, tbl_projekt.ende,
|
||||
tbl_ressource.student_uid, tbl_ressource.mitarbeiter_uid, tbl_ressource.betriebsmittel_id, tbl_ressource.firma_id,
|
||||
tbl_ressource.bezeichnung, tbl_ressource.beschreibung
|
||||
FROM
|
||||
FROM
|
||||
fue.tbl_ressource
|
||||
JOIN fue.tbl_projekt_ressource USING(ressource_id)
|
||||
JOIN fue.tbl_projekt USING(projekt_kurzbz)
|
||||
WHERE
|
||||
(tbl_projekt.beginn<=".$this->db_add_param($endedatum)." OR tbl_projekt.beginn is null) AND
|
||||
(tbl_projekt.ende>=".$this->db_add_param($datum)." OR tbl_projekt.ende is null)
|
||||
(tbl_projekt.beginn<=".$this->db_add_param($endedatum)." OR tbl_projekt.beginn is null) AND
|
||||
(tbl_projekt.ende>=".$this->db_add_param($datum)." OR tbl_projekt.ende is null)
|
||||
ORDER BY bezeichnung";
|
||||
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
@@ -498,7 +497,7 @@ class ressource extends basis_db
|
||||
$obj->projektphase_id = $row->projektphase_id;
|
||||
$obj->start = $row->start;
|
||||
$obj->ende = $row->ende;
|
||||
|
||||
|
||||
$obj->ressource_id = $row->ressource_id;
|
||||
$obj->student_uid = $row->student_uid;
|
||||
$obj->mitarbeiter_uid = $row->mitarbeiter_uid;
|
||||
@@ -507,39 +506,39 @@ class ressource extends basis_db
|
||||
$obj->bezeichnung = $row->bezeichnung;
|
||||
$obj->beschreibung = $row->beschreibung;
|
||||
$obj->aufwand = $row->aufwand;
|
||||
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Liefert die Ressourcen aller Projektphasen die zu einem bestimmten Datum aktiv sind
|
||||
*
|
||||
*
|
||||
* @param $datum
|
||||
*/
|
||||
public function getProjektphaseRessourceDatum($datum, $endedatum, $projekt_kurzbz=null)
|
||||
{
|
||||
$qry = "
|
||||
SELECT
|
||||
SELECT
|
||||
distinct
|
||||
tbl_projekt_ressource.*, tbl_projektphase.start, tbl_projektphase.ende,
|
||||
tbl_ressource.student_uid, tbl_ressource.mitarbeiter_uid, tbl_ressource.betriebsmittel_id, tbl_ressource.firma_id,
|
||||
tbl_projekt_ressource.*, tbl_projektphase.start, tbl_projektphase.ende,
|
||||
tbl_ressource.student_uid, tbl_ressource.mitarbeiter_uid, tbl_ressource.betriebsmittel_id, tbl_ressource.firma_id,
|
||||
tbl_ressource.bezeichnung, tbl_ressource.beschreibung
|
||||
FROM
|
||||
FROM
|
||||
fue.tbl_ressource
|
||||
JOIN fue.tbl_projekt_ressource USING(ressource_id)
|
||||
JOIN fue.tbl_projektphase USING(projektphase_id)
|
||||
WHERE
|
||||
(tbl_projektphase.start<=".$this->db_add_param($endedatum)." OR tbl_projektphase.start is null) AND
|
||||
(tbl_projektphase.ende>=".$this->db_add_param($datum)." OR tbl_projektphase.ende is null)
|
||||
(tbl_projektphase.start<=".$this->db_add_param($endedatum)." OR tbl_projektphase.start is null) AND
|
||||
(tbl_projektphase.ende>=".$this->db_add_param($datum)." OR tbl_projektphase.ende is null)
|
||||
";
|
||||
if(!is_null($projekt_kurzbz))
|
||||
{
|
||||
$qry.=" AND tbl_projektphase.projekt_kurzbz=".$this->db_add_param($projekt_kurzbz);
|
||||
}
|
||||
$qry.=" ORDER BY tbl_ressource.bezeichnung";
|
||||
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
@@ -550,7 +549,7 @@ class ressource extends basis_db
|
||||
$obj->projektphase_id = $row->projektphase_id;
|
||||
$obj->start = $row->start;
|
||||
$obj->ende = $row->ende;
|
||||
|
||||
|
||||
$obj->ressource_id = $row->ressource_id;
|
||||
$obj->student_uid = $row->student_uid;
|
||||
$obj->mitarbeiter_uid = $row->mitarbeiter_uid;
|
||||
@@ -559,7 +558,7 @@ class ressource extends basis_db
|
||||
$obj->bezeichnung = $row->bezeichnung;
|
||||
$obj->beschreibung = $row->beschreibung;
|
||||
$obj->aufwand = $row->aufwand;
|
||||
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
}
|
||||
@@ -569,7 +568,7 @@ class ressource extends basis_db
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Liefert die Ressourcen aller Projektphasen die zu einem bestimmten Datum aktiv sind
|
||||
*
|
||||
@@ -594,12 +593,12 @@ class ressource extends basis_db
|
||||
((tbl_projektphase.ende>=".$this->db_add_param($datum)." OR tbl_projektphase.ende is null) AND
|
||||
(tbl_projekttask.ende>=".$this->db_add_param($datum)." OR tbl_projekttask.ende is null))
|
||||
";
|
||||
|
||||
|
||||
if(!is_null($projekt_kurzbz))
|
||||
{
|
||||
$qry.=" AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz);
|
||||
}
|
||||
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object($result))
|
||||
@@ -610,7 +609,7 @@ class ressource extends basis_db
|
||||
$obj->projektphase_id = $row->projektphase_id;
|
||||
$obj->start = $row->start;
|
||||
$obj->ende = $row->ende;
|
||||
|
||||
|
||||
$obj->ressource_id = $row->ressource_id;
|
||||
$obj->student_uid = $row->student_uid;
|
||||
$obj->mitarbeiter_uid = $row->mitarbeiter_uid;
|
||||
@@ -619,7 +618,7 @@ class ressource extends basis_db
|
||||
$obj->bezeichnung = $row->bezeichnung;
|
||||
$obj->beschreibung = $row->beschreibung;
|
||||
$obj->aufwand = $row->aufwand;
|
||||
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
}
|
||||
@@ -629,64 +628,64 @@ class ressource extends basis_db
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Löscht eine Ressource zu Projekt Zuordnung
|
||||
* @param type $ressource_id
|
||||
* @param type $projekt_kurzbz
|
||||
* @return boolean
|
||||
* @return boolean
|
||||
*/
|
||||
public function deleteFromProjekt($ressource_id, $projekt_kurzbz)
|
||||
{
|
||||
if($ressource_id == '' || !is_numeric($ressource_id))
|
||||
{
|
||||
$this->errormsg = 'Ressource Id ist keine gültige Zahl';
|
||||
return false;
|
||||
$this->errormsg = 'Ressource Id ist keine gültige Zahl';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry="DELETE FROM fue.tbl_projekt_ressource WHERE ressource_id =".$this->db_add_param($ressource_id, FHC_INTEGER, false)."
|
||||
AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz, FHC_STRING, false).';';
|
||||
|
||||
|
||||
$qry="DELETE FROM fue.tbl_projekt_ressource WHERE ressource_id =".$this->db_add_param($ressource_id, FHC_INTEGER, false)."
|
||||
AND projekt_kurzbz=".$this->db_add_param($projekt_kurzbz, FHC_STRING, false).';';
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
return true;
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Löschen der Daten';
|
||||
return false;
|
||||
$this->errormsg = 'Fehler beim Löschen der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Löscht eine Ressource zu Phase Zuordnung
|
||||
* @param type $ressource_id
|
||||
* @param type $projekt_kurzbz
|
||||
* @return boolean
|
||||
* @return boolean
|
||||
*/
|
||||
public function deleteFromPhase($ressource_id, $projektphase_id)
|
||||
{
|
||||
if($ressource_id == '' || !is_numeric($ressource_id))
|
||||
{
|
||||
$this->errormsg = 'Ressource Id ist keine gültige Zahl';
|
||||
return false;
|
||||
$this->errormsg = 'Ressource Id ist keine gültige Zahl';
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if($projektphase_id == '' || !is_numeric($projektphase_id))
|
||||
{
|
||||
$this->errormsg = 'Ressource Id ist keine gültige Zahl';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry="DELETE FROM fue.tbl_projekt_ressource WHERE ressource_id =".$this->db_add_param($ressource_id, FHC_INTEGER, false)."
|
||||
AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER, false).';';
|
||||
|
||||
$this->errormsg = 'Ressource Id ist keine gültige Zahl';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry="DELETE FROM fue.tbl_projekt_ressource WHERE ressource_id =".$this->db_add_param($ressource_id, FHC_INTEGER, false)."
|
||||
AND projektphase_id=".$this->db_add_param($projektphase_id, FHC_INTEGER, false).';';
|
||||
|
||||
if($this->db_query($qry))
|
||||
return true;
|
||||
return true;
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Löschen der Daten';
|
||||
return false;
|
||||
$this->errormsg = 'Fehler beim Löschen der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,8 @@ class studienplan extends basis_db
|
||||
protected $pflicht; //boolean
|
||||
protected $koordinator; //varchar(32)
|
||||
protected $sort;
|
||||
protected $curriculum=true;
|
||||
protected $export=true;
|
||||
|
||||
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 870 B |
Binary file not shown.
|
After Width: | Height: | Size: 4.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
+64
-71
@@ -24,13 +24,13 @@
|
||||
//Spalte studiensemester_kurzbz für Reihungstest
|
||||
if(!$result = @$db->db_query("SELECT studiensemester_kurzbz FROM public.tbl_reihungstest LIMIT 1"))
|
||||
{
|
||||
$qry = "ALTER TABLE public.tbl_reihungstest ADD COLUMN studiensemester_kurzbz varchar(16);
|
||||
ALTER TABLE public.tbl_reihungstest ADD CONSTRAINT fk_reihungsteset_studiensemester FOREIGN KEY (studiensemester_kurzbz) REFERENCES public.tbl_studiensemester (studiensemester_kurzbz) ON DELETE RESTRICT ON UPDATE CASCADE;";
|
||||
$qry = "ALTER TABLE public.tbl_reihungstest ADD COLUMN studiensemester_kurzbz varchar(16);
|
||||
ALTER TABLE public.tbl_reihungstest ADD CONSTRAINT fk_reihungsteset_studiensemester FOREIGN KEY (studiensemester_kurzbz) REFERENCES public.tbl_studiensemester (studiensemester_kurzbz) ON DELETE RESTRICT ON UPDATE CASCADE;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_reihungstest: '.$db->db_last_error().'</strong><br>';
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>public.tbl_reihungstest: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo 'public.tbl_reihungstest: Spalte studiensemester_kurzbz hinzugefuegt';
|
||||
echo 'public.tbl_reihungstest: Spalte studiensemester_kurzbz hinzugefuegt';
|
||||
}
|
||||
|
||||
// Neue Spalte beschreibung_mehrsprachig bei tbl_dokument
|
||||
@@ -66,10 +66,10 @@ if($result = @$db->db_query("SELECT * FROM information_schema.role_table_grants
|
||||
{
|
||||
|
||||
$qry = "GRANT DELETE ON testtool.tbl_frage TO web;
|
||||
GRANT DELETE ON testtool.tbl_gebiet TO web;
|
||||
GRANT SELECT, UPDATE, INSERT, DELETE ON testtool.tbl_ablauf TO web;
|
||||
GRANT SELECT, UPDATE ON testtool.tbl_ablauf_ablauf_id_seq TO web;
|
||||
";
|
||||
GRANT DELETE ON testtool.tbl_gebiet TO web;
|
||||
GRANT SELECT, UPDATE, INSERT, DELETE ON testtool.tbl_ablauf TO web;
|
||||
GRANT SELECT, UPDATE ON testtool.tbl_ablauf_ablauf_id_seq TO web;
|
||||
";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>Testtool Berechtigungen: '.$db->db_last_error().'</strong><br>';
|
||||
@@ -107,23 +107,23 @@ if(!@$db->db_query("SELECT bewerbung_abgeschicktamum FROM public.tbl_prestudents
|
||||
//Spalte benotung in lehre.tbl_lehrveranstaltung
|
||||
if (!$result = @$db->db_query("SELECT benotung FROM lehre.tbl_lehrveranstaltung LIMIT 1;"))
|
||||
{
|
||||
$qry = "ALTER TABLE lehre.tbl_lehrveranstaltung ADD COLUMN benotung boolean NOT NULL DEFAULT FALSE;";
|
||||
$qry = "ALTER TABLE lehre.tbl_lehrveranstaltung ADD COLUMN benotung boolean NOT NULL DEFAULT FALSE;";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_lehrveranstaltung: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo ' lehre.tbl_lehrveranstaltung: Spalte benotung hinzugefügt.<br>';
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_lehrveranstaltung: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo ' lehre.tbl_lehrveranstaltung: Spalte benotung hinzugefügt.<br>';
|
||||
}
|
||||
|
||||
//Spalte lvinfo in lehre.tbl_lehrveranstaltung
|
||||
if (!$result = @$db->db_query("SELECT lvinfo FROM lehre.tbl_lehrveranstaltung LIMIT 1;"))
|
||||
{
|
||||
$qry = "ALTER TABLE lehre.tbl_lehrveranstaltung ADD COLUMN lvinfo boolean NOT NULL DEFAULT FALSE;";
|
||||
$qry = "ALTER TABLE lehre.tbl_lehrveranstaltung ADD COLUMN lvinfo boolean NOT NULL DEFAULT FALSE;";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_lehrveranstaltung: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo ' lehre.tbl_lehrveranstaltung: Spalte lvinfo hinzugefügt.<br>';
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_lehrveranstaltung: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo ' lehre.tbl_lehrveranstaltung: Spalte lvinfo hinzugefügt.<br>';
|
||||
}
|
||||
|
||||
|
||||
@@ -702,7 +702,7 @@ if (!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_studienordnungstatus LIMI
|
||||
|
||||
GRANT SELECT ON lehre.tbl_studienordnungstatus TO web;
|
||||
GRANT SELECT, UPDATE, INSERT, DELETE ON lehre.tbl_studienordnungstatus TO vilesci;
|
||||
|
||||
|
||||
INSERT INTO lehre.tbl_studienordnungstatus (status_kurzbz, bezeichnung, reihenfolge) VALUES ('development', 'in Bearbeitung', 1);
|
||||
INSERT INTO lehre.tbl_studienordnungstatus (status_kurzbz, bezeichnung, reihenfolge) VALUES ('review', 'in Review', 2);
|
||||
INSERT INTO lehre.tbl_studienordnungstatus (status_kurzbz, bezeichnung, reihenfolge) VALUES ('approved', 'genehmigt', 3);
|
||||
@@ -719,68 +719,61 @@ if (!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_studienordnungstatus LIMI
|
||||
//Spalte status_kurzbz in lehre.tbl_studienordnung
|
||||
if (!$result = @$db->db_query("SELECT status_kurzbz FROM lehre.tbl_studienordnung LIMIT 1;"))
|
||||
{
|
||||
$qry = "ALTER TABLE lehre.tbl_studienordnung ADD COLUMN status_kurzbz varchar(32);
|
||||
|
||||
ALTER TABLE lehre.tbl_studienordnung ADD CONSTRAINT fk_studienordnung_status_kurzbz FOREIGN KEY (status_kurzbz) REFERENCES lehre.tbl_studienordnungstatus (status_kurzbz) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
UPDATE lehre.tbl_studienordnung SET status_kurzbz = 'approved';
|
||||
";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_studienordnung: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo ' lehre.tbl_studienordnung: Spalte status_kurzbz hinzugefügt.<br>';
|
||||
|
||||
$qry = "ALTER TABLE lehre.tbl_studienordnung ADD COLUMN status_kurzbz varchar(32);
|
||||
ALTER TABLE lehre.tbl_studienordnung ADD CONSTRAINT fk_studienordnung_status_kurzbz FOREIGN KEY (status_kurzbz) REFERENCES lehre.tbl_studienordnungstatus (status_kurzbz) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
UPDATE lehre.tbl_studienordnung SET status_kurzbz = 'approved';
|
||||
";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_studienordnung: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo ' lehre.tbl_studienordnung: Spalte status_kurzbz hinzugefügt.<br>';
|
||||
}
|
||||
|
||||
//Spalte standort_id in lehre.tbl_studienordnung
|
||||
if (!$result = @$db->db_query("SELECT standort_id FROM lehre.tbl_studienordnung LIMIT 1;"))
|
||||
{
|
||||
$qry = "ALTER TABLE lehre.tbl_studienordnung ADD COLUMN standort_id integer;
|
||||
|
||||
ALTER TABLE lehre.tbl_studienordnung ADD CONSTRAINT studienordnung_standort_id FOREIGN KEY (standort_id) REFERENCES public.tbl_standort (standort_id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_studienordnung: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo ' lehre.tbl_studienordnung: Spalte standort_id hinzugefügt.<br>';
|
||||
|
||||
$qry = "ALTER TABLE lehre.tbl_studienordnung ADD COLUMN standort_id integer;
|
||||
ALTER TABLE lehre.tbl_studienordnung ADD CONSTRAINT studienordnung_standort_id FOREIGN KEY (standort_id) REFERENCES public.tbl_standort (standort_id) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_studienordnung: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo ' lehre.tbl_studienordnung: Spalte standort_id hinzugefügt.<br>';
|
||||
}
|
||||
|
||||
//Spalte ects_stpl in lehre.tbl_studienplan
|
||||
if (!$result = @$db->db_query("SELECT ects_stpl FROM lehre.tbl_studienplan LIMIT 1;"))
|
||||
{
|
||||
$qry = "ALTER TABLE lehre.tbl_studienplan ADD COLUMN ects_stpl numeric(5,2);";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_studienplan: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo ' lehre.tbl_studienplan: Spalte ects_stpl hinzugefügt.<br>';
|
||||
|
||||
$qry = "ALTER TABLE lehre.tbl_studienplan ADD COLUMN ects_stpl numeric(5,2);";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_studienplan: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo ' lehre.tbl_studienplan: Spalte ects_stpl hinzugefügt.<br>';
|
||||
}
|
||||
|
||||
//Spalte pflicht_sws in lehre.tbl_studienplan
|
||||
if (!$result = @$db->db_query("SELECT pflicht_sws FROM lehre.tbl_studienplan LIMIT 1;"))
|
||||
{
|
||||
$qry = "ALTER TABLE lehre.tbl_studienplan ADD COLUMN pflicht_sws integer;";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_studienplan: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo ' lehre.tbl_studienplan: Spalte pflicht_sws hinzugefügt.<br>';
|
||||
|
||||
$qry = "ALTER TABLE lehre.tbl_studienplan ADD COLUMN pflicht_sws integer;";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_studienplan: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo ' lehre.tbl_studienplan: Spalte pflicht_sws hinzugefügt.<br>';
|
||||
}
|
||||
|
||||
//Spalte pflicht_lvs in lehre.tbl_studienplan
|
||||
if (!$result = @$db->db_query("SELECT pflicht_lvs FROM lehre.tbl_studienplan LIMIT 1;"))
|
||||
{
|
||||
$qry = "ALTER TABLE lehre.tbl_studienplan ADD COLUMN pflicht_lvs integer;";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_studienplan: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo ' lehre.tbl_studienplan: Spalte pflicht_lvs hinzugefügt.<br>';
|
||||
|
||||
$qry = "ALTER TABLE lehre.tbl_studienplan ADD COLUMN pflicht_lvs integer;";
|
||||
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_studienplan: ' . $db->db_last_error() . '</strong><br>';
|
||||
else
|
||||
echo ' lehre.tbl_studienplan: Spalte pflicht_lvs hinzugefügt.<br>';
|
||||
}
|
||||
|
||||
// Tabelle Studienplan_Semester
|
||||
@@ -854,7 +847,7 @@ if (!$result = @$db->db_query("SELECT 1 FROM public.tbl_bewerbungstermine LIMIT
|
||||
updateamum timestamp,
|
||||
updatevon varchar(32)
|
||||
);
|
||||
|
||||
|
||||
CREATE SEQUENCE public.tbl_bewerbungstermine_bewerbungstermin_id_seq
|
||||
INCREMENT BY 1
|
||||
NO MAXVALUE
|
||||
@@ -1091,13 +1084,13 @@ if (!$result = @$db->db_query("SELECT 1 FROM public.tbl_studienjahr LIMIT 1;"))
|
||||
(
|
||||
studienjahr_kurzbz varchar(16) NOT NULL,
|
||||
bezeichnung varchar(64)
|
||||
|
||||
|
||||
);
|
||||
|
||||
ALTER TABLE public.tbl_studienjahr ADD CONSTRAINT pk_studienjahr_kurzbz PRIMARY KEY (studienjahr_kurzbz);
|
||||
|
||||
INSERT INTO public.tbl_studienjahr (studienjahr_kurzbz) SELECT DISTINCT s.studienjahr_kurzbz FROM public.tbl_studiensemester s;
|
||||
|
||||
|
||||
INSERT INTO public.tbl_studienjahr (studienjahr_kurzbz) SELECT DISTINCT s.studienjahr_kurzbz FROM public.tbl_studiensemester s WHERE s.studienjahr_kurzbz is not null;
|
||||
|
||||
ALTER TABLE public.tbl_studiensemester ADD CONSTRAINT fk_studiensemester_studienjahr FOREIGN KEY (studienjahr_kurzbz) REFERENCES public.tbl_studienjahr (studienjahr_kurzbz) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
GRANT SELECT ON public.tbl_studienjahr TO web;
|
||||
@@ -1231,7 +1224,7 @@ $tabellen=array(
|
||||
"lehre.tbl_lehrfunktion" => array("lehrfunktion_kurzbz","beschreibung","standardfaktor","sort"),
|
||||
"lehre.tbl_lehrmittel" => array("lehrmittel_kurzbz","beschreibung","ort_kurzbz"),
|
||||
"lehre.tbl_lehrtyp" => array("lehrtyp_kurzbz","bezeichnung"),
|
||||
"lehre.tbl_lehrveranstaltung" => array("lehrveranstaltung_id","kurzbz","bezeichnung","lehrform_kurzbz","studiengang_kz","semester","sprache","ects","semesterstunden","anmerkung","lehre","lehreverzeichnis","aktiv","planfaktor","planlektoren","planpersonalkosten","plankostenprolektor","koordinator","sort","zeugnis","projektarbeit","updateamum","updatevon","insertamum","insertvon","ext_id","bezeichnung_english","orgform_kurzbz","incoming","lehrtyp_kurzbz","oe_kurzbz","raumtyp_kurzbz","anzahlsemester","semesterwochen","lvnr","farbe","semester_alternativ","old_lehrfach_id","sws","lvs","alvs","lvps","las","benotung","lvinfo"),
|
||||
"lehre.tbl_lehrveranstaltung" => array("lehrveranstaltung_id","kurzbz","bezeichnung","lehrform_kurzbz","studiengang_kz","semester","sprache","ects","semesterstunden","anmerkung","lehre","lehreverzeichnis","aktiv","planfaktor","planlektoren","planpersonalkosten","plankostenprolektor","koordinator","sort","zeugnis","projektarbeit","updateamum","updatevon","insertamum","insertvon","ext_id","bezeichnung_english","orgform_kurzbz","incoming","lehrtyp_kurzbz","oe_kurzbz","raumtyp_kurzbz","anzahlsemester","semesterwochen","lvnr","farbe","semester_alternativ","old_lehrfach_id","sws","lvs","alvs","lvps","las","benotung","lvinfo","lehrauftrag"),
|
||||
"lehre.tbl_lehrveranstaltung_kompatibel" => array("lehrveranstaltung_id","lehrveranstaltung_id_kompatibel"),
|
||||
"lehre.tbl_lvangebot" => array("lvangebot_id","lehrveranstaltung_id","studiensemester_kurzbz","gruppe_kurzbz","incomingplaetze","gesamtplaetze","anmeldefenster_start","anmeldefenster_ende","insertamum","insertvon","updateamum","updatevon"),
|
||||
"lehre.tbl_lvregel" => array("lvregel_id","lvregeltyp_kurzbz","operator","parameter","lvregel_id_parent","lehrveranstaltung_id","studienplan_lehrveranstaltung_id","insertamum","insertvon","updateamum","updatevon"),
|
||||
@@ -1248,11 +1241,11 @@ $tabellen=array(
|
||||
"lehre.tbl_pruefung" => array("pruefung_id","lehreinheit_id","student_uid","mitarbeiter_uid","note","pruefungstyp_kurzbz","datum","anmerkung","insertamum","insertvon","updateamum","updatevon","ext_id","pruefungsanmeldung_id","vertrag_id", "punkte"),
|
||||
"lehre.tbl_pruefungstyp" => array("pruefungstyp_kurzbz","beschreibung","abschluss"),
|
||||
"lehre.tbl_studienordnung" => array("studienordnung_id","studiengang_kz","version","gueltigvon","gueltigbis","bezeichnung","ects","studiengangbezeichnung","studiengangbezeichnung_englisch","studiengangkurzbzlang","akadgrad_id","insertamum","insertvon","updateamum","updatevon","ext_id", "status_kurzbz", "standort_id"),
|
||||
"lehre.tbl_studienordnungstatus" => array("status_kurzbz","bezeichnung","reihenfolge"),
|
||||
"lehre.tbl_studienordnungstatus" => array("status_kurzbz","bezeichnung","reihenfolge"),
|
||||
"lehre.tbl_studienordnung_semester" => array("studienordnung_semester_id","studienordnung_id","studiensemester_kurzbz","semester"),
|
||||
"lehre.tbl_studienplan" => array("studienplan_id","studienordnung_id","orgform_kurzbz","version","regelstudiendauer","sprache","aktiv","bezeichnung","insertamum","insertvon","updateamum","updatevon","semesterwochen","testtool_sprachwahl","ext_id", "ects_stpl", "pflicht_sws", "pflicht_lvs"),
|
||||
"lehre.tbl_studienplan_lehrveranstaltung" => array("studienplan_lehrveranstaltung_id","studienplan_id","lehrveranstaltung_id","semester","studienplan_lehrveranstaltung_id_parent","pflicht","koordinator","insertamum","insertvon","updateamum","updatevon","sort","ext_id", "curriculum"),
|
||||
"lehre.tbl_studienplan_semester" => array("studienplan_semester_id", "studienplan_id", "studiensemester_kurzbz", "semester"),
|
||||
"lehre.tbl_studienplan_lehrveranstaltung" => array("studienplan_lehrveranstaltung_id","studienplan_id","lehrveranstaltung_id","semester","studienplan_lehrveranstaltung_id_parent","pflicht","koordinator","insertamum","insertvon","updateamum","updatevon","sort","ext_id", "curriculum","export"),
|
||||
"lehre.tbl_studienplan_semester" => array("studienplan_semester_id", "studienplan_id", "studiensemester_kurzbz", "semester"),
|
||||
"lehre.tbl_studienplatz" => array("studienplatz_id","studiengang_kz","studiensemester_kurzbz","orgform_kurzbz","ausbildungssemester","gpz","npz","insertamum","insertvon","updateamum","updatevon","ext_id", "apz", "studienplan_id"),
|
||||
"lehre.tbl_stunde" => array("stunde","beginn","ende"),
|
||||
"lehre.tbl_stundenplan" => array("stundenplan_id","unr","mitarbeiter_uid","datum","stunde","ort_kurzbz","gruppe_kurzbz","titel","anmerkung","lehreinheit_id","studiengang_kz","semester","verband","gruppe","fix","updateamum","updatevon","insertamum","insertvon"),
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
var residual = perZGV * zgvs.length;
|
||||
var resDiff = neededStudentsCount - residual;
|
||||
|
||||
// distribute the remaining places
|
||||
// distribute the remaining places on the present ZGVs
|
||||
while(resDiff > 0)
|
||||
{
|
||||
zgvElems.forEach(function(i)
|
||||
@@ -253,7 +253,7 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
aqr.recursiveChoose(aqr.selectedStudienplatz.apz, zgvElems);
|
||||
aqr.recursiveChoose(neededStudentsCount, zgvElems);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user