diff --git a/application/config/cis.php b/application/config/cis.php
index 430539392..39b67f3c4 100644
--- a/application/config/cis.php
+++ b/application/config/cis.php
@@ -13,3 +13,11 @@ $config['cis_vilesci_index_page'] = 'index.ci.php';
// Cis CI BaseUrl
$config['cis_base_url'] = defined('CIS_ROOT') ? CIS_ROOT : APP_ROOT;
$config['cis_index_page'] = 'cis.php';
+
+// Associative array of OEs allowed to have lehrauftraege
+// Array structure: OE => Name of the phrase that contains the name of the OE
+$config['cis_oes_lehrauftraege'] = array(
+ 'etw' => 'PDFLehrauftraegeFH',
+ 'lehrgang' => 'PDFLehrauftraegeLehrgaenge'
+);
+
diff --git a/application/controllers/lehre/lehrauftrag/LehrauftragAkzeptieren.php b/application/controllers/lehre/lehrauftrag/LehrauftragAkzeptieren.php
index 4abb1c400..1ac8de0e6 100644
--- a/application/controllers/lehre/lehrauftrag/LehrauftragAkzeptieren.php
+++ b/application/controllers/lehre/lehrauftrag/LehrauftragAkzeptieren.php
@@ -58,6 +58,9 @@ class LehrauftragAkzeptieren extends Auth_Controller
)
);
+ // Load "cis" config
+ $this->load->config('cis');
+
$this->_setAuthUID(); // sets property uid
$this->setControllerId(); // sets the controller id
@@ -100,7 +103,8 @@ class LehrauftragAkzeptieren extends Auth_Controller
$view_data = array(
'studiensemester_selected' => $studiensemester_kurzbz,
- 'is_external_lector' => $is_external_lector
+ 'is_external_lector' => $is_external_lector,
+ 'cis_oes_lehrauftraege' => $this->config->item('cis_oes_lehrauftraege')
);
$this->load->view('lehre/lehrauftrag/acceptLehrauftrag.php', $view_data);
diff --git a/application/views/lehre/lehrauftrag/acceptLehrauftrag.php b/application/views/lehre/lehrauftrag/acceptLehrauftrag.php
index 0e8aa13cb..ed484f363 100644
--- a/application/views/lehre/lehrauftrag/acceptLehrauftrag.php
+++ b/application/views/lehre/lehrauftrag/acceptLehrauftrag.php
@@ -188,8 +188,13 @@ $this->load->view(
p->t('global', 'dokumentePDF'); ?>
diff --git a/cms/admin.php b/cms/admin.php
index 0ee3bdbbe..af4686d27 100644
--- a/cms/admin.php
+++ b/cms/admin.php
@@ -19,7 +19,10 @@
* Andreas Oesterreicher and
* Karl Burkhart .
*/
+
session_start();
+
+require_once('../config/global.config.inc.php');
require_once('../config/cis.config.inc.php');
require_once('../include/content.class.php');
require_once('../include/template.class.php');
@@ -64,8 +67,8 @@ if(isset($_POST['NewContent']))
if(!isset($template->result[0]))
exit('Es ist kein Template vorhanden');
- if(in_array('etw',$berechtigte_oe))
- $oe = 'etw';
+ if (in_array(FHC_OE_ROOT, $berechtigte_oe))
+ $oe = FHC_OE_ROOT;
else
$oe = $berechtigte_oe[0];
@@ -294,8 +297,8 @@ if(!is_null($method))
if(!isset($template->result[0]))
die('Es ist kein Template vorhanden');
- if(in_array('etw',$berechtigte_oe))
- $oe = 'etw';
+ if (in_array(FHC_OE_ROOT, $berechtigte_oe))
+ $oe = FHC_OE_ROOT;
else
$oe = $berechtigte_oe[0];
diff --git a/config/global.config-default.inc.php b/config/global.config-default.inc.php
index c43cb38d1..ef1147b19 100644
--- a/config/global.config-default.inc.php
+++ b/config/global.config-default.inc.php
@@ -371,4 +371,7 @@ define('STATUS_VORRUECKEN_ANZEIGEN', true);
//externe Ueberwachung im Testtool erlauben
define('TESTTOOL_EXTERNE_UEBERWACHUNG_ALLOWED', false);
+// Defines which organisation is the root of the organisation tree hierarchy for the whole "FHComplete"
+define('FHC_OE_ROOT', 'etw');
+
?>
diff --git a/include/sancho.inc.php b/include/sancho.inc.php
index 4da3768b5..a86a27ee7 100644
--- a/include/sancho.inc.php
+++ b/include/sancho.inc.php
@@ -139,7 +139,7 @@ function sendSanchoMail($vorlage_kurzbz, $vorlage_data, $to, $subject, $headerIm
function parseMailContent($vorlage_kurzbz, $vorlage_data)
{
$vorlage = new Vorlage();
- $vorlage->getAktuelleVorlage('etw', $vorlage_kurzbz);
+ $vorlage->getAktuelleVorlage(FHC_OE_ROOT, $vorlage_kurzbz);
// If the text and the subject of the template are not empty
if (!empty($vorlage->text))
diff --git a/public/js/lehre/lehrauftrag/acceptLehrauftrag.js b/public/js/lehre/lehrauftrag/acceptLehrauftrag.js
index 82a46ded0..68eb24058 100644
--- a/public/js/lehre/lehrauftrag/acceptLehrauftrag.js
+++ b/public/js/lehre/lehrauftrag/acceptLehrauftrag.js
@@ -541,23 +541,20 @@ $(function () {
if ($(this).attr("value") != null && $(this).attr("value") != "") {
var selected = $(this).attr("value");
-
- if (selected == "etw" || selected == "lehrgang") {
- window.open(
- APP_ROOT +
- "cis/private/pdfExport.php" +
- "?xml=lehrauftrag_annehmen.xml.php" +
- "&xsl=Lehrauftrag" +
- "&xsl_oe_kurzbz=" +
- selected +
- "&stg_kz=" +
- "&uid=" +
- uid +
- "&ss=" +
- studiensemester,
- "_parent"
- );
- }
+ window.open(
+ APP_ROOT +
+ "cis/private/pdfExport.php" +
+ "?xml=lehrauftrag_annehmen.xml.php" +
+ "&xsl=Lehrauftrag" +
+ "&xsl_oe_kurzbz=" +
+ selected +
+ "&stg_kz=" +
+ "&uid=" +
+ uid +
+ "&ss=" +
+ studiensemester,
+ "_parent"
+ );
}
});
diff --git a/rdf/lehrauftrag_annehmen.xml.php b/rdf/lehrauftrag_annehmen.xml.php
index d5c850d49..bb84564ae 100644
--- a/rdf/lehrauftrag_annehmen.xml.php
+++ b/rdf/lehrauftrag_annehmen.xml.php
@@ -312,7 +312,7 @@ function drawLehrauftrag($uid)
}
elseif (!empty($xsl_oe_kurzbz))
{
- if ($xsl_oe_kurzbz == 'etw')
+ if ($xsl_oe_kurzbz == FHC_OE_ROOT)
{
$qry .= " AND lv_studiengang_kz > 0";
}
@@ -446,7 +446,7 @@ function drawLehrauftrag($uid)
}
elseif (!empty($xsl_oe_kurzbz))
{
- if ($xsl_oe_kurzbz == 'etw')
+ if ($xsl_oe_kurzbz == FHC_OE_ROOT)
{
$qry .= " AND lv.studiengang_kz > 0";
}
diff --git a/system/checksystem.php b/system/checksystem.php
index 4af8bc56d..5d1392f53 100644
--- a/system/checksystem.php
+++ b/system/checksystem.php
@@ -22,6 +22,7 @@
* Dieses Skript prueft die gesamte Systemumgebung und sollte nach jedem Update gestartet werden.
* Geprueft wird: die Datenbank per "dbupdate_VERSION.php" auf aktualitaet, dabei werden fehlende Attribute angelegt.
*/
+require_once('../config/global.config.inc.php');
require_once('../config/system.config.inc.php');
require_once('../include/basis_db.class.php');
require_once('../version.php');
@@ -374,4 +375,4 @@ if($neue==false)
echo '
Keine neuen Webservicerechte';
echo '