mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Portfolio: MDL-20884 - make assignment portfolio implementation use paths relative to dirroot
This commit is contained in:
parent
6f5099eab4
commit
b07e1666c0
@ -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));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user