Skip to content

Commit

Permalink
Merge branch 'MDL-42293-25' of git://github.com/ankitagarwal/moodle i…
Browse files Browse the repository at this point in the history
…nto MOODLE_25_STABLE
  • Loading branch information
danpoltawski committed Oct 24, 2013
2 parents 95fcab4 + a48e539 commit f9b6e96
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions repository/upload/tests/behat/behat_repository_upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ public function i_upload_file_to_filepicker($filepath, $filepickerelement) {
$submit = $this->find_button(get_string('upload', 'repository'));

// Attaching specified file to the node.
// Replace 'admin/' if it is in start of path with $CFG->admin .
$pos = strpos($filepath, 'admin/');
if ($pos === 0) {
$filepath = $CFG->admin . DIRECTORY_SEPARATOR . substr($filepath, 6);
}
$filepath = str_replace('/', DIRECTORY_SEPARATOR, $filepath);
$fileabsolutepath = $CFG->dirroot . DIRECTORY_SEPARATOR . $filepath;
$file->attachFile($fileabsolutepath);
Expand Down

0 comments on commit f9b6e96

Please sign in to comment.