aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/FeedbackRange.php
diff options
context:
space:
mode:
authorPhilipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de>2024-09-24 10:53:31 +0200
committerPhilipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de>2024-09-24 10:53:31 +0200
commit4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch)
tree5c07151ae61276d334e88f6309c30d439a85c12e /lib/classes/FeedbackRange.php
parentda0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff)
parent97a188592c679890a25c37ab78463add76a52ff7 (diff)
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'lib/classes/FeedbackRange.php')
-rw-r--r--lib/classes/FeedbackRange.php55
1 files changed, 55 insertions, 0 deletions
diff --git a/lib/classes/FeedbackRange.php b/lib/classes/FeedbackRange.php
new file mode 100644
index 0000000..863c197
--- /dev/null
+++ b/lib/classes/FeedbackRange.php
@@ -0,0 +1,55 @@
+<?php
+
+/**
+ * Interface FeedbackRange
+ *
+ * The FeedbackRange defines methods for range objects
+ * that can reveive feedback.
+ *
+ * @author Nils Gehrke <nils.gehrke@uni-goettingen.de>
+ */
+
+interface FeedbackRange
+{
+ /**
+ * Returns the ID of this range.
+ *
+ * @return string|integer The ID of the range.
+ */
+ public function getId();
+
+ /**
+ * Returns a human-friendly representation of the FeedbackRange object instance's name.
+ *
+ * @return string A human-friendly name for the FeedbackRange object instance.
+ */
+ public function getRangeName();
+
+ /**
+ * Returns the icon object that shall be used with the FeedbackRange object instance.
+ *
+ * @param string $role role of icon
+ * @return Icon icon for the FeedbackRange object instance.
+ */
+ public function getRangeIcon($role);
+
+ /**
+ * Returns the URL of FeedbackRange view, where the object instance is visible
+ * together with the related feedback element(s).
+ * @return string Path that is usable with the url_for and link_for methods.
+ */
+ public function getRangeUrl();
+
+ /**
+ * Returns the course id of FeedbackRange object instance
+ * @return string course_id
+ */
+ public function getRangeCourseId();
+
+ /**
+ * Returns the accessebility of FeedbackRange object instance for current active user
+ * @param string $user_id optional; use this ID instead of $GLOBALS['user']->id
+ * @return bool range object accessebility
+ */
+ public function isRangeAccessible(string $user_id = null): bool;
+}