gruppe.class.php: function getgruppe um die parameter aktiv und order erweitert

freifach.php: DropDown der Gruppen wird nun alphabetisch sortiert. Hinweis, wenn ein Student schon in dieser Gruppe (in einem älteren Semester) ist. Diese alte Gruppenzuordnung wird nun automatisch mit der Neuen überschrieben.
This commit is contained in:
Manfred Kindl
2014-02-25 16:44:36 +00:00
parent 9688784eb9
commit 7c54e21d31
2 changed files with 46 additions and 18 deletions
+10 -2
View File
@@ -236,9 +236,12 @@ class gruppe extends basis_db
* @param $semester
* @param $mailgrp
* @param $sichtbar
* @param $content_visible
* @param $aktiv
* @param $order Spalte nach der sortiert werden soll. Default='beschreibung'
* @return boolean
*/
public function getgruppe($studiengang_kz=null, $semester=null, $mailgrp=null, $sichtbar=null, $content_visible=null)
public function getgruppe($studiengang_kz=null, $semester=null, $mailgrp=null, $sichtbar=null, $content_visible=null, $aktiv=null, $order=null)
{
$qry = 'SELECT * FROM public.tbl_gruppe WHERE 1=1';
if(!is_null($studiengang_kz) && $studiengang_kz!='')
@@ -251,7 +254,12 @@ class gruppe extends basis_db
$qry .= " AND sichtbar=".$this->db_add_param($sichtbar, FHC_BOOLEAN);
if(!is_null($content_visible))
$qry .= " AND content_visible=".$this->db_add_param($content_visible, FHC_BOOLEAN);
$qry.=" ORDER BY beschreibung";
if(!is_null($aktiv) && $aktiv!='')
$qry .= " AND aktiv=".$this->db_add_param($aktiv, FHC_BOOLEAN);
if(!is_null($order) && $order!='')
$qry .= " ORDER BY ".$order;
else
$qry.=" ORDER BY beschreibung";
if($this->db_query($qry))
{
while($row = $this->db_fetch_object())