mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
Gewichtung für Lehreinheiten hinzugefügt
This commit is contained in:
@@ -837,6 +837,27 @@ echo "
|
||||
|
||||
$moodle24_course_bezeichnung[$obj->mdl_course_id]=$moodle24course->mdl_shortname;
|
||||
}
|
||||
|
||||
if(!isset($moodle24_course_gewicht[$obj->mdl_course_id]))
|
||||
{
|
||||
$mdl_obj = new moodle24_course();
|
||||
$mdl_lehreinheiten=$mdl_obj->getLeFromCourse($obj->mdl_course_id);
|
||||
|
||||
foreach($mdl_lehreinheiten as $row_mdl_lehreinheit)
|
||||
{
|
||||
if($row_mdl_lehreinheit!='')
|
||||
{
|
||||
$lehreinheit_gewicht_obj = new lehreinheit();
|
||||
$lehreinheit_gewicht_obj->load($row_mdl_lehreinheit);
|
||||
|
||||
if($lehreinheit_gewicht_obj->gewicht!='')
|
||||
{
|
||||
$moodle24_course_gewicht[$obj->mdl_course_id]=$lehreinheit_gewicht_obj->gewicht;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -870,6 +891,8 @@ echo "
|
||||
$note_les_str = '';
|
||||
$le_anz = 0;
|
||||
$note_le = 0;
|
||||
$note_le_gewichtet=0;
|
||||
$gewichtsumme=0;
|
||||
$note=0;
|
||||
if($grade_from_moodle)
|
||||
{
|
||||
@@ -916,7 +939,9 @@ echo "
|
||||
if (is_numeric($note))
|
||||
{
|
||||
$note_le += $note;
|
||||
$le_anz += 1;
|
||||
$note_le_gewichtet +=$note*$gewichtung;
|
||||
$gewichtsumme+=$gewichtung;
|
||||
$le_anz += 1;
|
||||
}
|
||||
if ($note == 5)
|
||||
$leneg = " style='color:red; font-weight:bold'";
|
||||
@@ -966,7 +991,15 @@ echo "
|
||||
{
|
||||
if($moodle24_noten->uid==$row_stud->uid)
|
||||
{
|
||||
$gewichtung=1;
|
||||
$note_le+=$moodle24_noten->note;
|
||||
if(isset($moodle24_course_gewicht[$moodle24_noten->mdl_course_id]))
|
||||
$gewichtung=$moodle24_course_gewicht[$moodle24_noten->mdl_course_id];
|
||||
|
||||
if($gewichtung=='')
|
||||
$gewichtung=1;
|
||||
$note_le_gewichtet+=$moodle24_noten->note*$gewichtung;
|
||||
$gewichtsumme+=$gewichtung;
|
||||
$le_anz+=1;
|
||||
//if ($moodle24_noten->note == 5)
|
||||
// $leneg = " style='color:red; font-weight:bold'";
|
||||
@@ -975,7 +1008,9 @@ echo "
|
||||
$title="Moodle KursID: ".$moodle24_noten->mdl_course_id.
|
||||
"\nKursbezeichnung: ".$moodle24_course_bezeichnung[$moodle24_noten->mdl_course_id].
|
||||
"\nUser: ".$moodle24_noten->uid.
|
||||
"\nNote: $moodle24_noten->note";
|
||||
"\nNote: ".$moodle24_noten->note;
|
||||
if(defined('CIS_GESAMTNOTE_GEWICHTUNG') && CIS_GESAMTNOTE_GEWICHTUNG)
|
||||
$title.="\nGewichtung: ".$gewichtung;
|
||||
$note_les_str .= "<br><span".$leneg.">".$moodle24_noten->note."</span><span title='".$title."' style='font-size:10px'> (".$moodle24_course_bezeichnung[$moodle24_noten->mdl_course_id].")</span> ";
|
||||
|
||||
}
|
||||
@@ -998,12 +1033,23 @@ echo "
|
||||
else
|
||||
{
|
||||
$note_le += $legesamtnote->note;
|
||||
$le_anz += 1;
|
||||
|
||||
$gewicht = $l->gewicht;
|
||||
if($l->gewicht=='')
|
||||
$gewicht = 1;
|
||||
$note_le_gewichtet+=$legesamtnote->note*$gewicht;
|
||||
$gewichtsumme+=$gewicht;
|
||||
|
||||
$le_anz += 1;
|
||||
if ($legesamtnote->note == 5)
|
||||
$leneg = " style='color:red; font-weight:bold'";
|
||||
else
|
||||
$leneg = "";
|
||||
$note_les_str .= "<span".$leneg.">".$legesamtnote->note."</span> (".$l->lehreinheit_id.") ";
|
||||
if(defined('CIS_GESAMTNOTE_GEWICHTUNG') && CIS_GESAMTNOTE_GEWICHTUNG)
|
||||
$title='Gewichtung: '.$l->gewicht;
|
||||
else
|
||||
$title='';
|
||||
$note_les_str .= '<span title="'.$title.'"><span'.$leneg.'>'.$legesamtnote->note.'</span> ('.$l->lehreinheit_id.') </span>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1026,13 +1072,31 @@ echo "
|
||||
{
|
||||
if(CIS_GESAMTNOTE_PUNKTE)
|
||||
{
|
||||
$punkte_vorschlag = round($note_le/$le_anz,2);
|
||||
$notenschluessel = new notenschluessel();
|
||||
$note_vorschlag = $notenschluessel->getNote($punkte_vorschlag, $lvid, $stsem);
|
||||
if(defined('CIS_GESAMTNOTE_GEWICHTUNG') && CIS_GESAMTNOTE_GEWICHTUNG)
|
||||
{
|
||||
// Lehreinheitsgewichtung
|
||||
$punkte_vorschlag = round($note_le_gewichtet/$gewichtsumme,2);
|
||||
$notenschluessel = new notenschluessel();
|
||||
$note_vorschlag = $notenschluessel->getNote($punkte_vorschlag, $lvid, $stsem);
|
||||
}
|
||||
else
|
||||
{
|
||||
$punkte_vorschlag = round($note_le/$le_anz,2);
|
||||
$notenschluessel = new notenschluessel();
|
||||
$note_vorschlag = $notenschluessel->getNote($punkte_vorschlag, $lvid, $stsem);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$note_vorschlag = round($note_le/$le_anz);
|
||||
if(defined('CIS_GESAMTNOTE_GEWICHTUNG') && CIS_GESAMTNOTE_GEWICHTUNG)
|
||||
{
|
||||
$note_vorschlag = round($note_le_gewichtet/$gewichtsumme);
|
||||
}
|
||||
else
|
||||
{
|
||||
$note_vorschlag = round($note_le/$le_anz);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -56,6 +56,9 @@ define('CIS_GESAMTNOTE_PUNKTE',false);
|
||||
// Gibt an ob der Lektor erneut eine LVNote eintragen kann wenn bereits eine Zeugnisnote vorhanden ist (true | false) DEFAULT true
|
||||
define('CIS_GESAMTNOTE_UEBERSCHREIBEN',true);
|
||||
|
||||
// Gewichtung der Lehreinheiten bei Noteneintragung true|false
|
||||
define('CIS_GESAMTNOTE_GEWICHTUNG', true);
|
||||
|
||||
// Gibt an ob im FAS bei den Lehrveranstaltungsnoten ein zusaetzliches Formular angezeigt wird um
|
||||
// Vertraege fuer Pruefungshonorare anzulegen
|
||||
define('FAS_GESAMTNOTE_PRUEFUNGSHONORAR',false);
|
||||
|
||||
@@ -1251,6 +1251,7 @@ if(!$error)
|
||||
$leDAO->lehrform_kurzbz=$_POST['lehrform'];
|
||||
$leDAO->stundenblockung=$_POST['stundenblockung'];
|
||||
$leDAO->wochenrythmus=$_POST['wochenrythmus'];
|
||||
$leDAO->gewicht = $_POST['gewicht'];
|
||||
|
||||
if (isset($_POST['start_kw']))
|
||||
$leDAO->start_kw=$_POST['start_kw'];
|
||||
|
||||
@@ -26,6 +26,7 @@ header("Expires Mon, 26 Jul 1997 05:00:00 GMT");
|
||||
header("Pragma: no-cache");
|
||||
header("Content-type: application/vnd.mozilla.xul+xml");
|
||||
require_once('../../config/vilesci.config.inc.php');
|
||||
require_once('../../config/global.config.inc.php');
|
||||
require_once('../../include/benutzerberechtigung.class.php');
|
||||
|
||||
$user = get_uid();
|
||||
@@ -118,6 +119,9 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
|
||||
<row>
|
||||
<label value="LV-ID" <?php echo ($rechte->isBerechtigt('lehre/lehrveranstaltung',null,'suid'))?'':'hidden="true"'; ?>/>
|
||||
<textbox id="lehrveranstaltung-detail-textbox-lehrveranstaltung" disabled="true" maxlength="20" <?php echo ($rechte->isBerechtigt('lehre/lehrveranstaltung',null,'suid'))?'':'hidden="true"'; ?>/>
|
||||
<label value="Gewicht" <?php echo (defined('CIS_GESAMTNOTE_GEWICHTUNG') && CIS_GESAMTNOTE_GEWICHTUNG)?'':'hidden="true"'; ?>/>
|
||||
<textbox id="lehrveranstaltung-detail-textbox-gewicht" disabled="true" maxlength="4" <?php echo (defined('CIS_GESAMTNOTE_GEWICHTUNG') && CIS_GESAMTNOTE_GEWICHTUNG)?'':'hidden="true"'; ?>/>
|
||||
|
||||
</row>
|
||||
<row>
|
||||
<label value="Lehrfach" />
|
||||
|
||||
@@ -561,6 +561,7 @@ function LeDetailReset()
|
||||
document.getElementById('lehrveranstaltung-detail-menulist-studiensemester').value=getStudiensemester();
|
||||
document.getElementById('lehrveranstaltung-detail-menulist-lehrform').value='<?php echo DEFAULT_LEHREINHEIT_LEHRFORM; ?>';
|
||||
document.getElementById('lehrveranstaltung-detail-textbox-lehreinheit_id').value='';
|
||||
document.getElementById('lehrveranstaltung-detail-textbox-gewicht').value='1';
|
||||
|
||||
//mitarbeiterlehreinheit tree leeren
|
||||
lektortree = document.getElementById('lehrveranstaltung-detail-tree-lehreinheitmitarbeiter');
|
||||
@@ -611,6 +612,7 @@ function LeDetailDisableFields(val)
|
||||
|
||||
document.getElementById('lehrveranstaltung-detail-textbox-unr').disabled=val;
|
||||
document.getElementById('lehrveranstaltung-detail-textbox-lehrveranstaltung').disabled=val;
|
||||
document.getElementById('lehrveranstaltung-detail-textbox-gewicht').disabled=val;
|
||||
}
|
||||
|
||||
// ****
|
||||
@@ -633,6 +635,7 @@ function LeDetailSave()
|
||||
raumtypalternativ = document.getElementById('lehrveranstaltung-detail-menulist-raumtypalternativ').value;
|
||||
studiensemester = document.getElementById('lehrveranstaltung-detail-menulist-studiensemester').value;
|
||||
lehrform = document.getElementById('lehrveranstaltung-detail-menulist-lehrform').value;
|
||||
gewicht = document.getElementById('lehrveranstaltung-detail-textbox-gewicht').value;
|
||||
|
||||
if(lehrveranstaltung=='')
|
||||
return false;
|
||||
@@ -685,6 +688,7 @@ function LeDetailSave()
|
||||
req.add('studiensemester_kurzbz', studiensemester);
|
||||
req.add('lehrform', lehrform);
|
||||
req.add('anmerkung', anmerkung);
|
||||
req.add('gewicht', gewicht);
|
||||
|
||||
var response = req.executePOST();
|
||||
|
||||
@@ -853,6 +857,7 @@ function LeAuswahl()
|
||||
studiensemester=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#studiensemester_kurzbz" ));
|
||||
lehrform=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#lehrform_kurzbz" ));
|
||||
anzahl_studenten=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#anzahl_studenten" ));
|
||||
gewicht=getTargetHelper(dsource,subject,rdfService.GetResource( predicateNS + "#gewicht" ));
|
||||
|
||||
//Lehrfach drop down setzen
|
||||
|
||||
@@ -909,6 +914,7 @@ function LeAuswahl()
|
||||
document.getElementById('lehrveranstaltung-detail-textbox-lehreinheit_id').value=lehreinheit_id;
|
||||
document.getElementById('lehrveranstaltung-detail-groupbox-caption').label='Details - Anzahl TeilnehmerInnen: '+anzahl_studenten;
|
||||
|
||||
document.getElementById('lehrveranstaltung-detail-textbox-gewicht').value=gewicht;
|
||||
//Lehreinheitmitarbeiter tree setzen
|
||||
url='<?php echo APP_ROOT;?>rdf/lehreinheitmitarbeiter.rdf.php?lehreinheit_id='+lehreinheit_id+"&"+gettimestamp();
|
||||
try
|
||||
|
||||
@@ -52,6 +52,7 @@ class lehreinheit extends basis_db
|
||||
public $updatevon; // varchar(16)
|
||||
public $sprache; // varchar(16)
|
||||
public $ext_id; // bigint
|
||||
public $gewicht=1; // smallint
|
||||
|
||||
public $anz=0; //Zahler fuer erweiterte Attribute
|
||||
public $mitarbeiter_uid=array();
|
||||
@@ -112,6 +113,7 @@ class lehreinheit extends basis_db
|
||||
$this->updateamum = $row->updateamum;
|
||||
$this->updatevon = $row->updatevon;
|
||||
$this->ext_id = $row->ext_id;
|
||||
$this->gewicht = $row->gewicht;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -242,6 +244,7 @@ class lehreinheit extends basis_db
|
||||
$le_obj->updateamum = $row->updateamum;
|
||||
$le_obj->updatevon = $row->updatevon;
|
||||
$le_obj->ext_id = $row->ext_id;
|
||||
$le_obj->gewicht = $row->gewicht;
|
||||
|
||||
$this->lehreinheiten[] = $le_obj;
|
||||
}
|
||||
@@ -354,6 +357,11 @@ class lehreinheit extends basis_db
|
||||
return false;
|
||||
}
|
||||
|
||||
if($this->gewicht!='' && !is_numeric($this->gewicht))
|
||||
{
|
||||
$this->errormsg = 'Gewicht muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -383,7 +391,7 @@ class lehreinheit extends basis_db
|
||||
//ToDo ID entfernen
|
||||
$qry = 'BEGIN; INSERT INTO lehre.tbl_lehreinheit (lehrveranstaltung_id, studiensemester_kurzbz,
|
||||
lehrfach_id, lehrform_kurzbz, stundenblockung, wochenrythmus,
|
||||
start_kw, raumtyp, raumtypalternativ, lehre, anmerkung, unr, lvnr, insertamum, insertvon, updateamum, updatevon, sprache)
|
||||
start_kw, raumtyp, raumtypalternativ, lehre, anmerkung, unr, lvnr, insertamum, insertvon, updateamum, updatevon, sprache, gewicht)
|
||||
VALUES('.$this->db_add_param($this->lehrveranstaltung_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->studiensemester_kurzbz).','.
|
||||
$this->db_add_param($this->lehrfach_id, FHC_INTEGER).','.
|
||||
@@ -401,7 +409,8 @@ class lehreinheit extends basis_db
|
||||
$this->db_add_param($this->insertvon).','.
|
||||
$this->db_add_param($this->updateamum).','.
|
||||
$this->db_add_param($this->updatevon).','.
|
||||
$this->db_add_param($this->sprache).');';
|
||||
$this->db_add_param($this->sprache).','.
|
||||
$this->db_add_param($this->gewicht, FHC_INTEGER).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -421,7 +430,8 @@ class lehreinheit extends basis_db
|
||||
' lvnr='.$this->db_add_param($this->lvnr, FHC_INTEGER).','.
|
||||
' updateamum='.$this->db_add_param($this->updateamum).','.
|
||||
' updatevon='.$this->db_add_param($this->updatevon).','.
|
||||
' sprache='.$this->db_add_param($this->sprache).' '.
|
||||
' sprache='.$this->db_add_param($this->sprache).', '.
|
||||
' gewicht='.$this->db_add_param($this->gewicht).' '.
|
||||
" WHERE lehreinheit_id=".$this->db_add_param($this->lehreinheit_id, FHC_INTEGER).";";
|
||||
}
|
||||
|
||||
|
||||
@@ -743,4 +743,22 @@ class moodle24_course extends basis_db
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* gibt alle LE Ids der Übergebenen Moodle_Course_ID zurück
|
||||
*/
|
||||
public function getLeFromCourse($moodle_course_id)
|
||||
{
|
||||
$qry = "SELECT lehreinheit_id FROM lehre.tbl_moodle WHERE moodle_version='2.4' AND mdl_course_id =".$this->db_add_param($moodle_course_id, FHC_INTEGER).';';
|
||||
$le = array();
|
||||
if($result = $this->db_query($qry))
|
||||
{
|
||||
while($row = $this->db_fetch_object())
|
||||
{
|
||||
$le[] = $row->lehreinheit_id;
|
||||
}
|
||||
}
|
||||
return $le;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+15
-14
@@ -78,11 +78,11 @@ if(isset($_GET['optional']) && $_GET['optional']=='true')
|
||||
}
|
||||
|
||||
if($lehreinheit_id!='')
|
||||
{
|
||||
{
|
||||
$lehreinheit->load($lehreinheit_id);
|
||||
draw_row($lehreinheit);
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if($lehrveranstaltung_id!='')
|
||||
{
|
||||
@@ -90,7 +90,7 @@ else
|
||||
foreach ($lehreinheit->lehreinheiten as $row)
|
||||
draw_row($row);
|
||||
}
|
||||
else
|
||||
else
|
||||
die('Fehlerhafte Parameteruebergabe');
|
||||
}
|
||||
|
||||
@@ -98,41 +98,41 @@ else
|
||||
function draw_row($row)
|
||||
{
|
||||
global $rdf_url;
|
||||
|
||||
|
||||
$legrp = new lehreinheitgruppe();
|
||||
$legrp->getLehreinheitgruppe($row->lehreinheit_id);
|
||||
|
||||
|
||||
$grp='';
|
||||
foreach ($legrp->lehreinheitgruppe as $leg_row)
|
||||
{
|
||||
if($leg_row->gruppe_kurzbz!='')
|
||||
$grp .=" ".$leg_row->gruppe_kurzbz;
|
||||
else
|
||||
else
|
||||
$grp .=" ".$leg_row->semester.$leg_row->verband.$leg_row->gruppe;
|
||||
}
|
||||
|
||||
$qry = "SELECT kurzbz FROM lehre.tbl_lehreinheitmitarbeiter JOIN public.tbl_mitarbeiter USING(mitarbeiter_uid) WHERE
|
||||
|
||||
$qry = "SELECT kurzbz FROM lehre.tbl_lehreinheitmitarbeiter JOIN public.tbl_mitarbeiter USING(mitarbeiter_uid) WHERE
|
||||
lehreinheit_id='$row->lehreinheit_id'";
|
||||
|
||||
$mitarbeiter='';
|
||||
$db = new basis_db();
|
||||
|
||||
|
||||
if($db->db_query($qry))
|
||||
{
|
||||
while($row_ma = $db->db_fetch_object())
|
||||
$mitarbeiter .=' '.$row_ma->kurzbz;
|
||||
}
|
||||
$mitarbeiter = '('.$mitarbeiter.')';
|
||||
|
||||
$anzahl_studenten=0;
|
||||
|
||||
$anzahl_studenten=0;
|
||||
$qry = "SELECT count(*) as anz FROM campus.vw_student_lehrveranstaltung WHERE lehreinheit_id='".addslashes($row->lehreinheit_id)."'";
|
||||
if($db->db_query($qry))
|
||||
if($row_std = $db->db_fetch_object())
|
||||
$anzahl_studenten = $row_std->anz;
|
||||
|
||||
|
||||
$lehrfach = new lehrveranstaltung();
|
||||
$lehrfach->load($row->lehrfach_id);
|
||||
|
||||
|
||||
echo '
|
||||
<RDF:li>
|
||||
<RDF:Description id="'.$row->lehreinheit_id.'" about="'.$rdf_url.'/'.$row->lehreinheit_id.'" >
|
||||
@@ -153,10 +153,11 @@ function draw_row($row)
|
||||
<LEHREINHEIT:lvnr><![CDATA['.$row->lvnr.']]></LEHREINHEIT:lvnr>
|
||||
<LEHREINHEIT:bezeichnung><![CDATA['.$lehrfach->kurzbz.'-'.$row->lehrform_kurzbz.' '.$lehrfach->bezeichnung.' '.$grp.' '.$mitarbeiter.']]></LEHREINHEIT:bezeichnung>
|
||||
<LEHREINHEIT:anzahl_studenten><![CDATA['.$anzahl_studenten.']]></LEHREINHEIT:anzahl_studenten>
|
||||
<LEHREINHEIT:gewicht><![CDATA['.$row->gewicht.']]></LEHREINHEIT:gewicht>
|
||||
</RDF:Description>
|
||||
</RDF:li>
|
||||
';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</RDF:Seq>
|
||||
</RDF:RDF>
|
||||
@@ -63,10 +63,10 @@ $db = new basis_db();
|
||||
$lvaDAO=new lehrveranstaltung();
|
||||
if($uid!='' && $stg_kz!=-1) // Alle LVs eines Mitarbeiters
|
||||
{
|
||||
$qry = "SELECT
|
||||
$qry = "SELECT
|
||||
distinct on(lehrveranstaltung_id) * ,'' as studienplan_id, '' as studienplan_bezeichnung
|
||||
FROM
|
||||
campus.vw_lehreinheit
|
||||
campus.vw_lehreinheit
|
||||
WHERE
|
||||
studiensemester_kurzbz=".$db->db_add_param($semester_aktuell)."
|
||||
AND mitarbeiter_uid=".$db->db_add_param($uid);
|
||||
@@ -88,11 +88,11 @@ elseif($fachbereich_kurzbz!='') // Alle LVs eines Fachbereiches
|
||||
tbl_lehrveranstaltung.planlektoren as lv_planlektoren, tbl_lehrveranstaltung.planpersonalkosten as lv_planpersonalkosten,
|
||||
tbl_lehrveranstaltung.plankostenprolektor as lv_plankostenprolektor, tbl_lehrveranstaltung.orgform_kurzbz as lv_orgform_kurzbz,
|
||||
tbl_lehrveranstaltung.lehrveranstaltung_id,
|
||||
tbl_lehrveranstaltung.lehrform_kurzbz as lehrform_kurzbz,
|
||||
tbl_lehrveranstaltung.lehrform_kurzbz as lehrform_kurzbz,
|
||||
tbl_lehrveranstaltung.lehrform_kurzbz as lv_lehrform_kurzbz,
|
||||
tbl_lehrveranstaltung.bezeichnung_english as lv_bezeichnung_english,
|
||||
tbl_lehrveranstaltung.studiengang_kz, tbl_studienplan_lehrveranstaltung.semester, tbl_lehrveranstaltung.anmerkung, tbl_lehrveranstaltung.sprache, tbl_lehrveranstaltung.semesterstunden,
|
||||
tbl_lehrveranstaltung.lehre, tbl_lehrveranstaltung.aktiv,
|
||||
tbl_lehrveranstaltung.lehre, tbl_lehrveranstaltung.aktiv,
|
||||
tbl_studienplan.studienplan_id::text, tbl_studienplan.bezeichnung as studienplan_bezeichnung, tbl_lehrveranstaltung.lehrtyp_kurzbz
|
||||
FROM
|
||||
lehre.tbl_lehrveranstaltung
|
||||
@@ -108,17 +108,17 @@ elseif($fachbereich_kurzbz!='') // Alle LVs eines Fachbereiches
|
||||
}
|
||||
else
|
||||
$qry='';
|
||||
$qry .= "
|
||||
SELECT
|
||||
distinct on(lehrveranstaltung_id)
|
||||
$qry .= "
|
||||
SELECT
|
||||
distinct on(lehrveranstaltung_id)
|
||||
lv_studiengang_kz, lv_semester, lv_kurzbz, lv_bezeichnung, lv_ects,
|
||||
lv_lehreverzeichnis, lv_planfaktor, lv_planlektoren, lv_planpersonalkosten,
|
||||
lv_plankostenprolektor, lv_orgform_kurzbz, lehrveranstaltung_id,
|
||||
lehrform_kurzbz, lv_lehrform_kurzbz, lv_bezeichnung_english, studiengang_kz, semester, anmerkung, sprache, semesterstunden,
|
||||
lehre, aktiv,
|
||||
'' as studienplan_id, '' as studienplan_bezeichnung,
|
||||
'' as studienplan_id, '' as studienplan_bezeichnung,
|
||||
(SELECT lehrtyp_kurzbz FROM lehre.tbl_lehrveranstaltung WHERE lehrveranstaltung_id=vw_lehreinheit.lehrveranstaltung_id) as lehrtyp_kurzbz
|
||||
FROM
|
||||
FROM
|
||||
campus.vw_lehreinheit
|
||||
WHERE
|
||||
studiensemester_kurzbz=".$db->db_add_param($semester_aktuell)."
|
||||
@@ -151,11 +151,11 @@ elseif($oe_kurzbz!='') // Alle LVs einer Organisationseinheit
|
||||
tbl_lehrveranstaltung.planlektoren as lv_planlektoren, tbl_lehrveranstaltung.planpersonalkosten as lv_planpersonalkosten,
|
||||
tbl_lehrveranstaltung.plankostenprolektor as lv_plankostenprolektor, tbl_lehrveranstaltung.orgform_kurzbz as lv_orgform_kurzbz,
|
||||
tbl_lehrveranstaltung.lehrveranstaltung_id,
|
||||
tbl_lehrveranstaltung.lehrform_kurzbz as lehrform_kurzbz,
|
||||
tbl_lehrveranstaltung.lehrform_kurzbz as lehrform_kurzbz,
|
||||
tbl_lehrveranstaltung.lehrform_kurzbz as lv_lehrform_kurzbz,
|
||||
tbl_lehrveranstaltung.bezeichnung_english as lv_bezeichnung_english,
|
||||
tbl_lehrveranstaltung.studiengang_kz, tbl_lehrveranstaltung.semester, tbl_lehrveranstaltung.anmerkung, tbl_lehrveranstaltung.sprache, tbl_lehrveranstaltung.semesterstunden,
|
||||
tbl_lehrveranstaltung.lehre, tbl_lehrveranstaltung.aktiv,
|
||||
tbl_lehrveranstaltung.lehre, tbl_lehrveranstaltung.aktiv,
|
||||
'' as studienplan_id, '' as studienplan_bezeichnung, tbl_lehrveranstaltung.lehrtyp_kurzbz
|
||||
FROM
|
||||
lehre.tbl_lehrveranstaltung
|
||||
@@ -195,14 +195,14 @@ else
|
||||
if(count($stp_ids)>0)
|
||||
{
|
||||
// Alle Lehrveranstaltungen die lt Studienplan zugeordnet sind
|
||||
$qry.= "SELECT lehrveranstaltung_id, kurzbz as lv_kurzbz, tbl_lehrveranstaltung.bezeichnung as lv_bezeichnung, bezeichnung_english as lv_bezeichnung_english, studiengang_kz,
|
||||
$qry.= "SELECT lehrveranstaltung_id, kurzbz as lv_kurzbz, tbl_lehrveranstaltung.bezeichnung as lv_bezeichnung, bezeichnung_english as lv_bezeichnung_english, studiengang_kz,
|
||||
tbl_studienplan_lehrveranstaltung.semester, tbl_lehrveranstaltung.sprache,
|
||||
ects as lv_ects, semesterstunden, anmerkung, lehre, lehreverzeichnis as lv_lehreverzeichnis, tbl_lehrveranstaltung.aktiv,
|
||||
planfaktor as lv_planfaktor, planlektoren as lv_planlektoren, planpersonalkosten as lv_planpersonalkosten,
|
||||
plankostenprolektor as lv_plankostenprolektor, lehrform_kurzbz as lv_lehrform_kurzbz, tbl_lehrveranstaltung.orgform_kurzbz,
|
||||
tbl_studienplan_lehrveranstaltung.studienplan_id::text as studienplan_id, tbl_studienplan.bezeichnung as studienplan_bezeichnung, tbl_studienplan_lehrveranstaltung.studienplan_lehrveranstaltung_id_parent::text,
|
||||
tbl_lehrveranstaltung.lehrtyp_kurzbz
|
||||
FROM
|
||||
FROM
|
||||
lehre.tbl_lehrveranstaltung
|
||||
JOIN lehre.tbl_studienplan_lehrveranstaltung USING(lehrveranstaltung_id)
|
||||
JOIN lehre.tbl_studienplan USING(studienplan_id)
|
||||
@@ -253,7 +253,7 @@ $oRdf->sendHeader();
|
||||
//Fachbereichskoordinatoren laden
|
||||
$qry_fbk = "SELECT kurzbz FROM public.tbl_mitarbeiter LEFT JOIN public.tbl_benutzer ON(uid=mitarbeiter_uid) WHERE tbl_benutzer.aktiv AND mitarbeiter_uid =
|
||||
(
|
||||
SELECT
|
||||
SELECT
|
||||
COALESCE(tbl_lehrveranstaltung.koordinator, uid) as koordinator
|
||||
FROM
|
||||
lehre.tbl_lehrveranstaltung, lehre.tbl_lehreinheit, lehre.tbl_lehrveranstaltung as lehrfach, public.tbl_benutzerfunktion, public.tbl_studiensemester, public.tbl_studiengang, public.tbl_fachbereich
|
||||
@@ -263,16 +263,16 @@ $oRdf->sendHeader();
|
||||
tbl_lehreinheit.lehrfach_id=lehrfach.lehrveranstaltung_id AND
|
||||
lehrfach.oe_kurzbz=tbl_fachbereich.oe_kurzbz AND
|
||||
tbl_fachbereich.fachbereich_kurzbz=tbl_benutzerfunktion.fachbereich_kurzbz AND
|
||||
tbl_benutzerfunktion.funktion_kurzbz='fbk' AND
|
||||
tbl_benutzerfunktion.funktion_kurzbz='fbk' AND
|
||||
tbl_lehreinheit.studiensemester_kurzbz=tbl_studiensemester.studiensemester_kurzbz AND
|
||||
tbl_benutzerfunktion.oe_kurzbz=tbl_studiengang.oe_kurzbz AND
|
||||
(tbl_benutzerfunktion.datum_von is null OR tbl_benutzerfunktion.datum_von<=now()) AND
|
||||
(tbl_benutzerfunktion.datum_bis is null OR tbl_benutzerfunktion.datum_bis>=now()) AND
|
||||
tbl_studiengang.studiengang_kz=tbl_lehrveranstaltung.studiengang_kz ORDER BY tbl_studiensemester.ende DESC LIMIT 1 ) ";
|
||||
|
||||
|
||||
if(!$result_fbk = $db->db_query($qry_fbk))
|
||||
die('Fehlerhafte Abfrage');
|
||||
|
||||
|
||||
$fbk='';
|
||||
while($row_fbk = $db->db_fetch_object($result_fbk))
|
||||
{
|
||||
@@ -411,6 +411,7 @@ $oRdf->sendHeader();
|
||||
$oRdf->obj[$i]->setAttribut('gruppen',$grp);
|
||||
$oRdf->obj[$i]->setAttribut('lektoren',$lkt);
|
||||
$oRdf->obj[$i]->setAttribut('fachbereich',$fachbereich);
|
||||
$oRdf->obj[$i]->setAttribut('gewicht',$row_le->gewicht);
|
||||
|
||||
$oRdf->addSequence($row_lva->lehrveranstaltung_id.'/'.$row_le->lehreinheit_id,$row_lva->lehrveranstaltung_id);
|
||||
|
||||
|
||||
+14
-3
@@ -21,8 +21,6 @@
|
||||
* Dieses Skript prueft die Datenbank auf aktualitaet, dabei werden fehlende Attribute angelegt.
|
||||
*/
|
||||
|
||||
echo "keine Updates vorhanden!";
|
||||
|
||||
// Neue Spalte beschreibung_mehrsprachig bei tbl_dokument
|
||||
if(!@$db->db_query("SELECT dokumentbeschreibung_mehrsprachig FROM public.tbl_dokument LIMIT 1"))
|
||||
{
|
||||
@@ -68,6 +66,19 @@ if($result = @$db->db_query("SELECT * FROM information_schema.role_table_grants
|
||||
}
|
||||
}
|
||||
|
||||
// Neue Spalte Gewicht bei tbl_lehreinheit
|
||||
if(!@$db->db_query("SELECT gewicht FROM lehre.tbl_lehreinheit LIMIT 1"))
|
||||
{
|
||||
$qry = "
|
||||
ALTER TABLE lehre.tbl_lehreinheit ADD COLUMN gewicht smallint DEFAULT 1;;
|
||||
";
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_lehreinheit '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Spalte gewicht in lehre.tbl_lehreinheit hinzugefügt';
|
||||
}
|
||||
|
||||
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
|
||||
echo '<H2>Pruefe Tabellen und Attribute!</H2>';
|
||||
|
||||
@@ -172,7 +183,7 @@ $tabellen=array(
|
||||
"lehre.tbl_anrechnung_begruendung" => array("begruendung_id","bezeichnung"),
|
||||
"lehre.tbl_betreuerart" => array("betreuerart_kurzbz","beschreibung"),
|
||||
"lehre.tbl_ferien" => array("bezeichnung","studiengang_kz","vondatum","bisdatum"),
|
||||
"lehre.tbl_lehreinheit" => array("lehreinheit_id","lehrveranstaltung_id","studiensemester_kurzbz","lehrfach_id","lehrform_kurzbz","stundenblockung","wochenrythmus","start_kw","raumtyp","raumtypalternativ","sprache","lehre","anmerkung","unr","lvnr","updateamum","updatevon","insertamum","insertvon","ext_id","lehrfach_id_old"),
|
||||
"lehre.tbl_lehreinheit" => array("lehreinheit_id","lehrveranstaltung_id","studiensemester_kurzbz","lehrfach_id","lehrform_kurzbz","stundenblockung","wochenrythmus","start_kw","raumtyp","raumtypalternativ","sprache","lehre","anmerkung","unr","lvnr","updateamum","updatevon","insertamum","insertvon","ext_id","lehrfach_id_old","gewicht"),
|
||||
"lehre.tbl_lehreinheitgruppe" => array("lehreinheitgruppe_id","lehreinheit_id","studiengang_kz","semester","verband","gruppe","gruppe_kurzbz","updateamum","updatevon","insertamum","insertvon","ext_id"),
|
||||
"lehre.tbl_lehreinheitmitarbeiter" => array("lehreinheit_id","mitarbeiter_uid","lehrfunktion_kurzbz","semesterstunden","planstunden","stundensatz","faktor","anmerkung","bismelden","updateamum","updatevon","insertamum","insertvon","ext_id","standort_id","vertrag_id"),
|
||||
"lehre.tbl_lehrfach" => array("lehrfach_id","studiengang_kz","fachbereich_kurzbz","kurzbz","bezeichnung","farbe","aktiv","semester","sprache","updateamum","updatevon","insertamum","insertvon","ext_id"),
|
||||
|
||||
Reference in New Issue
Block a user