From 043688ed0eb071dfc54ea44093c46fa3f02f8bbd Mon Sep 17 00:00:00 2001
From: Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de>
Date: Fri, 16 Dec 2022 12:30:50 +0100
Subject: [PATCH] display all settings when creating new assignment, fixes #176

---
 views/sheets/edit_assignment.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/views/sheets/edit_assignment.php b/views/sheets/edit_assignment.php
index 0994c59..9cb78c4 100644
--- a/views/sheets/edit_assignment.php
+++ b/views/sheets/edit_assignment.php
@@ -61,7 +61,7 @@
             <input type="number" name="exam_length" value="<?= htmlReady($assignment->options['duration']) ?>" <?= $disabled ?> data-secure required>
         </label>
 
-        <input id="options-toggle" type="checkbox" value="on">
+        <input id="options-toggle" type="checkbox" value="on" <?= $assignment_id ? '' : 'checked' ?>>
         <label class="caption" for="options-toggle">
             <?= Icon::create('arr_1down', 'clickable', ['class' => 'toggle-open']) ?>
             <?= Icon::create('arr_1right', 'clickable', ['class' => 'toggle-closed']) ?>
-- 
GitLab