aboutsummaryrefslogtreecommitdiff
path: root/lib/models/Courseware/Instance.php
diff options
context:
space:
mode:
authorRon Lucke <lucke@elan-ev.de>2024-01-10 14:20:49 +0000
committerRon Lucke <lucke@elan-ev.de>2024-01-10 14:20:49 +0000
commit7293abbad9c1a149cfffd99c9ab5060fe945b773 (patch)
tree6e80b665c4cda71829570e6f0925f4d876e25fde /lib/models/Courseware/Instance.php
parent874bd358f5ecc2e148a6ad36bcf155fe738c107a (diff)
StEP #2472
Merge request studip/studip!2296
Diffstat (limited to 'lib/models/Courseware/Instance.php')
-rw-r--r--lib/models/Courseware/Instance.php45
1 files changed, 45 insertions, 0 deletions
diff --git a/lib/models/Courseware/Instance.php b/lib/models/Courseware/Instance.php
index 1084ed5..5f6c343 100644
--- a/lib/models/Courseware/Instance.php
+++ b/lib/models/Courseware/Instance.php
@@ -174,6 +174,14 @@ class Instance
\UserConfig::get($user->id)->store('COURSEWARE_FAVORITE_BLOCK_TYPES', $favorites);
}
+
+
+ /*
+ *
+ * GENERAL SETTINGS
+ *
+ */
+
/**
* Returns which layout is set for root node of this coursware instance
*
@@ -287,6 +295,43 @@ class Instance
}
+ /*
+ *
+ * FEEDBACK
+ *
+ */
+
+ public function getShowFeedbackPopup(): bool
+ {
+ $showFeedbackPopup = $this->unit->config['show_feedback_popup'] ?? false;
+
+ return (bool) $showFeedbackPopup;
+ }
+
+ public function setShowFeedbackPopup(bool $showFeedbackPopup): void
+ {
+ $this->unit->config['show_feedback_popup'] = $showFeedbackPopup ? 1 : 0;
+ }
+
+ public function getShowFeedbackInContentbar(): bool
+ {
+ $showFeedbackInContentbar = $this->unit->config['show_feedback__in_contentbar'] ?? false;
+
+ return (bool) $showFeedbackInContentbar;
+ }
+
+ public function setShowFeedbackInContentbar(bool $showFeedbackInContentbar): void
+ {
+ $this->unit->config['show_feedback__in_contentbar'] = $showFeedbackInContentbar ? 1 : 0;
+ }
+
+ /*
+ *
+ * CERTIFICATE
+ *
+ */
+
+
/**
* Returns the certificate creation settings.
*