MDL-41473 book: Book html zip import, incorrect url produced for internal linking to other chapters
This commit is contained in:
committed by
Damyon Wiese
parent
56ed66a537
commit
fb97f9a5cf
@@ -138,7 +138,7 @@ function toolbook_importhtml_import_chapters($package, $type, $book, $context, $
|
||||
foreach ($allchapters as $target) {
|
||||
if ($target->importsrc === $chapterpath) {
|
||||
$newcontent = str_replace($match, 'href="'.new moodle_url('/mod/book/view.php',
|
||||
array('id'=>$context->instanceid, 'chapter'=>$target->id)).'"', $newcontent);
|
||||
array('id'=>$context->instanceid, 'chapterid'=>$target->id)).'"', $newcontent);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user