From 56f1a4be3d4a796a4a6ba02d4e05c60f00d7445c Mon Sep 17 00:00:00 2001
From: Rasmus Fuhse <fuhse@data-quest.de>
Date: Fri, 11 Feb 2022 11:07:55 +0000
Subject: [PATCH] Resolve "OER Campus: Datei von Dateibereich aus einbinden"

---
 app/controllers/oer/addfile.php     | 3 +++
 app/views/file/add_files_window.php | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/app/controllers/oer/addfile.php b/app/controllers/oer/addfile.php
index 7cb46c760a4..cc0364a5102 100644
--- a/app/controllers/oer/addfile.php
+++ b/app/controllers/oer/addfile.php
@@ -126,6 +126,9 @@ class Oer_AddfileController extends AuthenticatedController
             //The folder is not a top folder. We can use its name directly.
             $this->to_folder_name = $this->to_folder_type->name;
         }
+        if (Request::isAjax()) {
+            $this->response->add_header('X-Dialog-Execute', 'STUDIP.OER.initSearch');
+        }
     }
 
     /**
diff --git a/app/views/file/add_files_window.php b/app/views/file/add_files_window.php
index 94ad52052c4..64b2ff90106 100644
--- a/app/views/file/add_files_window.php
+++ b/app/views/file/add_files_window.php
@@ -58,7 +58,7 @@ if ($folder_id) {
             <? endif ?>
             <? if (Config::get()->OERCAMPUS_ENABLED && $GLOBALS['perm']->have_perm(Config::get()->OERCAMPUS_PUBLIC_STATUS)) : ?>
                 <a href="<?= $controller->link_for('oer/addfile/choose_file', array_merge($options, ['from_plugin' => ""])) ?>"
-                   data-dialog="height=800">
+                   data-dialog="size=800x800">
                     <?= Icon::create('oer-campus')->asImg(50) ?>
                     <?= htmlReady(Config::get()->OER_TITLE) ?>
                 </a>
-- 
GitLab