diff --git a/FHC-vendor/jquery-tablesorter/package.json b/FHC-vendor/jquery-tablesorter/package.json
index b16fcb45e..110042959 100644
--- a/FHC-vendor/jquery-tablesorter/package.json
+++ b/FHC-vendor/jquery-tablesorter/package.json
@@ -56,7 +56,7 @@
]
},
"devDependencies": {
- "grunt": "^0.4.5",
+ "grunt": "^1.3.0",
"grunt-cli": "~0.1.13",
"grunt-contrib-clean": "^0.7.0",
"grunt-contrib-concat": "^0.5.1",
diff --git a/application/controllers/lehre/lehrauftrag/Lehrauftrag.php b/application/controllers/lehre/lehrauftrag/Lehrauftrag.php
index 8a096338e..0fe70a302 100644
--- a/application/controllers/lehre/lehrauftrag/Lehrauftrag.php
+++ b/application/controllers/lehre/lehrauftrag/Lehrauftrag.php
@@ -270,7 +270,6 @@ class Lehrauftrag extends Auth_Controller
private function _sendMail($lehrvertrag_data_arr)
{
// Cluster data of new lehrvertraege as needed to send mail
- $lehrvertrag_data_arr = $this->_cluster_newVertragData($lehrvertrag_data_arr);
foreach ($lehrvertrag_data_arr as $lehrvertrag_data)
{
diff --git a/application/controllers/system/infocenter/InfoCenter.php b/application/controllers/system/infocenter/InfoCenter.php
index 43de8bb60..7d36690e7 100644
--- a/application/controllers/system/infocenter/InfoCenter.php
+++ b/application/controllers/system/infocenter/InfoCenter.php
@@ -70,6 +70,7 @@ class InfoCenter extends Auth_Controller
const INTERESSENTSTATUS = 'Interessent';
const ABGEWIESENERSTATUS = 'Abgewiesener';
const BEWERBERSTATUS = 'Bewerber';
+ const WARTENDER = 'Wartender';
// Statusgruende for which no Studiengangsfreigabemessage should be sent
private $_statusgruendeNoStgFreigabeMessage = array('FIT Programm', 'FIT program', 'FIT programme');
@@ -108,7 +109,9 @@ class InfoCenter extends Auth_Controller
'setOnHold' => 'infocenter:rw',
'removeOnHold' => 'infocenter:rw',
'getStudienjahrEnd' => 'infocenter:r',
- 'setNavigationMenuArrayJson' => 'infocenter:r'
+ 'setNavigationMenuArrayJson' => 'infocenter:r',
+ 'getAbsageData' => 'infocenter:r',
+ 'saveAbsageForAll' => 'infocenter:rw'
)
);
@@ -433,11 +436,14 @@ class InfoCenter extends Auth_Controller
* Saves Absage for Prestudent including the reason for the Absage (statusgrund).
* inserts Studiensemester and Ausbildungssemester for the new Absage of (chronologically) last status.
*/
- public function saveAbsage()
+ public function saveAbsage($prestudent_id = null, $statusgrund = null)
{
$json = null;
- $prestudent_id = $this->input->post('prestudent_id');
- $statusgrund = $this->input->post('statusgrund');
+ if (is_null($prestudent_id))
+ $prestudent_id = $this->input->post('prestudent_id');
+
+ if (is_null($statusgrund))
+ $statusgrund = $this->input->post('statusgrund');
$lastStatus = $this->PrestudentstatusModel->getLastStatus($prestudent_id);
@@ -446,8 +452,10 @@ class InfoCenter extends Auth_Controller
if (hasData($lastStatus) && hasData($statusgrresult))
{
- //check if still Interessent and not freigegeben yet
- if ($lastStatus->retval[0]->status_kurzbz === self::INTERESSENTSTATUS && !isset($lastStatus->retval[0]->bestaetigtam))
+ //check if still Interessent
+ if ($lastStatus->retval[0]->status_kurzbz === self::INTERESSENTSTATUS
+ || $lastStatus->retval[0]->status_kurzbz === self::BEWERBERSTATUS
+ || $lastStatus->retval[0]->status_kurzbz === self::WARTENDER)
{
$result = $this->PrestudentstatusModel->insert(
array(
@@ -1358,6 +1366,8 @@ class InfoCenter extends Auth_Controller
|| isset($zgvpruefung->prestudentstatus->bestaetigtam)
|| $zgvpruefung->prestudentstatus->status_kurzbz != self::INTERESSENTSTATUS;
+ $zgvpruefung->abgewiesener = $zgvpruefung->prestudentstatus->status_kurzbz === self::ABGEWIESENERSTATUS;
+
//wether prestudent was freigegeben for RT/Stg
$zgvpruefung->isRtFreigegeben = false;
$zgvpruefung->isStgFreigegeben = false;
@@ -1427,8 +1437,8 @@ class InfoCenter extends Auth_Controller
$this->_sortPrestudents($zgvpruefungen);
- $abwstatusgruende = $this->StatusgrundModel->loadWhere(array('status_kurzbz' => self::ABGEWIESENERSTATUS))->retval;
- $intstatusgruende = $this->StatusgrundModel->loadWhere(array('status_kurzbz' => self::INTERESSENTSTATUS))->retval;
+ $abwstatusgruende = $this->StatusgrundModel->getStatus(self::ABGEWIESENERSTATUS, true)->retval;
+ $intstatusgruende = $this->StatusgrundModel->getStatus(self::INTERESSENTSTATUS)->retval;
$data = array (
'zgvpruefungen' => $zgvpruefungen,
@@ -1687,4 +1697,45 @@ class InfoCenter extends Auth_Controller
$this->loglib->logError('Studiengang has no mail for sending Freigabe mail');
}
}
+
+ public function getAbsageData()
+ {
+ $this->load->model('organisation/Studiengang_model', 'StudiengangModel');
+
+ $statusgruende = $this->StatusgrundModel->getStatus(self::ABGEWIESENERSTATUS, true)->retval;
+ $studienSemester = $this->variablelib->getVar('infocenter_studiensemester');
+ $studiengaenge = $this->StudiengangModel->getStudiengaengeWithOrgForm(['b', 'm'], $studienSemester);
+
+ $data = array (
+ 'statusgruende' => $statusgruende,
+ 'studiengaenge' => $studiengaenge->retval
+ );
+
+ $this->outputJsonSuccess($data);
+ }
+
+ public function saveAbsageForAll()
+ {
+ $statusgrund = $this->input->post('statusgrund');
+ $studiengang = $this->input->post('studiengang');
+ $personen = $this->input->post('personen');
+ $studienSemester = $this->variablelib->getVar('infocenter_studiensemester');
+
+ if ($statusgrund === 'null' || $studiengang === 'null' || empty($personen))
+ $this->terminateWithJsonError("Bitte Statusgrund, Studiengang und Personen auswählen.");
+
+ foreach($personen as $person)
+ {
+ $prestudent = $this->PrestudentModel->getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester);
+
+ if(!hasData($prestudent))
+ continue;
+
+ $prestudentData = getData($prestudent);
+
+ $this->saveAbsage($prestudentData[0]->prestudent_id, $statusgrund);
+ }
+
+ $this->outputJsonSuccess("Success");
+ }
}
diff --git a/application/models/crm/Prestudent_model.php b/application/models/crm/Prestudent_model.php
index 2e014800c..52ba4d9f3 100644
--- a/application/models/crm/Prestudent_model.php
+++ b/application/models/crm/Prestudent_model.php
@@ -581,4 +581,19 @@ class Prestudent_model extends DB_Model
return $this->execQuery($query, array($person_id));
}
+
+ public function getPrestudentByStudiengangAndPerson($studiengang, $person, $studienSemester)
+ {
+ $query = "SELECT ps.prestudent_id
+ FROM public.tbl_prestudentstatus pss
+ JOIN public.tbl_prestudent ps USING(prestudent_id)
+ JOIN public.tbl_studiengang sg USING(studiengang_kz)
+ JOIN lehre.tbl_studienplan sp USING(studienplan_id)
+ WHERE ps.person_id = ?
+ AND UPPER((sg.typ || sg.kurzbz) || ':' || sp.orgform_kurzbz) = ?
+ AND pss.studiensemester_kurzbz = ?
+ ";
+
+ return $this->execQuery($query, array($person, $studiengang, $studienSemester));
+ }
}
diff --git a/application/models/crm/Statusgrund_model.php b/application/models/crm/Statusgrund_model.php
index 4717a7571..7ab17a45b 100644
--- a/application/models/crm/Statusgrund_model.php
+++ b/application/models/crm/Statusgrund_model.php
@@ -11,4 +11,18 @@ class Statusgrund_model extends DB_Model
$this->dbTable = "public.tbl_status_grund";
$this->pk = "statusgrund_id";
}
+
+ public function getStatus($status_kurzbz = null, $aktiv = null)
+ {
+ $this->addOrder('bezeichnung_mehrsprachig');
+ $where = array();
+ if (!is_null($status_kurzbz))
+ $where['status_kurzbz'] = $status_kurzbz;
+ if (!is_null($aktiv))
+ $where['aktiv'] = $aktiv;
+
+ $status = $this->loadWhere($where);
+
+ return success($status->retval);
+ }
}
diff --git a/application/models/organisation/Studiengang_model.php b/application/models/organisation/Studiengang_model.php
index 8b8be0366..41bdabd11 100644
--- a/application/models/organisation/Studiengang_model.php
+++ b/application/models/organisation/Studiengang_model.php
@@ -481,4 +481,18 @@ class Studiengang_model extends DB_Model
return $this->loadWhere($condition);
}
+
+ public function getStudiengaengeWithOrgForm($typ, $semester)
+ {
+ $query = "SELECT DISTINCT (UPPER(sg.typ || sg.kurzbz || ':' || sp.orgform_kurzbz)) AS Studiengang
+ FROM public.tbl_studiengang sg
+ JOIN lehre.tbl_studienordnung USING (studiengang_kz)
+ JOIN lehre.tbl_studienplan sp USING (studienordnung_id)
+ JOIN lehre.tbl_studienplan_semester spsem USING (studienplan_id)
+ WHERE sp.aktiv = TRUE AND sg.aktiv = TRUE AND sg.typ IN ?
+ AND spsem.studiensemester_kurzbz = ?
+ ORDER BY Studiengang";
+
+ return $this->execQuery($query, array($typ, $semester));
+ }
}
diff --git a/application/views/lehre/lehrauftrag/acceptLehrauftrag.php b/application/views/lehre/lehrauftrag/acceptLehrauftrag.php
index e87f0945c..521883452 100644
--- a/application/views/lehre/lehrauftrag/acceptLehrauftrag.php
+++ b/application/views/lehre/lehrauftrag/acceptLehrauftrag.php
@@ -189,7 +189,7 @@ $this->load->view(
-
+
diff --git a/application/views/lehre/lehrauftrag/acceptLehrauftragData.php b/application/views/lehre/lehrauftrag/acceptLehrauftragData.php
index f09eb62a0..92c896ce7 100644
--- a/application/views/lehre/lehrauftrag/acceptLehrauftragData.php
+++ b/application/views/lehre/lehrauftrag/acceptLehrauftragData.php
@@ -32,7 +32,7 @@ SELECT
erteilt,
akzeptiert,
(SELECT
- vorname || \' \' || nachname
+ nachname || \' \' || vorname
FROM
public.tbl_person
JOIN public.tbl_benutzer benutzer USING (person_id)
@@ -48,7 +48,7 @@ SELECT
)
) AS "bestellt_von",
(SELECT
- vorname || \' \' || nachname
+ nachname || \' \' || vorname
FROM
public.tbl_person
JOIN public.tbl_benutzer benutzer USING (person_id)
@@ -64,7 +64,7 @@ SELECT
)
) AS "erteilt_von",
(SELECT
- vorname || \' \' || nachname
+ nachname || \' \' || vorname
FROM
public.tbl_person
JOIN public.tbl_benutzer benutzer USING (person_id)
@@ -241,7 +241,7 @@ FROM
\'Betreuung\' AS "typ",
(betreuerart_kurzbz || \' \' ||
(SELECT
- vorname || \' \' || nachname
+ nachname || \' \' || vorname
FROM
PUBLIC.tbl_person
JOIN PUBLIC.tbl_benutzer USING (person_id)
diff --git a/application/views/lehre/lehrauftrag/approveLehrauftragData.php b/application/views/lehre/lehrauftrag/approveLehrauftragData.php
index 88b3eabd0..7c9669ae3 100644
--- a/application/views/lehre/lehrauftrag/approveLehrauftragData.php
+++ b/application/views/lehre/lehrauftrag/approveLehrauftragData.php
@@ -34,7 +34,7 @@ SELECT
erteilt,
akzeptiert,
(SELECT
- vorname || \' \' || nachname
+ nachname || \' \' || vorname
FROM
public.tbl_person
JOIN public.tbl_benutzer benutzer USING (person_id)
@@ -50,7 +50,7 @@ SELECT
)
) AS "bestellt_von",
(SELECT
- vorname || \' \' || nachname
+ nachname || \' \' || vorname
FROM
public.tbl_person
JOIN public.tbl_benutzer benutzer USING (person_id)
@@ -66,7 +66,7 @@ SELECT
)
) AS "erteilt_von",
(SELECT
- vorname || \' \' || nachname
+ nachname || \' \' || vorname
FROM
public.tbl_person
JOIN public.tbl_benutzer benutzer USING (person_id)
@@ -128,7 +128,7 @@ FROM
(
SELECT
/* lehrauftraege also planned with dummies, therefore personalnummer is needed */
- ma.personalnummer,
+ (ma.personalnummer::text),
lema.lehreinheit_id,
lv.lehrveranstaltung_id,
lv.bezeichnung AS "lv_bezeichnung",
@@ -240,7 +240,7 @@ FROM
pa.lehreinheit_id,
lv.lehrveranstaltung_id,
lv.bezeichnung AS "lv_bezeichnung",
- pa.projektarbeit_id AS "projektarbeit_id",
+ (pa.projektarbeit_id::text) AS "projektarbeit_id",
le.studiensemester_kurzbz,
stg.studiengang_kz,
upper(stg.typ || stg.kurzbz) AS "stg_typ_kurzbz",
@@ -249,7 +249,7 @@ FROM
\'Betreuung\' AS "typ",
(betreuerart_kurzbz || \' \' ||
(SELECT
- vorname || \' \' || nachname
+ nachname || \' \' || vorname
FROM
PUBLIC.tbl_person
JOIN PUBLIC.tbl_benutzer USING (person_id)
@@ -268,7 +268,7 @@ FROM
ELSE (oe.organisationseinheittyp_kurzbz ||
\' \' || oe.bezeichnung)
END AS "lv_oe_kurzbz",
- (nachname || \' \' || vorname) AS "lektor",
+ (vorname || \' \' || nachname) AS "lektor",
TRUNC(pb.stunden, 1) AS "stunden",
TRUNC((pb.stunden * pb.stundensatz), 2) AS "betrag",
vertrag_id,
diff --git a/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php b/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php
index 54948fb26..a3efb66b3 100644
--- a/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php
+++ b/application/views/lehre/lehrauftrag/cancelledLehrauftragData.php
@@ -14,7 +14,7 @@ $query = '
datum AS "storniert",
(
SELECT
- vorname || \' \' || nachname
+ nachname || \' \' || vorname
FROM
public.tbl_person
JOIN public.tbl_benutzer benutzer USING (person_id)
diff --git a/application/views/lehre/lehrauftrag/orderLehrauftragData.php b/application/views/lehre/lehrauftrag/orderLehrauftragData.php
index aea7d5181..1ccfc55a4 100644
--- a/application/views/lehre/lehrauftrag/orderLehrauftragData.php
+++ b/application/views/lehre/lehrauftrag/orderLehrauftragData.php
@@ -65,7 +65,7 @@ SELECT
erteilt,
akzeptiert,
(SELECT
- vorname || \' \' || nachname
+ nachname || \' \' || vorname
FROM
public.tbl_person
JOIN public.tbl_benutzer benutzer USING (person_id)
@@ -81,7 +81,7 @@ SELECT
)
) AS "bestellt_von",
(SELECT
- vorname || \' \' || nachname
+ nachname || \' \' || vorname
FROM
public.tbl_person
JOIN public.tbl_benutzer benutzer USING (person_id)
@@ -97,7 +97,7 @@ SELECT
)
) AS "erteilt_von",
(SELECT
- vorname || \' \' || nachname
+ nachname || \' \' || vorname
FROM
public.tbl_person
JOIN public.tbl_benutzer benutzer USING (person_id)
@@ -281,7 +281,7 @@ FROM
\'Betreuung\' AS "typ",
(betreuerart_kurzbz || \' \' ||
(SELECT
- vorname || \' \' || nachname
+ nachname || \' \' || vorname
FROM
PUBLIC.tbl_person
JOIN PUBLIC.tbl_benutzer USING (person_id)
diff --git a/application/views/lehre/pruefungsprotokollUebersicht.php b/application/views/lehre/pruefungsprotokollUebersicht.php
index 35bea7963..c7de8fcd0 100644
--- a/application/views/lehre/pruefungsprotokollUebersicht.php
+++ b/application/views/lehre/pruefungsprotokollUebersicht.php
@@ -48,6 +48,8 @@
name="period" value="today">p->t('ui','heute'); ?>
+
diff --git a/application/views/lehre/pruefungsprotokollUebersichtData.php b/application/views/lehre/pruefungsprotokollUebersichtData.php
index dd247c2eb..ff2caa774 100644
--- a/application/views/lehre/pruefungsprotokollUebersichtData.php
+++ b/application/views/lehre/pruefungsprotokollUebersichtData.php
@@ -19,9 +19,10 @@ FROM
WHERE
vorsitz='".$UID."'
AND (
- '". $PERIOD. "' = 'today' AND datum = NOW()::date OR
- '". $PERIOD. "' = 'lastWeek' AND datum = (NOW() - interval '1 week')::date OR
- '". $PERIOD. "' = 'all' AND datum >= '2020-05-27'
+ ('". $PERIOD. "' = 'today' AND datum = NOW()::date) OR
+ ('". $PERIOD. "' = 'lastWeek' AND datum >= (NOW() - interval '1 week')::date AND datum < NOW()::date) OR
+ ('". $PERIOD. "' = 'upcoming' AND datum > NOW()::date) OR
+ ('". $PERIOD. "' = 'all' AND datum >= '2020-05-27')
)
ORDER BY datum, nachname, vorname
";
diff --git a/application/views/system/infocenter/absageModal.php b/application/views/system/infocenter/absageModal.php
new file mode 100644
index 000000000..00298945e
--- /dev/null
+++ b/application/views/system/infocenter/absageModal.php
@@ -0,0 +1,35 @@
+
+
+
+
+
+
p->t('infocenter', 'absageBestaetigen') ?>
+
+
+ p->t('infocenter', 'absageBestaetigenTxt') ?>
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/application/views/system/infocenter/infocenter.php b/application/views/system/infocenter/infocenter.php
index 4005518a1..38e644846 100644
--- a/application/views/system/infocenter/infocenter.php
+++ b/application/views/system/infocenter/infocenter.php
@@ -13,6 +13,7 @@
'ajaxlib' => true,
'filterwidget' => true,
'navigationwidget' => true,
+ 'dialoglib' => true,
'phrases' => array(
'person' => array('vorname', 'nachname'),
'global' => array('mailAnXversandt'),
@@ -40,6 +41,7 @@