aboutsummaryrefslogtreecommitdiff
path: root/lib/models/OERReview.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2022-05-11 08:30:37 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2022-05-11 08:30:37 +0000
commit5866bdf1497623253096c1e39fb8d853c1438634 (patch)
tree1c29411180742245ddb0974385170d83011181e2 /lib/models/OERReview.php
parent04b5e6ec7ca39031f0c50289fb2892d2dc0934c1 (diff)
unify class definition in relations of simpleormap models, fixes #979
Closes #979 Merge request studip/studip!564
Diffstat (limited to 'lib/models/OERReview.php')
-rwxr-xr-xlib/models/OERReview.php21
1 files changed, 10 insertions, 11 deletions
diff --git a/lib/models/OERReview.php b/lib/models/OERReview.php
index a518923..58a25e4 100755
--- a/lib/models/OERReview.php
+++ b/lib/models/OERReview.php
@@ -2,17 +2,6 @@
class OERReview extends BlubberThread
{
- public static function findByMaterial_id($material_id)
- {
- return self::findBySQL("
- context_type = 'public'
- AND context_id = :material_id
- AND display_class = 'OERReview'
- ", [
- 'material_id' => $material_id
- ]);
- }
-
protected static function configure($config = [])
{
$config['belongs_to']['material'] = [
@@ -30,6 +19,16 @@ class OERReview extends BlubberThread
parent::configure($config);
}
+ public static function findByMaterial_id($material_id)
+ {
+ return self::findBySQL("
+ context_type = 'public'
+ AND context_id = :material_id
+ AND display_class = 'OERReview'
+ ", [
+ 'material_id' => $material_id
+ ]);
+ }
public function afterStoreCallback()
{
if (!$this->material['host_id'] && !$this->material->isMine() && $this->isDirty()) {