mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
Merge branch 'feature/Anrechnungen_NEU'
This commit is contained in:
@@ -292,11 +292,16 @@ class requestAnrechnung extends Auth_Controller
|
||||
*/
|
||||
private function _checkIfEntitledToReadDMSDoc($dms_id)
|
||||
{
|
||||
if (!$student = getData($this->StudentModel->load(array('student_uid' => $this->_uid)))[0])
|
||||
{
|
||||
show_error('Failed loading Student');
|
||||
}
|
||||
|
||||
$result = $this->AnrechnungModel->loadWhere(array('dms_id' => $dms_id));
|
||||
|
||||
if($result = getData($result)[0])
|
||||
{
|
||||
if ($result->insertvon == $this->_uid)
|
||||
if ($result->prestudent_id == $student->prestudent_id)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -189,6 +189,11 @@ $this->load->view(
|
||||
<div class="col-xs-3">
|
||||
<div class="btn-toolbar" role="toolbar">
|
||||
<div class="btn-group" role="group">
|
||||
<button id="show-inProgressDP" class="btn btn-default btn-clearfilter" type="button"
|
||||
data-toggle="tooltip" data-placement="left"
|
||||
title="<?php echo $this->p->t('anrechnung', 'alleInBearbeitungSTGL'); ?>">
|
||||
<i class='fa fa-eye'></i>
|
||||
</button>
|
||||
<button id="show-recommended" class="btn btn-default btn-clearfilter" type="button"
|
||||
data-toggle="tooltip" data-placement="left"
|
||||
title="<?php echo $this->p->t('ui', 'nurEmpfohleneAnzeigen'); ?>"><i
|
||||
|
||||
@@ -48,6 +48,12 @@ $query = '
|
||||
AND le.studiensemester_kurzbz = anrechnungen.studiensemester_kurzbz
|
||||
AND lema.mitarbeiter_uid = \'' . $LEKTOR_UID . '\'
|
||||
AND le.lehre = TRUE
|
||||
AND EXISTS (
|
||||
SELECT 1
|
||||
FROM lehre.tbl_anrechnung_anrechnungstatus
|
||||
WHERE anrechnung_id = anrechnungen.anrechnung_id
|
||||
AND status_kurzbz=\'inProgressLektor\'
|
||||
)
|
||||
';
|
||||
|
||||
$filterWidgetArray = array(
|
||||
|
||||
@@ -147,12 +147,11 @@ $(function(){
|
||||
// Set status alert color
|
||||
approveAnrechnung.setStatusAlertColor();
|
||||
|
||||
// Show only rows with empfohlene + noch nicht genehmigte/abgelehnte anrechnungen
|
||||
$("#show-recommended").click(function(){
|
||||
// Show only rows that are in progress by STGL
|
||||
$("#show-inProgressDP").click(function(){
|
||||
$('#tableWidgetTabulator').tabulator('setFilter',
|
||||
[
|
||||
{field: 'status_kurzbz', type: '=', value: ANRECHNUNGSTATUS_PROGRESSED_BY_STGL},
|
||||
{field: 'empfehlung_anrechnung', type: '=', value: 'true'}
|
||||
]
|
||||
);
|
||||
});
|
||||
|
||||
@@ -4569,6 +4569,42 @@ if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_anrechnungstatus LIMIT 1;"
|
||||
echo ' lehre.tbl_anrechnungstatus: Tabelle hinzugefuegt<br>';
|
||||
}
|
||||
|
||||
// GRANT INSERT, UPDATE, DELETE ON TABLE lehre.tbl_anrechnungstatus TO web;
|
||||
$qry = 'GRANT SELECT, INSERT, UPDATE, DELETE ON TABLE lehre.tbl_anrechnungstatus TO web;';
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.tbl_anrechnungstatus '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>web</strong> on lehre.tbl_anrechnungstatus';
|
||||
|
||||
|
||||
// SEQUENCE seq_anrechnungstatus_status_kurzbz
|
||||
if ($result = $db->db_query("SELECT 0 FROM pg_class WHERE relname = 'seq_anrechnungstatus_status_kurzbz'"))
|
||||
{
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$qry = '
|
||||
CREATE SEQUENCE lehre.seq_anrechnungstatus_status_kurzbz
|
||||
START WITH 1
|
||||
INCREMENT BY 1
|
||||
NO MAXVALUE
|
||||
NO MINVALUE
|
||||
CACHE 1;
|
||||
';
|
||||
|
||||
if(!$db->db_query($qry))
|
||||
echo '<strong>lehre.seq_anrechnungstatus_status_kurzbz '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Created sequence: lehre.seq_anrechnungstatus_status_kurzbz';
|
||||
|
||||
// GRANT SELECT, UPDATE ON SEQUENCE lehre.tbl_anrechnungstatus_status_kurzbz_seq to web;
|
||||
$qry = 'GRANT SELECT, UPDATE ON SEQUENCE lehre.seq_anrechnungstatus_status_kurzbz TO web;';
|
||||
if (!$db->db_query($qry))
|
||||
echo '<strong>lehre.seq_anrechnungstatus_status_kurzbz '.$db->db_last_error().'</strong><br>';
|
||||
else
|
||||
echo '<br>Granted privileges to <strong>vilesci</strong> on lehre.seq_anrechnungstatus_status_kurzbz';
|
||||
}
|
||||
}
|
||||
|
||||
// Add table anrechnung_anrechnungstatus
|
||||
// Für bestehende genehmigte Anrechnungsanträge wird ein Eintrag mit dem Status 'approved' angelegt
|
||||
if(!$result = @$db->db_query("SELECT 1 FROM lehre.tbl_anrechnung_anrechnungstatus LIMIT 1;"))
|
||||
|
||||
@@ -10210,8 +10210,26 @@ array(
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
|
||||
array(
|
||||
'app' => 'core',
|
||||
'category' => 'ui',
|
||||
'phrase' => 'alleInBearbeitungSTGL',
|
||||
'insertvon' => 'system',
|
||||
'phrases' => array(
|
||||
array(
|
||||
'sprache' => 'German',
|
||||
'text' => "Alle anzeigen, die durch die Studiengangsleitung bearbeitet werden.",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
),
|
||||
array(
|
||||
'sprache' => 'English',
|
||||
'text' => "Show all that are processed by the study course director.",
|
||||
'description' => '',
|
||||
'insertvon' => 'system'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user