diff options
| author | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2024-09-27 11:50:34 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2024-09-27 11:50:34 +0000 |
| commit | 5f78b312c8ad82f91148d6bfe79c614651736161 (patch) | |
| tree | 43b1092303c8fd99a1cf1c1493da567bf8119eed /lib/models/Courseware | |
| parent | 48ea0fdedeaa4b75e113a521d63682fed3881c4e (diff) | |
fix errors found through static code analysis, fixes #4562
Closes #4562
Merge request studip/studip!3375
Diffstat (limited to 'lib/models/Courseware')
| -rw-r--r-- | lib/models/Courseware/StructuralElement.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/models/Courseware/StructuralElement.php b/lib/models/Courseware/StructuralElement.php index 9b68ea2..e72cc4f 100644 --- a/lib/models/Courseware/StructuralElement.php +++ b/lib/models/Courseware/StructuralElement.php @@ -184,7 +184,7 @@ class StructuralElement extends \SimpleORMap implements \PrivacyObject, \Feedbac $this->image_id = $image->getId(); $this->image_type = \StockImage::class; } else { - throw \BadMethodCallException('Invalid argument to method ' . __METHOD__); + throw new \BadMethodCallException('Invalid argument to method ' . __METHOD__); } } @@ -1219,7 +1219,7 @@ SQL; if ($this->range_type === 'user') { return 'contents/courseware/courseware/' . $unit->id . '#/structural_element/' . $this->id; } - + return 'course/courseware/courseware/' . $unit->id . '?cid=' . $this->range_id . '#/structural_element/' . $this->id; } |
