diff --git a/include/standort.class.php b/include/standort.class.php
index 1c5a6e9cc..c92691d52 100644
--- a/include/standort.class.php
+++ b/include/standort.class.php
@@ -638,6 +638,46 @@ class standort extends basis_db
}
+
+ /**
+ * Gibt alle Standorte zurück, die zumindest mit 1 Ort verknüpft sind
+ * @return true wenn ok, false im Fehlerfall
+ */
+ public function getAllStandorteWithOrt()
+ {
+ $qry = "SELECT standort.*
+ FROM public.tbl_firma AS firma, public.tbl_adresse AS adresse, public.tbl_standort AS standort
+ WHERE firma.firma_id = standort.firma_id
+ AND standort.adresse_id = adresse.adresse_id
+ AND standort.standort_id IN
+ (SELECT DISTINCT standort_id FROM public.tbl_ort);";
+
+ if($this->db_query($qry))
+ {
+ while($row = $this->db_fetch_object())
+ {
+ $standort = new standort();
+
+ $standort->standort_id = $row->standort_id;
+ $standort->firma_id = $row->firma_id;
+ $standort->adresse_id = $row->adresse_id;
+ $standort->kurzbz = $row->kurzbz;
+ $standort->bezeichnung = $row->bezeichnung;
+ $standort->insertvon = $row->insertvon;
+ $standort->insertamum = $row->insertamum;
+ $standort->updatevon = $row->updatevon;
+ $standort->updateamum = $row->updateamum;
+
+ $this->result[] = $standort;
+ }
+ return true;
+ }
+ else
+ {
+ $this->errormsg="Fehler bei der Abfrage aufgetreten.";
+ return false;
+ }
+ }
}
diff --git a/rdf/anwesenheitsliste.xml.php b/rdf/anwesenheitsliste.xml.php
index 9cc1aaebb..c8021ed82 100644
--- a/rdf/anwesenheitsliste.xml.php
+++ b/rdf/anwesenheitsliste.xml.php
@@ -36,6 +36,7 @@ isset($_GET['stg_kz']) ? $studiengang = $_GET['stg_kz'] : $studiengang = NULL;
isset($_GET['semester']) ? $semester = $_GET['semester'] : $semester = NULL;
isset($_GET['lehreinheit']) ? $lehreinheit = $_GET['lehreinheit'] : $lehreinheit = NULL;
isset($_GET['fixangestellt']) ? $fixangestellt = $_GET['fixangestellt'] : $fixangestellt = NULL;
+isset($_GET['standort']) ? $standort = $_GET['standort'] : $standort = NULL;
if($von)
$studiensemester = getStudiensemesterFromDatum($von);
@@ -48,12 +49,14 @@ $data = array();
*/
// Daten der Lehreinheiten ermitteln
$qry = "SELECT le.lehreinheit_id, le.lehrveranstaltung_id, lv.lvnr, lv.bezeichnung AS lvbez, stg.bezeichnung AS stgbez, "
- . "sp.ort_kurzbz, datum, beginn, ende "
+ . "sp.ort_kurzbz, datum, beginn, ende, sto.bezeichnung AS standort "
. "FROM lehre.tbl_lehreinheit le "
. "JOIN lehre.tbl_lehrveranstaltung lv ON lv.lehrveranstaltung_id = le.lehrveranstaltung_id "
. "JOIN public.tbl_studiengang stg ON stg.studiengang_kz = lv.studiengang_kz "
. "JOIN lehre.tbl_stundenplan sp ON (sp.lehreinheit_id=le.lehreinheit_id) "
. "JOIN lehre.tbl_stunde stu ON stu.stunde = sp.stunde "
+ . "JOIN public.tbl_ort ort ON sp.ort_kurzbz = ort.ort_kurzbz "
+ . "JOIN public.tbl_standort sto ON ort.standort_id = sto.standort_id "
. "WHERE 1=1";
if($studiengang!='')
@@ -70,6 +73,8 @@ if(!is_null($stundevon))
$qry.=" AND stu.stunde>=".$db->db_add_param($stundevon);
if(!is_null($stundebis))
$qry.=" AND stu.stunde<=".$db->db_add_param($stundebis);
+if($standort)
+ $qry.=" AND sto.standort_id=".$db->db_add_param($standort);
$qry .= " ORDER BY datum, beginn";
if($db->db_query($qry))
@@ -160,6 +165,7 @@ foreach($data as $lehreinheit_id => $value)
echo "\n