Moodle APIs 4.3
Moodle 4.3.6 (Build: 20240812)

Functions

 block_html_get_path_from_pluginfile (string $filearea, array $args)
 Given an array with a file path, it returns the itemid and the filepath for the defined filearea.
 
 block_html_global_db_replace ($search, $replace)
 Perform global search replace such as when migrating site to new URL.
 
 block_html_pluginfile ($course, $birecord_or_cm, $context, $filearea, $args, $forcedownload, array $options=array())
 Form for editing HTML block instances.
 

Detailed Description

Function Documentation

◆ block_html_get_path_from_pluginfile()

block_html_get_path_from_pluginfile ( string $filearea,
array $args )

Given an array with a file path, it returns the itemid and the filepath for the defined filearea.

Parameters
string$fileareaThe filearea.
array$argsThe path (the part after the filearea and before the filename).
Return values
arrayThe itemid and the filepath inside the $args path, for the defined filearea.

◆ block_html_global_db_replace()

block_html_global_db_replace ( $search,
$replace )

Perform global search replace such as when migrating site to new URL.

Parameters
$search
$replace
Return values
void

◆ block_html_pluginfile()

block_html_pluginfile ( $course,
$birecord_or_cm,
$context,
$filearea,
$args,
$forcedownload,
array $options = array() )

Form for editing HTML block instances.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
Parameters
stdClass$coursecourse object
stdClass$birecord_or_cmblock instance record
context$contextcontext object
string$fileareafile area
array$argsextra arguments
bool$forcedownloadwhether or not force download
array$optionsadditional options affecting the file serving
Return values
bool
Todo
MDL-36050 improve capability check on stick blocks, so we can check user capability before sending images.