Fixed web service not having access to file_save_draft_area_files()
The error occurred when editing an image element on the repositioning page for site wide templates.
This commit is contained in:
parent
e341d28853
commit
9fd128d5e1
1 changed files with 3 additions and 0 deletions
|
@ -84,7 +84,10 @@ class certificate {
|
||||||
* @param int $contextid the context we are storing this image in
|
* @param int $contextid the context we are storing this image in
|
||||||
*/
|
*/
|
||||||
public static function upload_imagefiles($draftitemid, $contextid) {
|
public static function upload_imagefiles($draftitemid, $contextid) {
|
||||||
|
global $CFG;
|
||||||
|
|
||||||
// Save the file if it exists that is currently in the draft area.
|
// Save the file if it exists that is currently in the draft area.
|
||||||
|
require_once($CFG->dirroot . '/lib/filelib.php');
|
||||||
file_save_draft_area_files($draftitemid, $contextid, 'mod_customcert', 'image', 0);
|
file_save_draft_area_files($draftitemid, $contextid, 'mod_customcert', 'image', 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue