]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-14591 - add get_base_file_url for pull portfolio plugins to use
authormjollnir_ <mjollnir_>
Wed, 10 Sep 2008 12:49:14 +0000 (12:49 +0000)
committermjollnir_ <mjollnir_>
Wed, 10 Sep 2008 12:49:14 +0000 (12:49 +0000)
lib/portfolio/plugin.php

index 154eaf7588759963c26e27edc4fefc28f46c7d47..1d2e1fc151716a63d3c4f2cc27d7cdc9dd5437bd 100644 (file)
@@ -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