diff options
| author | Finn Schneider <schneider@data-quest.de> | 2026-03-17 15:07:03 +0100 |
|---|---|---|
| committer | Finn Schneider <schneider@data-quest.de> | 2026-03-17 15:07:03 +0100 |
| commit | 4ad57b38335daea07cfc6c67219f9a2caf18e9ec (patch) | |
| tree | 1608925e3cca4cc426a8c859495bbfe914a4329d | |
| parent | 7ff92562d33b02728e9933adbaa4840fdbfcb15b (diff) | |
profiles always editable
| -rw-r--r-- | app/views/evaluation/profiles/index.php | 20 | ||||
| -rw-r--r-- | lib/models/QuestionnaireEvalCentralProfile.php | 9 |
2 files changed, 5 insertions, 24 deletions
diff --git a/app/views/evaluation/profiles/index.php b/app/views/evaluation/profiles/index.php index 75bafbf..8244a41 100644 --- a/app/views/evaluation/profiles/index.php +++ b/app/views/evaluation/profiles/index.php @@ -37,22 +37,12 @@ use Studip\Button; <td> <input type="checkbox" name="profiles[]" value="<?= htmlReady($profile->semester_id) ?>"> </td> - <?php if ($profile->isEditable()) : ?> - <td data-text="<?= $profile->semester->beginn ?>"> - <a href="<?= $controller->link_for("evaluation/profiles/edit/" . $profile->semester_id) ?>" - data-dialog> - <?= htmlReady($profile->semester->name) ?> - </a> - </td> - <?php else : ?> - <td data-text="<?= $profile->semester->beginn ?>" - title="<?= sprintf( - _('Mindestens eine Evaluation des Profils %s ist gestartet. Es kann nicht mehr bearbeitet werden.'), - $profile->semester->name) - ?>"> + <td data-text="<?= $profile->semester->beginn ?>"> + <a href="<?= $controller->link_for("evaluation/profiles/edit/" . $profile->semester_id) ?>" + data-dialog> <?= htmlReady($profile->semester->name) ?> - </td> - <?php endif ?> + </a> + </td> <td><?= htmlReady($profile->template->title) ?></td> <td> <?php foreach (Questionnaire::findMany(explode(',', $profile->optional_templates)) as $opt_template) : ?> diff --git a/lib/models/QuestionnaireEvalCentralProfile.php b/lib/models/QuestionnaireEvalCentralProfile.php index 6c4a0bb..58615dc 100644 --- a/lib/models/QuestionnaireEvalCentralProfile.php +++ b/lib/models/QuestionnaireEvalCentralProfile.php @@ -46,13 +46,4 @@ class QuestionnaireEvalCentralProfile extends SimpleORMap $is_for ? self::RESULT_VISIBLE_FOR_OPTIONS : self::RESULT_VISIBILITY_OPTIONS ); } - - public function isEditable() - { - if(EvaluationHelper::isPermittedEvaluationAccess()) { - return !QuestionnaireEvalAssignment::countBySQL( - "`startdate` <= UNIX_TIMESTAMP() AND `semester_id` = ?", [$this->semester_id]); - } - return false; - } } |
