aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMurtaza Sultani <sultani@data-quest.de>2026-01-27 13:52:30 +0100
committerMurtaza Sultani <sultani@data-quest.de>2026-03-19 17:36:05 +0100
commit7420c3ffa65f39e2e1c19de3de3cc17f6b65c8d5 (patch)
tree2308a1f3f31b7136ac761abedd109f7cde99317a /lib
parent8eae6da6ebe7a2f201b956235854bfcaec361037 (diff)
Remove unused imports
Diffstat (limited to 'lib')
-rw-r--r--lib/models/Course.php2
-rw-r--r--lib/models/Lti/ResourceLink.php49
2 files changed, 1 insertions, 50 deletions
diff --git a/lib/models/Course.php b/lib/models/Course.php
index 6fe5d47..880b790 100644
--- a/lib/models/Course.php
+++ b/lib/models/Course.php
@@ -2700,7 +2700,7 @@ class Course extends SimpleORMap implements Range, PrivacyObject, StudipItem, Fe
$this->id,
[
...$properties,
- 'url' => Urlhelper::getLink('dispatch.php/enroll/lti/launch'),
+ 'url' => URLHelper::getLink('dispatch.php/enroll/lti/launch'),
'title' => $this->getFullName(),
'text' => $this->beschreibung,
'icon' => $this->getItemAvatarURL(),
diff --git a/lib/models/Lti/ResourceLink.php b/lib/models/Lti/ResourceLink.php
index e687651..549a7b6 100644
--- a/lib/models/Lti/ResourceLink.php
+++ b/lib/models/Lti/ResourceLink.php
@@ -124,55 +124,6 @@ class ResourceLink extends SimpleORMap
return new ResourceLinkRepository($this);
}
- public function toLti1p3aResourceLink(string $registrationName): LtiResourceLink
- {
- $coursePublication = Publication::firstOrCreate(
- [
- 'range_id' => $this->id
- ],
- [
- 'name' => sprintf(_('Erstellt durch LTI-DeepLinking für: %s'), $registrationName),
- 'version' => '1.3a',
- 'status' => PublicationStatus::Active->value,
- 'publication_key' => Uuid::uuid4()->toString(),
- 'user_id' => User::findCurrent()->id
- ]
- );
-
- $properties = [];
-
- $semester = $this->getCourseSemester();
- if($semester) {
- $properties['available'] = [
- 'startDateTime' => date('c', $semester?->beginn),
- 'endDateTime' => date('c', $semester?->end)
- ];
- }
-
- if (true) {
- $properties['lineItem'] = [
- 'label' => 'Quiz 1',
- 'scoreMaximum' => 100,
- 'resourceId' => 'quiz-1',
- 'tag' => 'quiz'
- ];
- }
-
- return new LtiResourceLink(
- $this->id,
- [
- ...$properties,
- 'url' => $this->getLaunchURL(),
- 'title' => $this->get(),
- 'text' => $this->beschreibung,
- 'icon' => $this->getItemAvatarURL(),
- 'custom' => [
- 'id' => $coursePublication->publication_key
- ]
- ]
- );
- }
-
public function getRegistration(): Registration
{
return $this->deployment->registration;