Skip to content

Commit

Permalink
ContentLibrarySeeder fix (#171)
Browse files Browse the repository at this point in the history
* ContentLibrarySeeder fix

* title fix

Co-authored-by: Tomasz Smolarek <tomasz.smolarek@escolasoft.com>
  • Loading branch information
dyfero and dyfero authored Sep 17, 2022
1 parent 65111a3 commit 9d7d787
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions database/seeders/ContentLibrarySeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ private function downloadAndSeed($lib, $addContent = false)
$h5p_upgrade_only = false;

if ($this->hh5pService->getValidator()->isValidPackage($skipContent, $h5p_upgrade_only)) {
$content['title'] = $lib;
$this->hh5pService->getRepository()->setMainData($this->hh5pService->getCore()->mainJsonData);
$this->hh5pService->getStorage()->savePackage($content, null, $skipContent);
} else {
echo "Invalid package $filename \n";
Expand All @@ -64,8 +64,6 @@ public function run(HeadlessH5PServiceContract $hh5pService)

$this->hh5pService = $hh5pService;
$libs = [
// TODO this is not working (after removing title attributes from model
/*
"example-content-arts-of-europe-443085.h5p",
"advanced-blanks-example-1-503253.h5p",
"course-presentation-21-21180.h5p",
Expand Down Expand Up @@ -113,7 +111,6 @@ public function run(HeadlessH5PServiceContract $hh5pService)
"agamotto-80158.h5p",
"advent-blue-snowman-1075566.h5p",
"accordion-6-7138.h5p"
*/
];

foreach ($libs as $lib) {
Expand Down

0 comments on commit 9d7d787

Please sign in to comment.