Commit 57173d77 authored by Son Nguyen's avatar Son Nguyen Committed by Robert Lyon
Browse files

Update the block configdata for attachments. Bug 1439194



Change-Id: I45bdbbaeedf2e6bced74da0a8d7eebed753d4595
Signed-off-by: default avatarSon Nguyen <son.nguyen@catalyst.net.nz>
parent d12b6cc8
......@@ -322,6 +322,16 @@ EOF;
$manageurl .= '?institution=' . $institution;
}
// Update the attached files in block configdata as
// it may change when attached files have been deleted
$attachmentids = isset($artefact) ? $artefact->attachment_id_list() : false;
if ($attachmentids !== false
&& $configdata['artefactids'] != $attachmentids) {
$configdata['artefactids'] = $attachmentids;
$instance->set('configdata', $configdata);
$instance->commit();
}
$elements = array(
// Add a message whenever this text appears in some other block
'otherblocksmsg' => array(
......
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