From 318b9f48195af78cfb9e5133c3b7176a289c7d8e Mon Sep 17 00:00:00 2001 From: thomasmars Date: Fri, 3 Mar 2017 10:43:39 +0100 Subject: [PATCH] Restrict LRS dependent content if set HFP-797 --- h5p.classes.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/h5p.classes.php b/h5p.classes.php index e3dc773..8112a5c 100644 --- a/h5p.classes.php +++ b/h5p.classes.php @@ -2907,6 +2907,15 @@ class H5PCore { ); } } + + // Restrict LRS dependent content + if (!$this->h5pF->getOption('enable_lrs_content_types')) { + foreach ($cached_libraries as &$lib) { + if ($lib['machineName'] === 'H5P.Questionnaire') { + $lib['restricted'] = TRUE; + } + } + } } /**