Moodle APIs
3.8
Moodle 3.8.6 (Build: 20201109)
|
Files | |
file | access.php |
Book import capability definition. | |
file | import_form.php |
Book import form. | |
file | lib.php |
HTML import lib. | |
file | locallib.php |
HTML import lib. | |
file | provider.php |
Privacy provider implementation for booktool_importhtml. | |
file | version.php |
Book import plugin version info. | |
Namespaces | |
booktool_importhtml\privacy | |
| |
Classes | |
class | booktool_importhtml\privacy\provider |
Privacy provider implementation for booktool_importhtml. More... | |
class | booktool_importhtml_form |
Functions | |
booktool_importhtml_extend_settings_navigation (settings_navigation $settings, navigation_node $node) | |
Adds module specific settings to the settings block. More... | |
toolbook_importhtml_fix_encoding ($html) | |
Convert some html content to utf8, getting original encoding from html headers. More... | |
toolbook_importhtml_fix_path ($path) | |
Normalize paths to be absolute. More... | |
toolbook_importhtml_get_chapter_files ($package, $type) | |
Returns all the html files (chapters) from a file package. More... | |
toolbook_importhtml_import_chapters ($package, $type, $book, $context, $verbose=true) | |
Import HTML pages packaged into one zip archive. More... | |
toolbook_importhtml_parse_body ($html) | |
Extract the body from any html contents. More... | |
toolbook_importhtml_parse_headings ($html) | |
Parse the headings of the imported package of type 'typeonefile' (currently unsupported) More... | |
toolbook_importhtml_parse_styles ($html) | |
Parse the links to external css sheets of the imported html content. More... | |
toolbook_importhtml_parse_title ($html, $default) | |
Extract the title of any html content, getting it from the title tag. More... | |
Variables | |
$capabilities | |
$plugin | component = 'booktool_importhtml' |
$plugin | requires = 2019111200 |
$plugin | version = 2019111800 |
booktool_importhtml_extend_settings_navigation | ( | settings_navigation | $settings, |
navigation_node | $node | ||
) |
Adds module specific settings to the settings block.
settings_navigation | $settings | The settings navigation object |
navigation_node | $node | The node to add module settings to |
toolbook_importhtml_fix_encoding | ( | $html | ) |
Convert some html content to utf8, getting original encoding from html headers.
string | $html | html content to convert |
string | html content converted to utf8 |
toolbook_importhtml_fix_path | ( | $path | ) |
Normalize paths to be absolute.
string | $path | original path with MS/relative separators |
string | the normalized and cleaned absolute path |
toolbook_importhtml_get_chapter_files | ( | $package, | |
$type | |||
) |
Returns all the html files (chapters) from a file package.
stored_file | $package | file to be processed |
string | $type | type of the package ('typezipdirs' or 'typezipfiles') |
array | the html files found in the package |
toolbook_importhtml_import_chapters | ( | $package, | |
$type, | |||
$book, | |||
$context, | |||
$verbose = true |
|||
) |
Import HTML pages packaged into one zip archive.
stored_file | $package | |
string | $type | type of the package ('typezipdirs' or 'typezipfiles') |
stdClass | $book | |
context_module | $context | |
bool | $verbose |
toolbook_importhtml_parse_body | ( | $html | ) |
Extract the body from any html contents.
string | $html | the html to parse |
string | the contents of the body |
toolbook_importhtml_parse_headings | ( | $html | ) |
Parse the headings of the imported package of type 'typeonefile' (currently unsupported)
string | $html | html content to parse |
toolbook_importhtml_parse_styles | ( | $html | ) |
Parse the links to external css sheets of the imported html content.
string | $html | html content to parse |
string | all the links to external css sheets |
toolbook_importhtml_parse_title | ( | $html, | |
$default | |||
) |
Extract the title of any html content, getting it from the title tag.
string | $html | the html to parse |
string | $default | default title to apply if no title is found |
string | the resulting title |
$capabilities |