Skip to content
Snippets Groups Projects
Commit 2bad70d2 authored by Frode Petterson's avatar Frode Petterson
Browse files

Fix coding error

parent 2787a45d
Branches
No related tags found
No related merge requests found
...@@ -370,8 +370,7 @@ class mod_hvp_mod_form extends moodleform_mod { ...@@ -370,8 +370,7 @@ class mod_hvp_mod_form extends moodleform_mod {
// Fix for legacy content upload to work. // Fix for legacy content upload to work.
// Fetch title from h5p.json or use a default string if not available. // Fetch title from h5p.json or use a default string if not available.
$h5pvalidator = \mod_hvp\framework::instance('validator'); $h5pvalidator = \mod_hvp\framework::instance('validator');
$data->metadata->title = empty($h5pvalidator->h5pC->mainJsonData['title']) ? $data->metadata->title = empty($h5pvalidator->h5pC->mainJsonData['title']) ? 'Uploaded Content' : $h5pvalidator->h5pC->mainJsonData['title'];
'Uploaded Content' : $h5pvalidator->h5pC->mainJsonData['title'];
} }
$data->name = $data->metadata->title; // Sort of a hack, $data->name = $data->metadata->title; // Sort of a hack,
// but there is no JavaScript that sets the value when there is no editor... // but there is no JavaScript that sets the value when there is no editor...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment