Merge branch 'feature-8743/Alte_Pruefungsprotokolle_ausblenden'

This commit is contained in:
Andreas Österreicher
2020-07-22 14:43:01 +02:00
4 changed files with 135 additions and 3 deletions
@@ -51,7 +51,14 @@ class Pruefungsprotokoll extends Auth_Controller
public function index()
{
$this->load->library('WidgetLib');
$this->load->view('lehre/pruefungsprotokollUebersicht.php');
// Protokolle anzeigen seit heute / letzte Woche / alle
$period = $this->input->post('period');
$period = (!is_null($period)) ? $period : 'today';
$data = array('period' => $period);
$this->load->view('lehre/pruefungsprotokollUebersicht.php', $data);
}
/**
@@ -15,6 +15,10 @@
'phrases' => array(
'ui' => array(
'keineDatenVorhanden',
'heute',
'letzteWoche',
'alle',
'zeitraum'
)
),
'customCSSs' => array('public/css/sbadmin2/tablesort_bootstrap.css'),
@@ -34,6 +38,22 @@
</div>
</div>
<?php echo $this->p->t('abschlusspruefung','einfuehrungstext'); ?>
<br><br>
<div class="row">
<div class="col-lg-12">
<form action="" method="post">
<label><?php echo $this->p->t('ui','zeitraum'); ?>:&nbsp;&nbsp;</label>
<div class="btn-group" role="group">
<button type="submit" class="btn btn-default <?php echo $period == 'today' ? 'active' : ''?>"
name="period" value="today"><?php echo $this->p->t('ui','heute'); ?></button>
<button type="submit" class="btn btn-default <?php echo $period == 'lastWeek' ? 'active' : ''?>"
name="period" value="lastWeek"><?php echo $this->p->t('ui','letzteWoche'); ?></button>
<button type="submit" class="btn btn-default <?php echo $period == 'all' ? 'active' : ''?>"
name="period" value="all"><?php echo $this->p->t('ui','alle'); ?></button>
</div>
</form>
</div>
</div>
<div class="row">
<div class="col-lg-12">
<?php $this->load->view('lehre/pruefungsprotokollUebersichtData.php'); ?>
@@ -1,5 +1,6 @@
<?php
$UID = getAuthUID();
$PERIOD = $period; // filter Pruefungsprotokolle for given period
$query = "
SELECT
@@ -14,10 +15,14 @@ FROM
JOIN public.tbl_benutzer ON(student_uid=uid)
JOIN public.tbl_person USING(person_id)
JOIN public.tbl_studiengang ON(tbl_studiengang.studiengang_kz=tbl_student.studiengang_kz)
JOIN public.tbl_studiengangstyp USING(typ);
JOIN public.tbl_studiengangstyp USING(typ)
WHERE
vorsitz='".$UID."'
AND datum>='2020-05-27'
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'
)
ORDER BY datum, nachname, vorname
";
+100
View File
@@ -7868,6 +7868,106 @@ Any unusual occurrences
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'alle',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Alle',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'All',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'heute',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Heute',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Today',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'letzteWoche',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Letzte Woche',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Last week',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'gestern',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Gestern',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Yesterday',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'zeitraum',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Zeitraum',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Period',
'description' => '',
'insertvon' => 'system'
)
)
)
);