mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-32341 calendar: get_file_by_hash() expects a hash
This commit is contained in:
parent
10ad21dc9a
commit
975b2f7145
1 changed files with 1 additions and 1 deletions
|
@ -54,7 +54,7 @@ function toolbook_importhtml_import_chapters($package, $type, $book, $context, $
|
||||||
}
|
}
|
||||||
if ($type == 0) {
|
if ($type == 0) {
|
||||||
$chapterfile = reset($chapterfiles);
|
$chapterfile = reset($chapterfiles);
|
||||||
if ($file = $fs->get_file_by_hash("$context->id/mod_book/importhtmltemp/0/$chapterfile->pathname")) {
|
if ($file = $fs->get_file_by_hash(sha1("$context->id/mod_book/importhtmltemp/0/$chapterfile->pathname"))) {
|
||||||
$htmlcontent = toolbook_importhtml_fix_encoding($file->get_content());
|
$htmlcontent = toolbook_importhtml_fix_encoding($file->get_content());
|
||||||
$htmlchapters = toolbook_importhtml_parse_headings(toolbook_importhtml_parse_body($htmlcontent));
|
$htmlchapters = toolbook_importhtml_parse_headings(toolbook_importhtml_parse_body($htmlcontent));
|
||||||
// TODO: process h1 as main chapter and h2 as subchapters
|
// TODO: process h1 as main chapter and h2 as subchapters
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue