diff --git a/content/student/studentenoverlay.xul.php b/content/student/studentenoverlay.xul.php
index b509b2711..0a6f4f076 100644
--- a/content/student/studentenoverlay.xul.php
+++ b/content/student/studentenoverlay.xul.php
@@ -365,14 +365,14 @@ else
class="sortDirectionIndicator"
sort="rdf:http://www.technikum-wien.at/student/rdf#aufnahmegruppe_kurzbz" onclick="StudentTreeSort()"/>
-
-
+ -->
@@ -391,7 +391,7 @@ else
+ sort="rdf:http://www.technikum-wien.at/student/rdf#priorisierung_realtiv" onclick="StudentTreeSort()"/>
-->
-
-
+
-
+
diff --git a/include/prestudent.class.php b/include/prestudent.class.php
index eca7e22cf..d5a79460a 100644
--- a/include/prestudent.class.php
+++ b/include/prestudent.class.php
@@ -1982,4 +1982,62 @@ class prestudent extends person
}
}
+
+ /**
+ * Liefert die relative Priorität (zB 1, 2, 3) eines PreStudenten Anhand seiner absoluten Priorität (zB 9, 10, 11)
+
+ * @param integer $prestudent_id PrestudentID deren relative Priorität ermittelt werden soll
+ * @param string $priorisierungAbsolut Absolute Priorität deren relative Platzierung ermittelt werden soll
+
+ * @return integer Relative Platzierung des PreStudenten oder false im Fehlerfall
+ */
+ public function getRelativePriorisierungFromAbsolut($prestudent_id, $priorisierungAbsolut)
+ {
+ $qry = "SELECT count(*) AS prio_relativ
+ FROM (
+ SELECT *,
+ (
+ SELECT status_kurzbz
+ FROM PUBLIC.tbl_prestudentstatus
+ WHERE prestudent_id = pss.prestudent_id
+ ORDER BY datum DESC,
+ tbl_prestudentstatus.insertamum DESC LIMIT 1
+ ) AS laststatus
+ FROM PUBLIC.tbl_prestudent pss
+ JOIN PUBLIC.tbl_prestudentstatus USING (prestudent_id)
+ WHERE person_id = (
+ SELECT person_id
+ FROM PUBLIC.tbl_prestudent
+ WHERE prestudent_id = ".$this->db_add_param($prestudent_id, FHC_INTEGER)."
+ )
+ AND studiensemester_kurzbz = (
+ SELECT studiensemester_kurzbz
+ FROM PUBLIC.tbl_prestudentstatus
+ WHERE prestudent_id = ".$this->db_add_param($prestudent_id, FHC_INTEGER)."
+ AND status_kurzbz = 'Interessent' LIMIT 1
+ )
+ AND status_kurzbz = 'Interessent'
+ ) prest
+ WHERE laststatus NOT IN ('Abbrecher', 'Abgewiesener', 'Absolvent')
+ AND priorisierung <= ".$this->db_add_param($priorisierungAbsolut, FHC_INTEGER);
+
+ if($result = $this->db_query($qry))
+ {
+ if($row = $this->db_fetch_object($result))
+ {
+ return $row->prio_relativ;
+ }
+ else
+ {
+ $this->errormsg = 'Fehler beim Laden der Daten';
+ return false;
+ }
+ }
+ else
+ {
+ $this->errormsg = 'Fehler beim Laden der Daten';
+ return false;
+ }
+
+ }
}
diff --git a/rdf/student.rdf.php b/rdf/student.rdf.php
index edfd1e0b8..795e98ff3 100644
--- a/rdf/student.rdf.php
+++ b/rdf/student.rdf.php
@@ -315,6 +315,8 @@ function draw_prestudent($row)
global $rdf_url, $datum_obj, $stg_arr;
$reihungstest = new reihungstest($row->reihungstest_id);
$rt_datum = $reihungstest->datum;
+ $prioRelativ = new prestudent();
+ $prioRelativ = $prioRelativ->getRelativePriorisierungFromAbsolut($row->prestudent_id, $row->priorisierung);
if($row->prestudent_id!='')
{
echo '
@@ -338,10 +340,10 @@ function draw_prestudent($row)
ausstellungsstaat.']]>
aufnahmeschluessel.']]>
facheinschlberuf?'true':'false').']]>
- reihungstest_id.']]>
+
punkte.']]>
bismelden?'true':'false').']]>
dual?'true':'false').']]>
@@ -351,6 +353,7 @@ function draw_prestudent($row)
gsstudientyp_kurzbz.']]>
aufnahmegruppe_kurzbz.']]>
priorisierung.']]>
+ priorisierung.')'.']]>
';
}