From bcf615af6cf134c23af6365b614e4ed5b87a2d0f Mon Sep 17 00:00:00 2001 From: Dan Poltawski Date: Tue, 30 Apr 2013 10:16:01 +0100 Subject: [PATCH] MDL-39414 portfolio: don't queue google portfolio exports This is a bit of an ugly way of saying 'I dont support queued exports'. The google plugins need a valid user session in order to export to the google services, thereforce we are forcing the export to be interactive and not queued through cron, as this wont work in the current implmenetation. It's possible we could add offline access to the plugins, but I don't believe it is worth the benefit for the additional complexity. --- portfolio/googledocs/lib.php | 5 +++-- portfolio/picasa/lib.php | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/portfolio/googledocs/lib.php b/portfolio/googledocs/lib.php index a7b87d06a4f..43257228fae 100644 --- a/portfolio/googledocs/lib.php +++ b/portfolio/googledocs/lib.php @@ -44,8 +44,9 @@ class portfolio_plugin_googledocs extends portfolio_plugin_push_base { } public function expected_time($callertime) { - // We trust what the portfolio says. - return $callertime; + // We're forcing this to be run 'interactively' because the plugin + // does not support running in cron. + return PORTFOLIO_TIME_LOW; } public function send_package() { diff --git a/portfolio/picasa/lib.php b/portfolio/picasa/lib.php index fff8760f01b..d760b127d66 100644 --- a/portfolio/picasa/lib.php +++ b/portfolio/picasa/lib.php @@ -44,7 +44,9 @@ class portfolio_plugin_picasa extends portfolio_plugin_push_base { } public function expected_time($callertime) { - return $callertime; + // We're forcing this to be run 'interactively' because the plugin + // does not support running in cron. + return PORTFOLIO_TIME_LOW; } public function send_package() {