mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 17:06:53 +02:00
MDL-15758 - fixing bugs I introduced in a refactor in assignment
This commit is contained in:
parent
cbe8184c52
commit
76bc2cfffa
1 changed files with 2 additions and 2 deletions
|
@ -3129,14 +3129,14 @@ class assignment_portfolio_caller extends portfolio_module_caller_base {
|
|||
print_error('invalidcoursemodule');
|
||||
}
|
||||
|
||||
if (! $assignment = $DB->get_record("assignment", array("id"=>$cm->instance))) {
|
||||
if (! $assignment = $DB->get_record("assignment", array("id"=>$this->cm->instance))) {
|
||||
print_error('invalidid', 'assignment');
|
||||
}
|
||||
|
||||
$this->assignmentfile = $CFG->dirroot . '/mod/assignment/type/' . $assignment->assignmenttype . '/assignment.class.php';
|
||||
require_once($this->assignmentfile);
|
||||
$assignmentclass = "assignment_$assignment->assignmenttype";
|
||||
$this->assignment= new $assignmentclass($cm->id, $assignment, $cm);
|
||||
$this->assignment= new $assignmentclass($this->cm->id, $assignment, $this->cm);
|
||||
if (!$this->assignment->portfolio_exportable()) {
|
||||
print_error('notexportable', 'portfolio', $this->get_return_url());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue