mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 12:19:28 +00:00
"inofficial" grades like "entschuldigt", "unentschuldigt" are now not shown on official documents (Studienerfolgsbestätigung, Zeugnis, Diplomasupplement, Lehrveranstaltungszeugnis, Zertifikat)
This commit is contained in:
+22
-9
@@ -132,7 +132,7 @@ class note extends basis_db
|
||||
$this->db_add_param($this->anmerkung).', '.
|
||||
$this->db_add_param($this->positiv, FHC_BOOLEAN).','.
|
||||
$this->db_add_param($this->notenwert).','.
|
||||
$this->db_add_parma($this->aktiv, FHC_BOOLEAN).','.
|
||||
$this->db_add_param($this->aktiv, FHC_BOOLEAN).','.
|
||||
$this->db_add_param($this->lehre, FHC_BOOLEAN).');';
|
||||
}
|
||||
else
|
||||
@@ -158,15 +158,21 @@ class note extends basis_db
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Laedt alle Noten
|
||||
* Laedt alle Noten, inklusive inaktiven Noten
|
||||
* @param null $offiziell wenn true, werden nur Noten, die auf offiziellen Dokumenten gedruckt weden können, geladen
|
||||
* @return true wenn ok, false wenn Fehler
|
||||
*/
|
||||
public function getAll()
|
||||
*/
|
||||
public function getAll($offiziell = null)
|
||||
{
|
||||
$qry = "SELECT * FROM lehre.tbl_note ORDER BY note";
|
||||
|
||||
$qry = "SELECT * FROM lehre.tbl_note";
|
||||
|
||||
if(is_bool($offiziell))
|
||||
$qry .= " WHERE offiziell = ".$this->db_add_param($offiziell, FHC_BOOLEAN);
|
||||
|
||||
$qry .= " ORDER BY note";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object())
|
||||
@@ -195,11 +201,18 @@ class note extends basis_db
|
||||
|
||||
/**
|
||||
* Laedt alle aktive Noten
|
||||
* @param null $offiziell wenn true, werden nur Noten, die auf offiziellen Dokumenten gedruckt weden können, geladen
|
||||
* @return true wenn ok, false wenn Fehler
|
||||
*/
|
||||
public function getActive()
|
||||
public function getActive($offiziell = null)
|
||||
{
|
||||
$qry = "SELECT * FROM lehre.tbl_note WHERE aktiv = TRUE ORDER BY note";
|
||||
$qry = "SELECT * FROM lehre.tbl_note WHERE aktiv = TRUE";
|
||||
|
||||
|
||||
if(is_bool($offiziell))
|
||||
$qry .= " AND offiziell = ".$this->db_add_param($offiziell, FHC_BOOLEAN);
|
||||
|
||||
$qry .= " ORDER BY note";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
|
||||
@@ -622,7 +622,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
tbl_lehrveranstaltung.bezeichnung, COALESCE(tbl_lehrveranstaltung.bezeichnung_english,
|
||||
tbl_lehrveranstaltung.bezeichnung) as bezeichnung_english, tbl_lehrveranstaltung.semester,
|
||||
tbl_lehrveranstaltung.semesterstunden, tbl_lehrveranstaltung.ects, zeugnis.studiensemester_kurzbz,
|
||||
zeugnis.note, note.bezeichnung note_bezeichnung, note.anmerkung, sort, tbl_lehrveranstaltung.sws
|
||||
zeugnis.note, note.bezeichnung note_bezeichnung, note.anmerkung, note.offiziell, sort, tbl_lehrveranstaltung.sws
|
||||
FROM
|
||||
lehre.tbl_zeugnisnote zeugnis
|
||||
JOIN lehre.tbl_note note USING(note)
|
||||
@@ -654,7 +654,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
$arrayLvAusbildungssemester[$row_stud->lehrveranstaltung_id]['ects'] = $row_stud->ects;
|
||||
$arrayLvAusbildungssemester[$row_stud->lehrveranstaltung_id]['sws_lv'] = $row_stud->sws;
|
||||
$arrayLvAusbildungssemester[$row_stud->lehrveranstaltung_id]['studiensemester_kurzbz'] = $row_stud->studiensemester_kurzbz;
|
||||
$arrayLvAusbildungssemester[$row_stud->lehrveranstaltung_id]['note'] = $row_stud->anmerkung;
|
||||
$arrayLvAusbildungssemester[$row_stud->lehrveranstaltung_id]['note'] = $db->db_parse_bool($row_stud->offiziell) ? $row_stud->anmerkung : "";
|
||||
$arrayLvAusbildungssemester[$row_stud->lehrveranstaltung_id]['sort'] = $row_stud->sort;
|
||||
$ects_total += $row_stud->ects;
|
||||
$semester_ects +=$row_stud->ects;
|
||||
@@ -677,7 +677,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
$arrayLvAusbildungssemester[$row_stud->lehrveranstaltung_id]['ects'] = $row_stud->ects;
|
||||
$arrayLvAusbildungssemester[$row_stud->lehrveranstaltung_id]['sws_lv'] = $row_stud->sws;
|
||||
$arrayLvAusbildungssemester[$row_stud->lehrveranstaltung_id]['studiensemester_kurzbz'] = $row_stud->studiensemester_kurzbz;
|
||||
$arrayLvAusbildungssemester[$row_stud->lehrveranstaltung_id]['note'] = $row_stud->anmerkung;
|
||||
$arrayLvAusbildungssemester[$row_stud->lehrveranstaltung_id]['note'] = $db->db_parse_bool($row_stud->offiziell) ? $row_stud->anmerkung : "";
|
||||
$arrayLvAusbildungssemester[$row_stud->lehrveranstaltung_id]['sort'] = $row_stud->sort;
|
||||
}
|
||||
}
|
||||
@@ -857,7 +857,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
|
||||
$qry_outgoing_note = "
|
||||
SELECT
|
||||
anmerkung, benotungsdatum, lehrform_kurzbz
|
||||
anmerkung, offiziell, benotungsdatum, lehrform_kurzbz
|
||||
FROM
|
||||
lehre.tbl_zeugnisnote
|
||||
JOIN tbl_lehrveranstaltung using(lehrveranstaltung_id)
|
||||
@@ -870,7 +870,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
{
|
||||
if($row_outgoing_note = $db->db_fetch_object($result_outgoing_note))
|
||||
{
|
||||
$note_outgoing = $row_outgoing_note->anmerkung;
|
||||
$note_outgoing = $db->db_parse_bool($row_outgoing_note->offiziell) ? $row_outgoing_note->anmerkung : "";
|
||||
$benotungsdatum_outgoing = $datum->formatDatum($row_outgoing_note->benotungsdatum,'d/m/Y');
|
||||
$lehrform_kurzbz_outgoing = $row_outgoing_note->lehrform_kurzbz;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
|
||||
$note_arr = array();
|
||||
$note = new note();
|
||||
$note->getAll();
|
||||
$note->getAll($offiziell = true);
|
||||
foreach ($note->result as $n){
|
||||
$note_arr[$n->note] = $n->anmerkung;
|
||||
$note_bezeichnung_arr[$n->note] = $n->bezeichnung;
|
||||
@@ -236,7 +236,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
$obj = new zeugnisnote();
|
||||
$obj->load($lehrveranstaltung_id, $uid_arr[$i], $studiensemester_kurzbz);
|
||||
|
||||
if ($obj->note)
|
||||
if ($obj->note && isset($note_arr[$obj->note]))
|
||||
{
|
||||
$note = $note_arr[$obj->note];
|
||||
$note_bezeichnung = $note_bezeichnung_arr[$obj->note];
|
||||
|
||||
@@ -85,7 +85,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
|
||||
$note_arr = array();
|
||||
$note = new note();
|
||||
$note->getAll();
|
||||
$note->getAll($offiziell = true);
|
||||
foreach ($note->result as $n){
|
||||
$note_arr[$n->note] = $n->anmerkung;
|
||||
$note_bezeichnung_arr[$n->note] = $n->bezeichnung;
|
||||
@@ -283,7 +283,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
$obj = new zeugnisnote();
|
||||
$obj->load($lehrveranstaltung_id, $uid_arr[$i], $studiensemester_kurzbz);
|
||||
|
||||
if ($obj->note)
|
||||
if ($obj->note && isset($note_arr[$obj->note]))
|
||||
{
|
||||
$note = $note_arr[$obj->note];
|
||||
$note_bezeichnung = $note_bezeichnung_arr[$obj->note];
|
||||
|
||||
@@ -218,7 +218,7 @@ function draw_studienerfolg($uid, $studiensemester_kurzbz)
|
||||
{
|
||||
if($row->zeugnis)
|
||||
{
|
||||
if (trim($row->note)!=='')
|
||||
if (trim($row->note)!=='' && isset($note_arr[$row->note]))
|
||||
$note = $note_arr[$row->note];
|
||||
else
|
||||
$note = "";
|
||||
@@ -297,7 +297,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
$note_arr = array();
|
||||
$note_wert = array();
|
||||
$note = new note();
|
||||
$note->getAll();
|
||||
$note->getAll($offiziell = true);
|
||||
foreach ($note->result as $n)
|
||||
{
|
||||
$note_arr[$n->note] = $n->anmerkung;
|
||||
|
||||
@@ -77,11 +77,10 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
|
||||
$note_arr = array();
|
||||
$note = new note();
|
||||
$note->getAll();
|
||||
$note->getAll($offiziell = true);
|
||||
foreach ($note->result as $n){
|
||||
$note_arr[$n->note] = $n->anmerkung;
|
||||
$note_bezeichnung_arr[$n->note] = $n->bezeichnung;
|
||||
|
||||
}
|
||||
if(isset($_GET['ss']))
|
||||
$studiensemester_kurzbz = $_GET['ss'];
|
||||
@@ -221,7 +220,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
$obj = new zeugnisnote();
|
||||
$obj->load($lehrveranstaltung_id, $uid_arr[$i], $studiensemester_kurzbz);
|
||||
|
||||
if ($obj->note)
|
||||
if ($obj->note && isset($note_arr[$obj->note]))
|
||||
{
|
||||
$note = $note_arr[$obj->note];
|
||||
$note_bezeichnung = $note_bezeichnung_arr[$obj->note];
|
||||
|
||||
+3
-3
@@ -81,7 +81,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
|
||||
$note_arr = array();
|
||||
$note = new note();
|
||||
$note->getAll();
|
||||
$note->getAll($offiziell = true);
|
||||
foreach ($note->result as $n)
|
||||
$note_arr[$n->note] = $n->anmerkung;
|
||||
|
||||
@@ -257,7 +257,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
{
|
||||
if($row->zeugnis)
|
||||
{
|
||||
if (trim($row->note)!=='')
|
||||
if (trim($row->note)!=='' && isset($note_arr[$row->note]))
|
||||
$note = $note_arr[$row->note];
|
||||
else
|
||||
$note = "";
|
||||
@@ -323,7 +323,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
//$note = $note_arr[$projektarbeit[$row->lehrveranstaltung_id]['note']];
|
||||
$note = $projektarbeit[$row->lehrveranstaltung_id]['note'];
|
||||
//$nl = str_repeat('\n',($anzahl_nl));
|
||||
$xml_fussnote .=' <note>'.(isset($note_arr[$note])?$note_arr[$note]:$note).$nl.'</note>';
|
||||
$xml_fussnote .=' <note>'.(isset($note_arr[$note])?$note_arr[$note]:"").$nl.'</note>';
|
||||
$xml_fussnote .=' <sws>'.$nl.'</sws>';
|
||||
$xml_fussnote .=' <sws_lv>'.$nl.'</sws_lv>';
|
||||
$xml_fussnote .=' <ects>'.$nl.'</ects>';
|
||||
|
||||
+39
-1
@@ -426,6 +426,44 @@ if($result = @$db->db_query("SELECT 1 FROM lehre.tbl_note WHERE anmerkung = 'ue'
|
||||
}
|
||||
}
|
||||
|
||||
// Spalte offiziell in lehre.tbl_note
|
||||
if(!$result = @$db->db_query("SELECT offiziell FROM lehre.tbl_note LIMIT 1;"))
|
||||
{
|
||||
$qry = "ALTER TABLE lehre.tbl_note ADD COLUMN offiziell boolean NOT NULL DEFAULT true;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_note: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>lehre.tbl_note: Spalte offiziell hinzugefuegt!<br>';
|
||||
}
|
||||
|
||||
// Spalte bezeichnung_mehrsprachig in lehre.tbl_note
|
||||
if(!$result = @$db->db_query("SELECT bezeichnung_mehrsprachig FROM lehre.tbl_note LIMIT 1"))
|
||||
{
|
||||
$qry = "ALTER TABLE lehre.tbl_note ADD COLUMN bezeichnung_mehrsprachig varchar(64)[];";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_note '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo 'lehre.tbl_note: Spalte bezeichnung_mehrsprachig hinzugefuegt!<br>';
|
||||
|
||||
// Bezeichnung_mehrsprachig aus existierender Bezeichnung vorausfuellen. Ein Eintrag fuer jede Sprache mit Content aktiv.
|
||||
$qry_help = "SELECT index FROM public.tbl_sprache WHERE content=TRUE;";
|
||||
if(!$result = $db->db_query($qry_help))
|
||||
echo '<strong>tbl_note bezeichnung_mehrsprachig: Fehler beim ermitteln der Sprachen: '.$db->db_last_error().'</strong>';
|
||||
else
|
||||
{
|
||||
$qry='';
|
||||
while($row = $db->db_fetch_object($result))
|
||||
$qry.= "UPDATE lehre.tbl_note set bezeichnung_mehrsprachig[".$row->index."] = bezeichnung;";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>Setzen der bezeichnung_mehrsprachig fehlgeschlagen: '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo 'lehre.tbl_note: bezeichnung_mehrprachig automatisch aus existierender Bezeichnung uebernommen<br>';
|
||||
}
|
||||
}
|
||||
|
||||
// Column design_uid, betrieb_uid and operativ_uid to tbl_service
|
||||
if(!$result = @$db->db_query("SELECT design_uid FROM public.tbl_service LIMIT 1;"))
|
||||
{
|
||||
@@ -925,7 +963,7 @@ $tabellen=array(
|
||||
"lehre.tbl_notenschluessel" => array("notenschluessel_kurzbz","bezeichnung"),
|
||||
"lehre.tbl_notenschluesselaufteilung" => array("notenschluesselaufteilung_id","notenschluessel_kurzbz","note","punkte"),
|
||||
"lehre.tbl_notenschluesselzuordnung" => array("notenschluesselzuordnung_id","notenschluessel_kurzbz","lehrveranstaltung_id","studienplan_id","oe_kurzbz","studiensemester_kurzbz"),
|
||||
"lehre.tbl_note" => array("note","bezeichnung","anmerkung","farbe","positiv","notenwert","aktiv","lehre"),
|
||||
"lehre.tbl_note" => array("note","bezeichnung","anmerkung","farbe","positiv","notenwert","aktiv","lehre","offiziell","bezeichnung_mehrsprachig"),
|
||||
"lehre.tbl_projektarbeit" => array("projektarbeit_id","projekttyp_kurzbz","titel","lehreinheit_id","student_uid","firma_id","note","punkte","beginn","ende","faktor","freigegeben","gesperrtbis","stundensatz","gesamtstunden","themenbereich","anmerkung","updateamum","updatevon","insertamum","insertvon","ext_id","titel_english","seitenanzahl","abgabedatum","kontrollschlagwoerter","schlagwoerter","schlagwoerter_en","abstract", "abstract_en", "sprache","final"),
|
||||
"lehre.tbl_projektbetreuer" => array("person_id","projektarbeit_id","betreuerart_kurzbz","note","faktor","name","punkte","stunden","stundensatz","updateamum","updatevon","insertamum","insertvon","ext_id","vertrag_id"),
|
||||
"lehre.tbl_projekttyp" => array("projekttyp_kurzbz","bezeichnung"),
|
||||
|
||||
Reference in New Issue
Block a user