Adaptierungen DB und Dropdowns Fas Lehrveranstaltungen

This commit is contained in:
ma0068
2022-10-27 15:17:29 +02:00
parent 409ccd7640
commit c7f477555c
4 changed files with 58 additions and 19 deletions
@@ -199,26 +199,46 @@ $p = new phrasen($sprache);
<label value="Raumtyp" />
<menulist id="lehrveranstaltung-detail-menulist-raumtyp" disabled="true"
datasources="<?php echo APP_ROOT ?>rdf/raumtyp.rdf.php" flex="1"
xmlns:RAUMTYP="http://www.technikum-wien.at/raumtyp/rdf#"
ref="http://www.technikum-wien.at/raumtyp/liste" >
<template>
<menupopup>
<menuitem value="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz"
label="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz rdf:http://www.technikum-wien.at/raumtyp/rdf#beschreibung"
uri="rdf:*"/>
</menupopup>
</template>
<template>
<rule RAUMTYP:aktiv='true'>
<menupopup>
<menuitem value="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz"
label="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz rdf:http://www.technikum-wien.at/raumtyp/rdf#beschreibung"
uri="rdf:*"/>
</menupopup>
</rule>
<rule>
<menupopup>
<menuitem value="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz"
label="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz rdf:http://www.technikum-wien.at/raumtyp/rdf#beschreibung"
uri="rdf:*" style="text-decoration:line-through;"/>
</menupopup>
</rule>
</template>
</menulist>
<label value="Raumtyp alternativ" />
<menulist id="lehrveranstaltung-detail-menulist-raumtypalternativ" disabled="true"
datasources="<?php echo APP_ROOT ?>rdf/raumtyp.rdf.php" flex="1"
datasources="<?php echo APP_ROOT ?>rdf/raumtyp.rdf.php" flex="1"
xmlns:RAUMTYP="http://www.technikum-wien.at/raumtyp/rdf#"
ref="http://www.technikum-wien.at/raumtyp/liste" >
<template>
<menupopup>
<menuitem value="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz"
label="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz rdf:http://www.technikum-wien.at/raumtyp/rdf#beschreibung"
uri="rdf:*"/>
</menupopup>
</template>
<template>
<rule RAUMTYP:aktiv='true'>
<menupopup>
<menuitem value="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz"
label="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz rdf:http://www.technikum-wien.at/raumtyp/rdf#beschreibung"
uri="rdf:*"/>
</menupopup>
</rule>
<rule>
<menupopup>
<menuitem value="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz"
label="rdf:http://www.technikum-wien.at/raumtyp/rdf#kurzbz rdf:http://www.technikum-wien.at/raumtyp/rdf#beschreibung"
uri="rdf:*" style="text-decoration:line-through;"/>
</menupopup>
</rule>
</template>
</menulist>
</row>
+6 -2
View File
@@ -33,6 +33,7 @@ class raumtyp extends basis_db
//Tabellenspalten
public $beschreibung; // string
public $raumtyp_kurzbz; // string
public $aktiv; //boolean
/**
@@ -42,7 +43,7 @@ class raumtyp extends basis_db
public function __construct($raumtyp_kurzbz=null)
{
parent::__construct();
if($raumtyp_kurzbz != null)
$this->load($raumtyp_kurzbz);
}
@@ -67,6 +68,7 @@ class raumtyp extends basis_db
$raumtyp_obj->beschreibung = $row->beschreibung;
$raumtyp_obj->raumtyp_kurzbz = $row->raumtyp_kurzbz;
$raumtyp_obj->aktiv = $row->aktiv;
$this->result[] = $raumtyp_obj;
@@ -99,6 +101,7 @@ class raumtyp extends basis_db
{
$this->beschreibung = $row->beschreibung;
$this->raumtyp_kurzbz = $row->kurzbz;
$this->aktiv = $row->aktiv;
}
else
@@ -135,7 +138,7 @@ class raumtyp extends basis_db
$this->errormsg = '';
return true;
}
/**
* Speichert den aktuellen Datensatz
* @return true wenn ok, false im Fehlerfall
@@ -154,6 +157,7 @@ class raumtyp extends basis_db
$this->errormsg = 'Keine gültige ID';
return false;
}
//Neuen Datensatz anlegen
$qry = 'INSERT INTO public.tbl_raumtyp (beschreibung, raumtyp_kurzbz) VALUES ('.
$this->db_add_param($this->beschreibung).', '.
+2 -1
View File
@@ -59,10 +59,11 @@ foreach ($raumtypDAO->result as $rt)
<RDF:Description id="<?php echo $rt->raumtyp_kurzbz; ?>" about="<?php echo $rdf_url.'/'.$rt->raumtyp_kurzbz; ?>" >
<RAUMTYP:kurzbz><?php echo $rt->raumtyp_kurzbz ?></RAUMTYP:kurzbz>
<RAUMTYP:beschreibung><?php echo $rt->beschreibung ?></RAUMTYP:beschreibung>
<RAUMTYP:aktiv><?php echo ($rt->aktiv=='t'?'true':'false') ?></RAUMTYP:aktiv>
</RDF:Description>
</RDF:li>
<?php
}
?>
</RDF:Seq>
</RDF:RDF>
</RDF:RDF>
+15 -1
View File
@@ -6807,6 +6807,20 @@ if(!@$db->db_query("SELECT herkunftsland_code FROM bis.tbl_bisio LIMIT 1"))
echo '<br>Spalte herkunftsland_code in bis.tbl_bisio hinzugefügt';
}
//Add column aktiv to public.tbl_raumtyp
if(!@$db->db_query("SELECT aktiv FROM public.tbl_raumtyp LIMIT 1"))
{
$qry = "ALTER TABLE public.tbl_raumtyp ADD COLUMN aktiv boolean NOT NULL DEFAULT true;
COMMENT ON COLUMN public.tbl_raumtyp.aktiv IS 'Zeigt an, ob Raumtyp aktuell ist.';
";
if(!$db->db_query($qry))
echo '<strong>public.tbl_raumtyp '.$db->db_last_error().'</strong><br>';
else
echo '<br>Spalte aktiv zu Tabelle public.tbl_raumtyp hinzugefügt';
}
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
@@ -7027,7 +7041,7 @@ $tabellen=array(
"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","zgvnation","zgvmanation","zgvdoktornation","gsstudientyp_kurzbz","aufnahmegruppe_kurzbz","udf_values","priorisierung","foerderrelevant","standort_code","zgv_erfuellt","zgvmas_erfuellt","zgvdoktor_erfuellt"),
"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","bewerbung_abgeschicktamum","rt_stufe","statusgrund_id"),
"public.tbl_raumtyp" => array("raumtyp_kurzbz","beschreibung","kosten"),
"public.tbl_raumtyp" => array("raumtyp_kurzbz","beschreibung","kosten", "aktiv"),
"public.tbl_reihungstest" => array("reihungstest_id","studiengang_kz","ort_kurzbz","anmerkung","datum","uhrzeit","updateamum","updatevon","insertamum","insertvon","ext_id","freigeschaltet","max_teilnehmer","oeffentlich","studiensemester_kurzbz","aufnahmegruppe_kurzbz","stufe","anmeldefrist"),
"public.tbl_rt_ort" => array("rt_id","ort_kurzbz","uid"),
"public.tbl_rt_person" => array("rt_person_id","person_id","rt_id","studienplan_id","anmeldedatum","teilgenommen","ort_kurzbz","punkte","insertamum","insertvon","updateamum","updatevon"),