Commit 22746312 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Check artefacttype when editing plans/tasks (bug #618306)


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 4333791b
......@@ -38,7 +38,7 @@ define('TITLE', get_string('editplan','artefact.plans'));
$id = param_integer('id');
$artefact = artefact_instance_from_id($id);
$artefact = new ArtefactTypePlan($id);
$USER->can_edit_artefact($id);
$editform = ArtefactTypePlan::get_form($artefact);
......
......@@ -37,7 +37,7 @@ safe_require('artefact','plans');
define('TITLE', get_string('edittask','artefact.plans'));
$id = param_integer('id');
$task = artefact_instance_from_id($id);
$task = new ArtefactTypeTask($id);
$USER->can_edit_artefact($task);
$form = ArtefactTypeTask::get_form($task->get('parent'), $task);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment