From: mjollnir_ Date: Mon, 15 Sep 2008 19:39:46 +0000 (+0000) Subject: MDL-16517 - fix regression i introduced in resource mod portfolio implementation X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=759204f88dcefb4a0bb71b0297736001eff96ee9;p=moodle.git MDL-16517 - fix regression i introduced in resource mod portfolio implementation --- diff --git a/mod/resource/lib.php b/mod/resource/lib.php index 14f2b31a1c..6eb9dee09d 100644 --- a/mod/resource/lib.php +++ b/mod/resource/lib.php @@ -727,7 +727,7 @@ class resource_portfolio_caller extends portfolio_module_caller_base { $this->resourcefile = $CFG->dirroot.'/mod/resource/type/'.$this->cm->type.'/resource.class.php'; require_once($this->resourcefile); $this->resource= new $resourceclass($this->cm->id); - if (!is_callable(array($resource, 'portfolio_prepare_package')) || !is_callable(array($resource, 'portfolio_get_sha1'))) { + if (!is_callable(array($this->resource, 'portfolio_prepare_package')) || !is_callable(array($this->resource, 'portfolio_get_sha1'))) { throw new portfolio_exception('portfolionotimplemented', 'resource', null, $this->cm->type); } $this->supportedformats = array(self::type_to_format($this->cm->type)); @@ -778,8 +778,8 @@ class resource_portfolio_caller extends portfolio_module_caller_base { debugging(get_string('portfolionotimplemented', 'resource')); return false; } - $callersupports = array(self::type_to_format($resource->cm->type)); - if ($resource->cm->type == 'file') { + $callersupports = array(self::type_to_format($resource->resource->type)); + if ($resource->resource->type == 'file') { // $callersupports = array(portfolio_format_from_file($file); } $button = new portfolio_add_button();