From d5d9b239892e0e9abf3a21ab7526a7a0320daa9b Mon Sep 17 00:00:00 2001 From: mjollnir_ Date: Wed, 10 Sep 2008 12:49:14 +0000 Subject: [PATCH] MDL-14591 - add get_base_file_url for pull portfolio plugins to use --- lib/portfolio/plugin.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/portfolio/plugin.php b/lib/portfolio/plugin.php index 154eaf7588..1d2e1fc151 100644 --- a/lib/portfolio/plugin.php +++ b/lib/portfolio/plugin.php @@ -722,6 +722,17 @@ abstract class portfolio_plugin_pull_base extends portfolio_plugin_base { return false; } + /** + * the base part of the download file url to pull files from + * your plugin might need to add &foo=bar on the end + * {@see verify_file_request_params} + * + * @return string the url + */ + public function get_base_file_url() { + global $CFG; + return $CFG->wwwroot . '/portfolio/file.php?id=' . $this->exporter->get('id'); + } /** * before sending the file when the pull is requested, verify the request parameters -- 2.39.5