Merge branch 'master' into ciauth

This commit is contained in:
Paolo
2019-03-20 16:29:33 +01:00
9 changed files with 3261 additions and 450 deletions
+9 -2
View File
@@ -34,9 +34,11 @@ const DEFAULT_SANCHO_FOOTER_IMG = 'sancho_footer_DEFAULT.jpg';
* @param string $to Email-adress.
* @param string $subject Subject of mail.
* @param string $headerImg Filename of the specific Sancho header image.
* @param string $cc Sets CC of mail.
* @param string $bcc Sets BCC of mail.
* @return void
*/
function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerImg = DEFAULT_SANCHO_HEADER_IMG, $footerImg = DEFAULT_SANCHO_FOOTER_IMG)
function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerImg = DEFAULT_SANCHO_HEADER_IMG, $footerImg = DEFAULT_SANCHO_FOOTER_IMG, $from = null, $cc = null, $bcc = null)
{
$ci =& get_instance();
$ci->load->library('email');
@@ -45,6 +47,11 @@ function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerIm
$sanchoHeader_img = 'skin/images/sancho/'. $headerImg;
$sanchoFooter_img = 'skin/images/sancho/'. $footerImg;
if ($from == '')
{
$from = 'sancho@'.DOMAIN;
}
// Embed sancho header and footer image
// reset important to ensure embedding of images when called in a loop
$ci->email->clear(true); // clear vars and attachments
@@ -67,7 +74,7 @@ function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerIm
$body = _parseMailContent('Sancho_Mail_Template', $layout);
// Send mail
$ci->maillib->send('sancho@'. DOMAIN, $to, $subject, $body, $alias = '', $cc = null, $bcc = null, $altMessage = '', $bulk = true, $autogenerated = true);
$ci->maillib->send($from, $to, $subject, $body, $alias = '', $cc = null, $bcc = null, $altMessage = '', $bulk = true, $autogenerated = true);
}
/**
+53 -28
View File
@@ -179,19 +179,38 @@ if (isset($_POST['prestudent']) && isset($gebdatum))
$_SESSION['semester']=$semester;
// STG und Studienplan mit der höchsten Prio ermitteln
$ps->getActualInteressenten($_POST['prestudent'], true);
$firstPrio_studienplan_id = array_column($ps->result, 'studienplan_id');
$firstPrio_studienplan_id = array_shift($firstPrio_studienplan_id);
$firstPrio_studiengang_kz = array_column($ps->result, 'studiengang_kz');
$firstPrio_studiengang_kz = array_shift($firstPrio_studiengang_kz);
$firstPrio_studienplan_id = '';
$firstPrio_studiengang_kz = '';
$ps->getActualInteressenten($_POST['prestudent'], true);
foreach($ps->result as $row)
{
if(isset($row->studiengang_kz))
{
$firstPrio_studienplan_id = $row->studienplan_id;
break;
}
}
foreach($ps->result as $row)
{
if(isset($row->studiengang_kz))
{
$firstPrio_studiengang_kz = $row->studiengang_kz;
break;
}
}
// Sprachvorgaben zu STG mit höchster Prio ermitteln
// * 1. Sprache über Ablauf Vorgaben ermitteln
$ablauf = new Ablauf();
$ablauf->getAblaufVorgabeStudiengang($firstPrio_studiengang_kz);
$rt_sprache = $ablauf->result[0]->sprache;
$rt_sprache = '';
if(!empty($ablauf->result[0]))
{
$rt_sprache = $ablauf->result[0]->sprache;
}
// * 2. falls keine Sprache vorhanden -> Sprache über Studienplan ermitteln
if (empty($rt_sprache))
@@ -199,7 +218,6 @@ if (isset($_POST['prestudent']) && isset($gebdatum))
$stpl = new Studienplan();
$stpl->loadStudienplan($firstPrio_studienplan_id);
$rt_sprache = $stpl->sprache;
}
// * 3. falls keine Sprache vorhanden -> Sprache über Studiengang ermitteln
@@ -258,8 +276,8 @@ if(isset($_SESSION['prestudent_id']) && !isset($_SESSION['pruefling_id']))
if(!$pruefling->getPruefling($_SESSION['prestudent_id']))
$pruefling->new = true;
else
$pruefling->new = false;
$pruefling->new = false;
$pruefling->studiengang_kz = $_SESSION['studiengang_kz'];
$pruefling->semester = $_SESSION['semester'];
@@ -272,7 +290,7 @@ if(isset($_SESSION['prestudent_id']) && !isset($_SESSION['pruefling_id']))
$reload_parent=true;
}
}
if(isset($_POST['save']) && isset($_SESSION['prestudent_id']))
{
$pruefling = new pruefling();
@@ -283,7 +301,7 @@ if(isset($_POST['save']) && isset($_SESSION['prestudent_id']))
$pruefling->new=false;
else
$pruefling->new=true;
$pruefling->studiengang_kz = $_SESSION['studiengang_kz'];
$pruefling->idnachweis = isset($_POST['idnachweis'])?$_POST['idnachweis']:'';
$pruefling->registriert = date('Y-m-d H:i:s');
@@ -328,7 +346,7 @@ if(isset($_POST['save']) && isset($_SESSION['prestudent_id']))
defaultDate: "-6570",
maxDate: -5110,
yearRange: "-60:+00",
});';
});';
?>
});
@@ -336,7 +354,7 @@ if(isset($_POST['save']) && isset($_SESSION['prestudent_id']))
<?php
if($reload_parent)
echo '<script language="Javascript">parent.menu.location.reload();</script>'; //CRIS: nach reload()ein ; ergänzt
if($reload)
echo "<script language=\"Javascript\">parent.location.reload();</script>";
?>
@@ -344,8 +362,8 @@ if(isset($_POST['save']) && isset($_SESSION['prestudent_id']))
<body>
<?php echo '<h1>'.$p->t('testtool/startseite').'</h1>';
//REIHUNGSTEST STARTSEITE (nach Login)
//REIHUNGSTEST STARTSEITE (nach Login)
if (isset($prestudent_id))
{
@@ -358,24 +376,31 @@ if(isset($_POST['save']) && isset($_SESSION['prestudent_id']))
// STG mit der höchsten Prio ermitteln
$ps = new Prestudent();
// * prinzipiell STG der session übernehmem
$firstPrio_studiengang_kz = $prestudent->studiengang_kz;;
// * wenn STG des eingeloggten Prestudenten vom Typ Bachelor ist, dann höchste Prio aller
// Bachelor-STG ermitteln, an denen die Person noch interessiert ist
if ($typ->typ == 'b')
{
$ps->getActualInteressenten($prestudent_id, true, 'b');
$firstPrio_studiengang_kz = array_column($ps->result, 'studiengang_kz');
$firstPrio_studiengang_kz = array_shift($firstPrio_studiengang_kz);
foreach($ps->result as $row_prio)
{
if(isset($row_prio->studiengang_kz))
{
$firstPrio_studiengang_kz = $row_prio->studiengang_kz;
break;
}
}
}
// * sonst STG der session übernehmem
else
{
$firstPrio_studiengang_kz = $prestudent->studiengang_kz;
}
// Sprachwahl zu STG mit höchster Prio ermitteln
$ablauf = new Ablauf();
$ablauf->getAblaufVorgabeStudiengang($firstPrio_studiengang_kz);
$sprachwahl = $ablauf->result[0]->sprachwahl;
$sprachwahl = false;
if ($ablauf->getAblaufVorgabeStudiengang($firstPrio_studiengang_kz) && is_bool($ablauf->result[0]->sprachwahl))
{
$sprachwahl = $ablauf->result[0]->sprachwahl;
}
//Prestudent Informationen und Logout
echo '<form method="GET">';
@@ -414,7 +439,7 @@ if(isset($_POST['save']) && isset($_SESSION['prestudent_id']))
echo '<INPUT type="submit" value="Logout" name="logout" />';
echo '</form>';
echo '<br><br>';
if($pruefling->getPruefling($prestudent_id))
{
echo '<FORM accept-charset="UTF-8" action="'. $_SERVER['PHP_SELF'].'" method="post" enctype="multipart/form-data">';
@@ -485,8 +510,8 @@ if(isset($_POST['save']) && isset($_SESSION['prestudent_id']))
echo '</SELECT>';
echo '&nbsp; '.$p->t('global/geburtsdatum').': ';
echo '<input type="text" id="datepicker" size="12" name="gebdatum" value="'.$date->formatDatum($gebdatum,'d.m.Y').'">';
echo '&nbsp; <INPUT type="submit" value="'.$p->t('testtool/login').'" />';
echo '</form>';
echo '&nbsp; <INPUT type="submit" value="'.$p->t('testtool/login').'" />';
echo '</form>';
echo '<br /><br /><br />
<center>
@@ -496,4 +521,4 @@ if(isset($_POST['save']) && isset($_SESSION['prestudent_id']))
?>
</body>
</html>
</html>
+27 -27
View File
@@ -91,14 +91,14 @@ if (isset($_SESSION['pruefling_id']))
//content_id fuer Einfuehrung auslesen
$qry = "SELECT content_id FROM testtool.tbl_ablauf_vorgaben WHERE studiengang_kz=".$db->db_add_param($_SESSION['studiengang_kz'])." LIMIT 1";
$result = $db->db_query($qry);
echo '<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-right-width:1px;border-right-color:#BCBCBC;">';
echo '<tr><td style="padding-left: 20px;" nowrap>
<a href="login.php" target="content">'.$p->t('testtool/startseite').'</a>
</td></tr>';
if ($content_id = $db->db_fetch_object($result))
if($content_id->content_id!='')
echo '<tr><td style="padding-left: 20px;"><a href="../../cms/content.php?content_id='.$content_id->content_id.'&sprache='.$sprache.'" target="content">'.$p->t('testtool/einleitung').'</a></td></tr>';
echo '<tr><td style="padding-left: 20px;"><a href="../../cms/content.php?content_id='.$content_id->content_id.'&sprache='.$sprache.'" target="content">'.$p->t('testtool/einleitung').'</a></td></tr>';
echo '<tr><td>&nbsp;</td></tr>';
echo '<tr><td style="padding-left: 20px;" nowrap>';
@@ -130,8 +130,8 @@ if (isset($_SESSION['pruefling_id']))
$qry = "
WITH prestudent_data AS
(
SELECT DISTINCT ON (prestudent_id)
prestudent_id,
SELECT DISTINCT ON (prestudent_id)
prestudent_id,
studienplan_id,
studiengang_kz,
typ,
@@ -145,7 +145,7 @@ if (isset($_SESSION['pruefling_id']))
public.tbl_studiengang USING (studiengang_kz)
JOIN
public.tbl_studiengangstyp USING (typ)
WHERE
WHERE
tbl_prestudent.person_id = (
SELECT
person_id
@@ -154,19 +154,19 @@ if (isset($_SESSION['pruefling_id']))
WHERE
prestudent_id = ".$db->db_add_param($_SESSION['prestudent_id'])."
)
-- Filter only future studiensemester (incl. actual one)
AND
studiensemester_kurzbz IN (
SELECT
SELECT
studiensemester_kurzbz
FROM
public.tbl_studiensemester
WHERE
public.tbl_studiensemester
WHERE
ende > now()
)
AND
AND
status_kurzbz = 'Interessent'";
/* If the logged-in prestudents study is a Bachelor-study, filter only Bachelor-studies */
@@ -188,7 +188,7 @@ if (isset($_SESSION['pruefling_id']))
ORDER BY
prestudent_id,
datum DESC,
tbl_prestudentstatus.insertamum DESC,
tbl_prestudentstatus.insertamum DESC,
tbl_prestudentstatus.ext_id DESC
)
@@ -200,7 +200,7 @@ if (isset($_SESSION['pruefling_id']))
". $bezeichnung_mehrsprachig_sel. "
FROM
(
(SELECT
(SELECT
prestudent_data.semester AS ps_sem,
gebiet_id,
bezeichnung,
@@ -209,11 +209,11 @@ if (isset($_SESSION['pruefling_id']))
tbl_ablauf.semester,
tbl_ablauf.reihung,
".$bezeichnung_mehrsprachig. "
FROM
FROM
prestudent_data
JOIN
JOIN
testtool.tbl_ablauf USING (studiengang_kz)
JOIN
JOIN
testtool.tbl_gebiet USING (gebiet_id)
WHERE
(prestudent_data.semester= 1 AND tbl_ablauf.semester = 1)
@@ -224,7 +224,7 @@ if (isset($_SESSION['pruefling_id']))
UNION
(
SELECT
SELECT
prestudent_data.semester AS ps_sem,
gebiet_id,
bezeichnung,
@@ -233,18 +233,18 @@ if (isset($_SESSION['pruefling_id']))
tbl_ablauf.semester,
tbl_ablauf.reihung,
". $bezeichnung_mehrsprachig. "
FROM
FROM
prestudent_data
JOIN
JOIN
testtool.tbl_ablauf USING (studienplan_id)
JOIN
JOIN
testtool.tbl_gebiet USING (gebiet_id)
WHERE
(prestudent_data.semester= 1 AND tbl_ablauf.semester = 1)
OR
(prestudent_data.semester= 3 AND tbl_ablauf.semester IN (1,3))
)
)
ORDER BY
reihung
) temp
@@ -255,7 +255,7 @@ if (isset($_SESSION['pruefling_id']))
$result = $db->db_query($qry);
$lastsemester = '';
while($row = $db->db_fetch_object($result))
{
//Jedes Semester in einer eigenen Tabelle anzeigen
@@ -267,7 +267,7 @@ if (isset($_SESSION['pruefling_id']))
echo '</table>';
}
$lastsemester = $row->semester;
echo '<table border="0" cellspacing="0" cellpadding="0" id="Gebiet" style="display: visible; border-collapse: separate; border-spacing: 0 6px;">';
echo '<tr><td class="HeaderTesttool">'.$row->semester.'. '.$p->t('testtool/semester').' '.($row->semester!='1'?$p->t('testtool/quereinstieg'):'').'</td></tr>';
}
@@ -276,9 +276,9 @@ if (isset($_SESSION['pruefling_id']))
{
//Status der Gebiete Pruefen
$gebiet->load($row->gebiet_id);
$qry = "SELECT extract('epoch' from '".$gebiet->zeit."'-(now()-min(begintime))) as time
FROM testtool.tbl_pruefling_frage JOIN testtool.tbl_frage USING(frage_id)
FROM testtool.tbl_pruefling_frage JOIN testtool.tbl_frage USING(frage_id)
WHERE gebiet_id=".$db->db_add_param($row->gebiet_id)." AND pruefling_id=".$db->db_add_param($_SESSION['pruefling_id']);
if($result_time = $db->db_query($qry))
{
@@ -326,7 +326,7 @@ if (isset($_SESSION['pruefling_id']))
<!--<td width="10" class="ItemTesttoolRight" nowrap>&nbsp;</td>-->
</tr>';
}
else
else
{
echo '<tr>
<td nowrap>
@@ -995,9 +995,9 @@ function StudentAbschlusspruefungPrintUrkundeMultiple(event, sprache)
return false;
}
if(pruefungstyp_kurzbz=='Bachelor' && sprache=='deutsch')
if((pruefungstyp_kurzbz=='Bachelor' || pruefungstyp_kurzbz=='lgabschluss') && sprache=='deutsch')
xsl='Bakkurkunde';
else if(pruefungstyp_kurzbz=='Bachelor' && sprache=='englisch')
else if((pruefungstyp_kurzbz=='Bachelor' || pruefungstyp_kurzbz=='lgabschluss') && sprache=='englisch')
xsl='BakkurkundeEng';
else if(pruefungstyp_kurzbz=='Diplom' && sprache=='deutsch')
xsl='Diplomurkunde';
+5 -2
View File
@@ -80,7 +80,7 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/lvplanung/stpl-semester-overlay.xu
seltype="single" hidecolumnpicker="false" flex="1"
datasources="../rdf/ort.rdf.php" ref="http://www.technikum-wien.at/ort/alle-orte">
<treecols>
<treecol id="raumtyp" label="Raumtyp" flex="2" primary="true" persist="hidden, width, ordinal"/>
<treecol id="raumtyp" label="Raumtyp" flex="3" primary="true" persist="hidden, width, ordinal"/>
<splitter class="tree-splitter"/>
<treecol id="ort_kurzbz" label="Raum" flex="4" hidden="true" persist="hidden, width, ordinal"/>
<splitter class="tree-splitter"/>
@@ -88,13 +88,15 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/lvplanung/stpl-semester-overlay.xu
<splitter class="tree-splitter"/>
<treecol id="ort_bezeichnung" label="Bezeichnung" flex="3" hidden="true" persist="hidden, width, ordinal"/>
<splitter class="tree-splitter"/>
<treecol id="max_person" label="MaxP" flex="1" hidden="true" persist="hidden, width, ordinal"/>
<treecol id="max_person" label="MP" tooltiptext="Max. Personenanzahl" flex="1" hidden="false" persist="hidden, width, ordinal"/>
<splitter class="tree-splitter"/>
<treecol id="raumtypen" label="Raumtypen" flex="1" hidden="true" persist="hidden, width, ordinal"/>
<splitter class="tree-splitter"/>
<treecol id="stockwerk" label="Stockwerk" flex="1" hidden="true" persist="hidden, width, ordinal"/>
<splitter class="tree-splitter"/>
<treecol id="planbezeichnung" label="Planbezeichnung" flex="1" hidden="true" persist="hidden, width, ordinal"/>
<splitter class="tree-splitter"/>
<treecol id="arbeitsplaetze" label="AP" tooltiptext="Arbeitsplätze" flex="1" hidden="false" persist="hidden, width, ordinal"/>
</treecols>
<template>
@@ -110,6 +112,7 @@ echo '<?xul-overlay href="'.APP_ROOT.'content/lvplanung/stpl-semester-overlay.xu
<treecell label="rdf:http://www.technikum-wien.at/ort/rdf#raumtypen"/>
<treecell label="rdf:http://www.technikum-wien.at/ort/rdf#stockwerk"/>
<treecell label="rdf:http://www.technikum-wien.at/ort/rdf#planbezeichnung"/>
<treecell label="rdf:http://www.technikum-wien.at/ort/rdf#arbeitsplaetze"/>
</treerow>
</treeitem>
</treechildren>
+2
View File
@@ -88,6 +88,7 @@ for ($i=0;$i<$num_rows;$i++)
<ORT:stockwerk></ORT:stockwerk>
<ORT:raumtypen>'.$ort->raumtyp_kurzbz.'</ORT:raumtypen>
<ORT:planbezeichnung>'.$ort->planbezeichnung.'</ORT:planbezeichnung>
<ORT:arbeitsplaetze></ORT:arbeitsplaetze>
</RDF:Description>';
$descr.='<RDF:Description RDF:about="'.$rdf_url.$ort->raumtyp_kurzbz.'/'.$ort->ort_kurzbz.'" >
<ORT:raumtyp>'.$ort->ort_kurzbz."</ORT:raumtyp>
@@ -98,6 +99,7 @@ for ($i=0;$i<$num_rows;$i++)
<ORT:stockwerk>".$ort->stockwerk."</ORT:stockwerk>
<ORT:raumtypen>".$raumtypen."</ORT:raumtypen>
<ORT:planbezeichnung>".$ort->planbezeichnung."</ORT:planbezeichnung>
<ORT:arbeitsplaetze>".$ort->arbeitsplaetze."</ORT:arbeitsplaetze>
</RDF:Description>\n";
if ($lastTYP!=$currentTYP)
+27 -3
View File
@@ -281,7 +281,13 @@ xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn
</text:sequence-decls>
<text:p text:style-name="P15">LEHRVERANSTALTUNGSZEUGNIS</text:p>
<text:p text:style-name="P16"/>
<text:p text:style-name="P16"><xsl:value-of select="lv_studiengang_art"/>-Studiengang</text:p>
<!-- Beim Campus International wird der Text "Studiengang" nicht angedruckt -->
<xsl:choose>
<xsl:when test="lv_studiengang_kennzahl=10006"></xsl:when>
<xsl:otherwise>
<text:p text:style-name="P16"><xsl:value-of select="lv_studiengang_art"/>-Studiengang</text:p>
</xsl:otherwise>
</xsl:choose>
<text:p text:style-name="P5"><xsl:value-of select="lv_studiengang_bezeichnung"/></text:p>
<text:p text:style-name="P1"/>
<text:p text:style-name="P1"/>
@@ -289,7 +295,16 @@ xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn
<text:p text:style-name="P1"/>
<text:p text:style-name="P1"/>
<text:p text:style-name="P2">Personenkennzeichen: <xsl:value-of select="matrikelnr"/></text:p>
<text:p text:style-name="P2">Kennzahl des Studienganges: <xsl:value-of select="lv_studiengang_kennzahl"/></text:p>
<!-- Beim Campus International wird die Studiengangskennzahl nicht angedruckt -->
<xsl:choose>
<xsl:when test="lv_studiengang_kennzahl=10006">
<text:p text:style-name="P2"/>
</xsl:when>
<xsl:otherwise>
<text:p text:style-name="P2">Kennzahl des Studienganges: <xsl:value-of select="lv_studiengang_kennzahl"/></text:p>
</xsl:otherwise>
</xsl:choose>
<text:p text:style-name="P3"/>
<text:p text:style-name="P3"/>
<text:p text:style-name="P3"/>
@@ -442,7 +457,16 @@ xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn
</table:table-cell>
<table:table-cell table:style-name="Tabelle3.C2" office:value-type="string">
<text:p text:style-name="P14"><xsl:value-of select="studiengangsleiter" /></text:p>
<text:p text:style-name="P23">Studiengangsleitung</text:p>
<!-- Beim Campus International wird statt Studiengangsleitung, Head of International Office angedruckt -->
<xsl:choose>
<xsl:when test="lv_studiengang_kennzahl=10006">
<text:p text:style-name="P23">Head of International Office</text:p>
</xsl:when>
<xsl:otherwise>
<text:p text:style-name="P23">Studiengangsleitung</text:p>
</xsl:otherwise>
</xsl:choose>
</table:table-cell>
</table:table-row>
</table:table>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff