Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is 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