Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

Steps definitions for the upload repository type.

Copyright: 2013 David MonllaĆ³
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 221 lines (10 kb)
Included or required: 1 time
Referenced: 0 times
Includes or requires: 1 file
 lib/behat/core_behat_file_helper.php

Defines 1 class


Class: behat_repository_upload  - X-Ref

Steps definitions to deal with the upload repository.

i_upload_file_to_filemanager($filepath, $filemanagerelement)   X-Ref
Uploads a file to the specified filemanager leaving other fields in upload form default. The paths should be relative to moodle codebase.

param: string $filepath
param: string $filemanagerelement

i_upload_and_overwrite_file_to_filemanager($filepath, $filemanagerelement)   X-Ref
Uploads a file to the specified filemanager leaving other fields in upload form default and confirms to overwrite an existing file. The paths should be relative to moodle codebase.

param: string $filepath
param: string $filemanagerelement

i_upload_file_to_filemanager_as($filepath, $filemanagerelement, TableNode $data)   X-Ref
Uploads a file to the specified filemanager and confirms to overwrite an existing file. The paths should be relative to moodle codebase.

param: string $filepath
param: string $filemanagerelement
param: TableNode $data Data to fill in upload form

i_upload_and_overwrite_file_to_filemanager_as($filepath, $filemanagerelement, TableNode $data)   X-Ref
Uploads a file to the specified filemanager. The paths should be relative to moodle codebase.

param: string $filepath
param: string $filemanagerelement
param: TableNode $data Data to fill in upload form

upload_file_to_filemanager($filepath, $filemanagerelement, TableNode $data, $overwriteaction = false)   X-Ref
Uploads a file to filemanager

param: string $filepath Normally a path relative to $CFG->dirroot, but can be an absolute path too.
param: string $filemanagerelement
param: TableNode $data Data to fill in upload form
param: false|string $overwriteaction false if we don't expect that file with the same name already exists,

get_filepicker_node($filepickerelement)   X-Ref
Try to get the filemanager node specified by the element

param: string $filepickerelement
return: \Behat\Mink\Element\NodeElement