diff options
| author | Finn Schneider <schneider@data-quest.de> | 2026-03-13 14:35:42 +0100 |
|---|---|---|
| committer | Finn Schneider <schneider@data-quest.de> | 2026-03-13 17:25:01 +0000 |
| commit | f2a3e8a740cebc90eefba4af265358a0e5b6377a (patch) | |
| tree | 7e0300241ed2be53a5a72d94d58792365f47d271 | |
| parent | ff2ecd2d090402a5a30eb675c1d3165d44fbf912 (diff) | |
prevent profile anonymous && editanswers
| -rw-r--r-- | app/controllers/evaluation/profiles.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/controllers/evaluation/profiles.php b/app/controllers/evaluation/profiles.php index a596bf0..c394677 100644 --- a/app/controllers/evaluation/profiles.php +++ b/app/controllers/evaluation/profiles.php @@ -88,6 +88,11 @@ class Evaluation_ProfilesController extends AuthenticatedController 'value' => $is_fill ? $profile->stopdate : time(), //TODO sem 'mindate' => 'startdate' ], + 'info' => [ + 'label' => _('Information'), + 'type' => 'info', + 'value' => _('Antworten können nicht revidiert werden, wenn sie anonym sind.') + ], 'anonymous' => [ 'label' => _('Anonyme Teilnahme'), 'type' => 'checkbox', @@ -130,6 +135,10 @@ class Evaluation_ProfilesController extends AuthenticatedController $profile->optional_templates = implode(',', $optional_array); $profile->store(); } + if ($profile->anonymous && $profile->editanswers) { + $profile->editanswers = false; + $profile->store(); + } }) ->autoStore(); |
