aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/views/admin/courses/evaluation.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/views/admin/courses/evaluation.php b/app/views/admin/courses/evaluation.php
index 255024d..c80143b 100644
--- a/app/views/admin/courses/evaluation.php
+++ b/app/views/admin/courses/evaluation.php
@@ -4,6 +4,15 @@
*/
?>
<label>
+ <?php $message_new = sprintf(_('Veranstaltung %s auswählen'), htmlReady($course->name)) ?>
+ <?php $message_existing = sprintf(_('%s hat im gewählten Semester bereits eine zugewiesene Evaluation'),
+ htmlReady($course->name)) ?>
<input name="evaluation_courses[]" type="checkbox" value="<?= htmlReady($course->id) ?>"
- aria-label="<?= htmlReady(_('Evaluation zuweisen')) ?>">
+ <?= isset($GLOBALS['user']->cfg->MY_COURSES_SELECTED_CYCLE) &&
+ QuestionnaireEvalAssignment::findBySQL('`course_id` = ? AND `semester_id` = ?',
+ [$course->getId(), $GLOBALS['user']->cfg->MY_COURSES_SELECTED_CYCLE]) ?
+ sprintf('disabled title="%s" aria-label="%1$s"', $message_existing)
+ : sprintf('title="%s" aria-label="%1$s"', $message_new)
+ ?>
+ >
</label>