Temporarily disabled content development mode until we can work out how it should work.
parent
c5b32fb621
commit
43d239c6f1
|
@ -1358,26 +1358,25 @@ class H5PCore {
|
||||||
);
|
);
|
||||||
unset($content['libraryId'], $content['libraryName'], $content['libraryEmbedTypes'], $content['libraryFullscreen']);
|
unset($content['libraryId'], $content['libraryName'], $content['libraryEmbedTypes'], $content['libraryFullscreen']);
|
||||||
|
|
||||||
// TODO: Move to filterParameters?
|
// // TODO: Move to filterParameters?
|
||||||
if ($this->development_mode & H5PDevelopment::MODE_CONTENT) {
|
// if ($this->development_mode & H5PDevelopment::MODE_CONTENT) {
|
||||||
// TODO: Remove Drupal specific stuff
|
// // TODO: Remove Drupal specific stuff
|
||||||
$json_content_path = file_create_path(file_directory_path() . '/' . variable_get('h5p_default_path', 'h5p') . '/content/' . $id . '/content.json');
|
// $json_content_path = file_create_path(file_directory_path() . '/' . variable_get('h5p_default_path', 'h5p') . '/content/' . $id . '/content.json');
|
||||||
if (file_exists($json_content_path) === TRUE) {
|
// if (file_exists($json_content_path) === TRUE) {
|
||||||
$json_content = file_get_contents($json_content_path);
|
// $json_content = file_get_contents($json_content_path);
|
||||||
if (json_decode($json_content, TRUE) !== FALSE) {
|
// if (json_decode($json_content, TRUE) !== FALSE) {
|
||||||
drupal_set_message(t('Invalid json in json content'), 'warning');
|
// drupal_set_message(t('Invalid json in json content'), 'warning');
|
||||||
}
|
// }
|
||||||
$content['params'] = $json_content;
|
// $content['params'] = $json_content;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
return $content;
|
return $content;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO: Add support for development modes.
|
* Filter content run parameters, rebuild content dependecy cache and export file.
|
||||||
* TODO: Should we regenerate export here as well?
|
|
||||||
*
|
*
|
||||||
* @param Object $content
|
* @param Object $content
|
||||||
* @return Object NULL on failure.
|
* @return Object NULL on failure.
|
||||||
|
@ -1403,6 +1402,8 @@ class H5PCore {
|
||||||
$this->h5pF->deleteLibraryUsage($content['id']);
|
$this->h5pF->deleteLibraryUsage($content['id']);
|
||||||
$this->h5pF->saveLibraryUsage($content['id'], $dependencies);
|
$this->h5pF->saveLibraryUsage($content['id'], $dependencies);
|
||||||
|
|
||||||
|
// TODO: Create new export if enabled.
|
||||||
|
|
||||||
// Cache.
|
// Cache.
|
||||||
$this->h5pF->cacheSet('parameters', $content['id'], $params);
|
$this->h5pF->cacheSet('parameters', $content['id'], $params);
|
||||||
return $params;
|
return $params;
|
||||||
|
|
Loading…
Reference in New Issue