diff --git a/cis/private/coodle/uebersicht.php b/cis/private/coodle/uebersicht.php
index ea12ae1d5..cd2d1747a 100755
--- a/cis/private/coodle/uebersicht.php
+++ b/cis/private/coodle/uebersicht.php
@@ -23,6 +23,7 @@ require_once('../../../config/cis.config.inc.php');
require_once('../../../include/coodle.class.php');
require_once('../../../include/functions.inc.php');
require_once('../../../include/phrasen.class.php');
+require_once('../../../include/datum.class.php');
$lang = getSprache();
@@ -94,7 +95,7 @@ if($method=='delete')
else
{
if($coodle->delete($coodle_id))
- $message =''.$p->t('global/erfolgreichgelöscht').'';
+ $message ='Erfolgreich storniert!';
else
$message =''.$p->t('coodle/umfrageKonnteNichtGeloeschtWerden').'';
}
@@ -115,10 +116,12 @@ echo'
'.$p->t('coodle/uebersicht').'
'.$p->t('coodle/beschreibung').' |
'.$p->t('coodle/letzterStatus').' |
'.$p->t('coodle/ersteller').' |
+ Endedatum |
'.$p->t('coodle/aktion').' |
';
+$datum = new datum();
$coodle = new coodle();
$coodle->getCoodleFromUser($uid);
foreach($coodle->result as $c)
@@ -126,12 +129,14 @@ foreach($coodle->result as $c)
echo '
| '.$coodle->convert_html_chars($c->coodle_id).' |
'.$coodle->convert_html_chars($c->titel).' |
- '.$coodle->convert_html_chars(substr($c->beschreibung,0,40)).' |
+ '.(substr($c->beschreibung,0,40)).' |
'.$coodle->convert_html_chars($c->coodle_status_kurzbz).' |
'.$coodle->convert_html_chars($c->ersteller_uid).' |
+ '.$coodle->convert_html_chars($datum->formatDatum($c->endedatum, 'd.m.Y')).' |
-
-
+
+
+
|
';
}
diff --git a/cis/public/coodle.php b/cis/public/coodle.php
index c840b43f5..bb2d0918a 100755
--- a/cis/public/coodle.php
+++ b/cis/public/coodle.php
@@ -19,12 +19,11 @@
* Authors: Karl Burkhart
*/
-
-
require_once('../../config/cis.config.inc.php');
require_once('../../include/phrasen.class.php');
require_once('../../include/functions.inc.php');
require_once('../../include/coodle.class.php');
+require_once('../../include/datum.class.php');
if(isset($_GET['lang']))
setSprache($_GET['lang']);
@@ -40,9 +39,25 @@ $coodle = new coodle();
if(!$coodle->load($coodle_id))
die($coodle->errormsg);
+if(!$coodle->checkStatus($coodle_id))
+ die('Umfrage ist schon beendet oder noch nicht gestartet');
+
// authentifizierung
if(!isset($_GET['zugangscode']))
- $uid = get_uid();
+{
+ $uid = get_uid();
+ if(!$coodle->checkBerechtigung($coodle_id, $uid))
+ die('Keine Berechtiung für diese Umfrage');
+}
+else
+{
+ if(!$coodle->checkBerechtigung($coodle_id, '', $_GET['zugangscode']))
+ die('Keine Berechtigung für diese Umfrage');
+}
+
+// Überprüfen ob Coodle Status laufend hat
+
+
// checkboxen speichern
if(isset ($_POST['save']))
@@ -55,6 +70,7 @@ if(isset ($_POST['save']))
$coodle_help->getRessourceFromUser($coodle_id, '', $_GET['zugangscode']);
$coodle_ressource_termin= $coodle_help->deleteRessourceTermin($coodle_help->coodle_ressource_id, $coodle_id);
+ $message = "Erfolgreich gespeichert"; // weil wenn alle checkboxen gelöscht werden kommt man nicht mehr in die speichern schleife
}
else
{
@@ -62,6 +78,7 @@ if(isset ($_POST['save']))
{
$coodle_help->getRessourceFromUser($coodle_id, $uid);
$coodle_ressource_termin= $coodle_help->deleteRessourceTermin($coodle_help->coodle_ressource_id, $coodle_id);
+ $message = "Erfolgreich gespeichert";
}
}
@@ -80,9 +97,9 @@ if(isset ($_POST['save']))
$coodle_ressource_termin->new = true;
if(!$coodle_ressource_termin->saveRessourceTermin())
- $message= "Fehler beim Speichern aufgetreten";
+ $message= "Fehler beim Speichern aufgetreten";
else
- $message = "Erfolgreich gespeichert";
+ $message = "Erfolgreich gespeichert";
}
}
}
@@ -91,29 +108,68 @@ if(isset ($_POST['save']))
-
-Coodle Übersicht
-
+ h5 {margin-top:0px; }
+ .container {width: 100%; }
+ #header {
+ background: #DCDDDF;
+ border: 1px solid #c4c6ca;
+ position: relative;
+ padding-left: 50px;
+
+ }
+
+ .error {
+ color:red;
+ padding-left:20px;
+ }
+
+ .ok {
+ color:green;
+ padding-left:20px;
+ }
+
+ #content {
+ padding: 20px 20px;
+ }
+
+ #content th {
+ color:#008462;
+ padding-left: 10px;
+ padding-right: 10px;
+ }
+
+ #content tr.owner
+ {
+ background-color: #DCDDDF;
+ }
+
+ a
+ {
+ color: #008381; text-decoration: none;
+ cursor: pointer;
+ }
+ a:hover
+ {
+ color: Black; text-decoration: none;
+ }
+ #content table{
+
+ }
+
+
@@ -144,15 +200,23 @@ h5 {margin-top:0px; }
$coodle_termine = new coodle();
$coodle_termine->getTermine($coodle_id);
- echo "
-
-
+ $datum = new datum();
+
+ echo "
";
+ if(!isset($_GET['zugangscode']))
+ echo "<< zurück zur Übersicht";
+ echo " ";
+ ".$message;
?>