mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 17:32:18 +00:00
Merge branch 'master' into ci
Conflicts: .gitignore composer.json include/prestudent.class.php include/securimage/securimage.php include/studienplan.class.php system/dbupdate_3.2.php tests/codesniffer/FHComplete/Sniffs/Commenting/DocBlockAlignmentSniff.php tests/codesniffer/FHComplete/Sniffs/Commenting/FunctionCommentSniff.php tests/codesniffer/FHComplete/Sniffs/Commenting/FunctionCommentTypeSniff.php tests/codesniffer/FHComplete/Sniffs/ControlStructures/ControlSignatureSniff.php tests/codesniffer/FHComplete/Sniffs/ControlStructures/ElseIfDeclarationSniff.php tests/codesniffer/FHComplete/Sniffs/ControlStructures/WhileStructuresSniff.php tests/codesniffer/FHComplete/Sniffs/Formatting/OneClassPerUseSniff.php tests/codesniffer/FHComplete/Sniffs/Formatting/UseInAlphabeticalOrderSniff.php tests/codesniffer/FHComplete/Sniffs/Functions/ClosureDeclarationSniff.php tests/codesniffer/FHComplete/Sniffs/Functions/FunctionDeclarationArgumentSpacingSniff.php tests/codesniffer/FHComplete/Sniffs/NamingConventions/CamelCapsMethodNameSniff.php tests/codesniffer/FHComplete/Sniffs/NamingConventions/UpperCaseConstantNameSniff.php tests/codesniffer/FHComplete/Sniffs/NamingConventions/ValidClassBracketsSniff.php tests/codesniffer/FHComplete/Sniffs/NamingConventions/ValidFunctionNameSniff.php tests/codesniffer/FHComplete/Sniffs/NamingConventions/ValidTraitNameSniff.php tests/codesniffer/FHComplete/Sniffs/NamingConventions/ValidVariableNameSniff.php tests/codesniffer/FHComplete/Sniffs/PHP/DisallowShortOpenTagSniff.php tests/codesniffer/FHComplete/Sniffs/PHP/TypeCastingSniff.php tests/codesniffer/FHComplete/Sniffs/Strings/ConcatenationSpacingSniff.php tests/codesniffer/FHComplete/Sniffs/WhiteSpace/CommaSpacingSniff.php tests/codesniffer/FHComplete/Sniffs/WhiteSpace/FunctionCallSpacingSniff.php tests/codesniffer/FHComplete/Sniffs/WhiteSpace/FunctionClosingBraceSpaceSniff.php tests/codesniffer/FHComplete/Sniffs/WhiteSpace/FunctionOpeningBraceSpaceSniff.php tests/codesniffer/FHComplete/Sniffs/WhiteSpace/FunctionSpacingSniff.php tests/codesniffer/FHComplete/Sniffs/WhiteSpace/ObjectOperatorSpacingSniff.php tests/codesniffer/FHComplete/Sniffs/WhiteSpace/OperatorSpacingSniff.php tests/codesniffer/FHComplete/Sniffs/WhiteSpace/ScopeIndentSniff.php tests/codesniffer/FHComplete/Sniffs/WhiteSpace/TabAndSpaceSniff.php tests/codesniffer/FHComplete/ruleset.xml tests/codesniffer/FHComplete/tests/FHCompletePHPStandardTest.php tests/codesniffer/FHComplete/tests/TestHelper.php tests/codesniffer/FHComplete/tests/bootstrap.php tests/codesniffer/FHComplete/tests/files/FHComplete/throws_pass.php tests/codesniffer/FHComplete/tests/files/bad_trait_name.php tests/codesniffer/FHComplete/tests/files/class_brackets_fail1.php tests/codesniffer/FHComplete/tests/files/class_brackets_fail2.php tests/codesniffer/FHComplete/tests/files/class_brackets_fail3.php tests/codesniffer/FHComplete/tests/files/class_underscore_prefix_pass.php tests/codesniffer/FHComplete/tests/files/control_structure_brackets_pass.php tests/codesniffer/FHComplete/tests/files/control_structure_dowhile.php tests/codesniffer/FHComplete/tests/files/control_structure_elseif.php tests/codesniffer/FHComplete/tests/files/control_structure_indentation.php tests/codesniffer/FHComplete/tests/files/control_structure_nobrackets.php tests/codesniffer/FHComplete/tests/files/control_structure_nospace.php tests/codesniffer/FHComplete/tests/files/control_structure_while.php tests/codesniffer/FHComplete/tests/files/control_structures_no_newline.php tests/codesniffer/FHComplete/tests/files/docblock_align_fail.php tests/codesniffer/FHComplete/tests/files/docblock_align_flat_pass.php tests/codesniffer/FHComplete/tests/files/docblock_align_pass.php tests/codesniffer/FHComplete/tests/files/double_space.php tests/codesniffer/FHComplete/tests/files/for_function_comment_pass.php tests/codesniffer/FHComplete/tests/files/function_comment_opening_line_fail.php tests/codesniffer/FHComplete/tests/files/function_comment_opening_line_pass.php tests/codesniffer/FHComplete/tests/files/function_comment_type_fail.php tests/codesniffer/FHComplete/tests/files/function_comment_type_pass.php tests/codesniffer/FHComplete/tests/files/function_spacing.php tests/codesniffer/FHComplete/tests/files/mixing_indent.php tests/codesniffer/FHComplete/tests/files/multiple_use.php tests/codesniffer/FHComplete/tests/files/multiple_use_pass.php tests/codesniffer/FHComplete/tests/files/operator_spacing_pass.php tests/codesniffer/FHComplete/tests/files/short_open_tags_fail.php tests/codesniffer/FHComplete/tests/files/short_open_tags_pass.php tests/codesniffer/FHComplete/tests/files/space_tab.php tests/codesniffer/FHComplete/tests/files/tab_space.php tests/codesniffer/FHComplete/tests/files/traits_no_order.php tests/codesniffer/FHComplete/tests/files/traits_pass.php tests/codesniffer/FHComplete/tests/files/type_casting_fail.php tests/codesniffer/FHComplete/tests/files/type_casting_pass.php tests/codesniffer/FHComplete/tests/files/use_class_and_closure_pass.php tests/codesniffer/FHComplete/tests/files/use_closure_pass.php tests/codesniffer/FHComplete/tests/files/use_no_order.php tests/codesniffer/FHComplete/tests/files/use_ok_pass.php tests/codesniffer/FHComplete/tests/files/use_with_commas.php tests/codesniffer/FHComplete/tests/files/variable_name_pass.php tests/codesniffer/FHComplete/tests/files/whitespace_comma.php tests/codesniffer/FHComplete/tests/files/whitespace_comma_before.php tests/codesniffer/FHComplete/tests/files/whitespace_comma_pass.php tests/codesniffer/FHComplete/tests/ruleset.xml
This commit is contained in:
Regular → Executable
+137
-63
@@ -20,6 +20,8 @@
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
*/
|
||||
require_once(dirname(__FILE__).'/datum.class.php');
|
||||
// require_once(dirname(__FILE__).'/person.class.php');
|
||||
// require_once(dirname(__FILE__).'/log.class.php');
|
||||
|
||||
// CI
|
||||
require_once(dirname(__FILE__).'/../ci_hack.php');
|
||||
@@ -53,17 +55,17 @@ class prestudent extends Person_model
|
||||
public $punkte; //rt_gesamtpunkte
|
||||
public $rt_punkte1;
|
||||
public $rt_punkte2;
|
||||
public $rt_punkte3 = 0;
|
||||
public $bismelden = true;
|
||||
public $rt_punkte3 = 0;
|
||||
public $bismelden = true;
|
||||
public $anmerkung;
|
||||
public $anmerkung_status;
|
||||
public $mentor;
|
||||
public $ext_id_prestudent;
|
||||
public $dual = false;
|
||||
public $zgvdoktor_code;
|
||||
public $zgvdoktorort;
|
||||
public $zgvdoktordatum;
|
||||
public $zgvdoktornation;
|
||||
public $dual = false;
|
||||
public $zgvdoktor_code;
|
||||
public $zgvdoktorort;
|
||||
public $zgvdoktordatum;
|
||||
public $zgvdoktornation;
|
||||
|
||||
public $status_kurzbz;
|
||||
public $studiensemester_kurzbz;
|
||||
@@ -572,8 +574,8 @@ class prestudent extends Person_model
|
||||
(
|
||||
SELECT
|
||||
*, (SELECT status_kurzbz FROM tbl_prestudentstatus
|
||||
WHERE prestudent_id=prestudent.prestudent_id $stsemqry
|
||||
ORDER BY datum DESC, insertamum DESC, ext_id DESC LIMIT 1) AS rolle
|
||||
WHERE prestudent_id=prestudent.prestudent_id $stsemqry
|
||||
ORDER BY datum DESC, insertamum DESC, ext_id DESC LIMIT 1) AS rolle
|
||||
FROM tbl_prestudent prestudent ORDER BY prestudent_id
|
||||
) a, tbl_prestudentstatus, tbl_person
|
||||
WHERE a.rolle=tbl_prestudentstatus.status_kurzbz AND
|
||||
@@ -979,9 +981,13 @@ class prestudent extends Person_model
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "SELECT tbl_prestudentstatus.*, bezeichnung AS studienplan_bezeichnung
|
||||
FROM public.tbl_prestudentstatus LEFT JOIN lehre.tbl_studienplan USING (studienplan_id)
|
||||
WHERE prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER);
|
||||
$qry = "SELECT tbl_prestudentstatus.*, bezeichnung AS studienplan_bezeichnung,
|
||||
tbl_status.bezeichnung_mehrsprachig
|
||||
FROM public.tbl_prestudentstatus
|
||||
LEFT JOIN lehre.tbl_studienplan USING (studienplan_id)
|
||||
JOIN public.tbl_status USING (status_kurzbz)
|
||||
WHERE tbl_status.status_kurzbz = tbl_prestudentstatus.status_kurzbz
|
||||
AND prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER);
|
||||
|
||||
if($studiensemester_kurzbz!='')
|
||||
$qry.=" AND studiensemester_kurzbz=".$this->db_add_param($studiensemester_kurzbz);
|
||||
@@ -996,6 +1002,7 @@ class prestudent extends Person_model
|
||||
{
|
||||
$this->prestudent_id = $row->prestudent_id;
|
||||
$this->status_kurzbz = $row->status_kurzbz;
|
||||
$this->status_mehrsprachig = $this->db_parse_lang_array($row->bezeichnung_mehrsprachig);
|
||||
$this->studiensemester_kurzbz = $row->studiensemester_kurzbz;
|
||||
$this->ausbildungssemester = $row->ausbildungssemester;
|
||||
$this->datum = $row->datum;
|
||||
@@ -1125,9 +1132,9 @@ class prestudent extends Person_model
|
||||
$obj->ext_id_prestudent = $row->ext_id;
|
||||
$obj->dual = $this->db_parse_bool($row->dual);
|
||||
$obj->ausstellungsstaat = $row->ausstellungsstaat;
|
||||
$obj->zgvdoktor_code = $row->zgvdoktor_code;
|
||||
$obj->zgvdoktorort = $row->zgvdoktorort;
|
||||
$obj->zgvdoktordatum = $row->zgvdoktordatum;
|
||||
$obj->zgvdoktor_code = $row->zgvdoktor_code;
|
||||
$obj->zgvdoktorort = $row->zgvdoktorort;
|
||||
$obj->zgvdoktordatum = $row->zgvdoktordatum;
|
||||
|
||||
$this->result[] = $obj;
|
||||
}
|
||||
@@ -1140,56 +1147,60 @@ class prestudent extends Person_model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gibt die eingetragenen ZGV zurück
|
||||
* @return array
|
||||
*/
|
||||
public function getZgv() {
|
||||
/**
|
||||
* Gibt die eingetragenen ZGV zurück
|
||||
* @return array
|
||||
*/
|
||||
public function getZgv()
|
||||
{
|
||||
|
||||
$zgv = array(
|
||||
'bachelor' => array(),
|
||||
'master' => array(),
|
||||
// 'doktor' => array(),
|
||||
);
|
||||
$attribute = array(
|
||||
'art',
|
||||
'ort',
|
||||
'datum',
|
||||
'nation',
|
||||
);
|
||||
$db_attribute = array(
|
||||
'zgv_code',
|
||||
'zgvort',
|
||||
'zgvdatum',
|
||||
'zgvnation',
|
||||
'zgvmas_code',
|
||||
'zgvmaort',
|
||||
'zgvmadatum',
|
||||
'zgvmanation',
|
||||
'zgvdoktor_code',
|
||||
'zgvdoktorort',
|
||||
'zgvdoktordatum',
|
||||
'zgvdoktornation',
|
||||
);
|
||||
$zgv = array
|
||||
(
|
||||
'bachelor' => array(),
|
||||
'master' => array(),
|
||||
//'doktor' => array(),
|
||||
);
|
||||
$attribute = array
|
||||
(
|
||||
'art',
|
||||
'ort',
|
||||
'datum',
|
||||
'nation',
|
||||
);
|
||||
$db_attribute = array
|
||||
(
|
||||
'zgv_code',
|
||||
'zgvort',
|
||||
'zgvdatum',
|
||||
'zgvnation',
|
||||
'zgvmas_code',
|
||||
'zgvmaort',
|
||||
'zgvmadatum',
|
||||
'zgvmanation',
|
||||
'zgvdoktor_code',
|
||||
'zgvdoktorort',
|
||||
'zgvdoktordatum',
|
||||
'zgvdoktornation',
|
||||
);
|
||||
|
||||
foreach($this->result as $prestudent) {
|
||||
|
||||
foreach($zgv as &$value) {
|
||||
|
||||
foreach($attribute as $attribut) {
|
||||
$db_attribute_name = current($db_attribute);
|
||||
|
||||
if($prestudent->$db_attribute_name) {
|
||||
$value[$attribut] = $prestudent->$db_attribute_name;
|
||||
}
|
||||
next($db_attribute);
|
||||
}
|
||||
}
|
||||
reset($db_attribute);
|
||||
}
|
||||
|
||||
return $zgv;
|
||||
}
|
||||
foreach($this->result as $prestudent)
|
||||
{
|
||||
foreach($zgv as &$value)
|
||||
{
|
||||
foreach($attribute as $attribut)
|
||||
{
|
||||
$db_attribute_name = current($db_attribute);
|
||||
if($prestudent->$db_attribute_name)
|
||||
{
|
||||
$value[$attribut] = $prestudent->$db_attribute_name;
|
||||
}
|
||||
next($db_attribute);
|
||||
}
|
||||
}
|
||||
reset($db_attribute);
|
||||
}
|
||||
return $zgv;
|
||||
}
|
||||
|
||||
/**
|
||||
* Liefert die Anzahl der Bewerber im ausgewaehlten Bereich
|
||||
@@ -1718,4 +1729,67 @@ class prestudent extends Person_model
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Laedt alle Studenten eines Studienplans und eines Studiensemesters
|
||||
* @param $studienplan_id
|
||||
* @param $studiensemester_kurzbz
|
||||
* @param $studiengang_kz
|
||||
* @return array mit allen Prestudenten, welche sich für den angegebenen Studienplan im angegebenen Semester beworben haben
|
||||
*/
|
||||
public function getAllStudentenFromStudienplanAndStudsem($studienplan_id, $studiensemester_kurzbz, $studiengang_kz)
|
||||
{
|
||||
if(!is_numeric($studienplan_id))
|
||||
{
|
||||
$this->errormsg = 'studienplan_id ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!$studiensemester_kurzbz || $studiensemester_kurzbz == "")
|
||||
{
|
||||
$this->errormsg = 'studiensemester_kurzbz ist ungueltig';
|
||||
return false;
|
||||
}
|
||||
|
||||
$qry = "SELECT DISTINCT prestudent_id, vorname, nachname, gebdatum, rt_gesamtpunkte, tbl_prestudent.studiengang_kz, bis.tbl_zgvgruppe.bezeichnung, get_rolle_prestudent(prestudent_id, null) as laststatus
|
||||
FROM
|
||||
public.tbl_prestudent
|
||||
JOIN public.tbl_person USING(person_id)
|
||||
LEFT JOIN bis.tbl_zgvgruppe_zuordnung USING(zgv_code)
|
||||
LEFT JOIN bis.tbl_zgvgruppe USING(gruppe_kurzbz)
|
||||
WHERE
|
||||
tbl_prestudent.studiengang_kz=". $this->db_add_param($studiengang_kz)."
|
||||
AND EXISTS(
|
||||
SELECT
|
||||
1
|
||||
FROM
|
||||
public.tbl_prestudentstatus
|
||||
WHERE
|
||||
tbl_prestudent.prestudent_id=tbl_prestudentstatus.prestudent_id
|
||||
AND studiensemester_kurzbz=". $this->db_add_param($studiensemester_kurzbz)."
|
||||
AND status_kurzbz='Bewerber'
|
||||
AND (
|
||||
studienplan_id=". $this->db_add_param($studienplan_id)."
|
||||
OR
|
||||
(anmerkung like '%' || (SELECT orgform_kurzbz || '_' || sprache FROM lehre.tbl_studienplan WHERE studienplan_id=". $this->db_add_param($studienplan_id).") || '%')
|
||||
)
|
||||
);";
|
||||
|
||||
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
$ret = array();
|
||||
|
||||
while($row = $this->db_fetch_object($result))
|
||||
$ret[] = $row;
|
||||
|
||||
return $ret;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = 'Fehler beim Laden der Daten';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user