From: Penny Leach Date: Wed, 18 Nov 2009 09:37:33 +0000 (+0000) Subject: Portfolio: MDL-20884 - make assignment portfolio implementation use paths relative... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=b07e1666c0d231bd89dfcf3656355f7ef3698fc1;p=moodle.git Portfolio: MDL-20884 - make assignment portfolio implementation use paths relative to dirroot --- diff --git a/mod/assignment/lib.php b/mod/assignment/lib.php index 82d041eb23..120d8e13aa 100644 --- a/mod/assignment/lib.php +++ b/mod/assignment/lib.php @@ -3379,8 +3379,8 @@ class assignment_portfolio_caller extends portfolio_module_caller_base { throw new portfolio_caller_exception('invalidid', 'assignment'); } - $this->assignmentfile = $CFG->dirroot . '/mod/assignment/type/' . $assignment->assignmenttype . '/assignment.class.php'; - require_once($this->assignmentfile); + $this->assignmentfile = '/mod/assignment/type/' . $assignment->assignmenttype . '/assignment.class.php'; + require_once($CFG->dirroot . $this->assignmentfile); $assignmentclass = "assignment_$assignment->assignmenttype"; $this->assignment = new $assignmentclass($this->cm->id, $assignment, $this->cm); @@ -3428,7 +3428,7 @@ class assignment_portfolio_caller extends portfolio_module_caller_base { if (empty($CFG)) { return true; // too early yet } - require_once($this->assignmentfile); + require_once($CFG->dirroot . $this->assignmentfile); $this->assignment = unserialize(serialize($this->assignment)); }