Commit 846052ad authored by Doris Tam's avatar Doris Tam Committed by Lisa Seeto
Browse files

Bug 1911822: Added a check for if a collection will be copied as a personal one

Before it checks for evidence views to copy over to a new personal collection

Change-Id: Icb57ef4c51dde1e107bcaea6201fd96ad941f06d
parent b6fae32d
......@@ -403,8 +403,11 @@ class Collection {
);
list($view, $template, $copystatus) = View::create_from_template($values, $v->view, $userid, $checkaccess, $titlefromtemplate, $artefactcopies);
// Check to see if we need to re-map any framework evidence
if (!empty($data->framework) && $userid == $data->owner && count_records('framework_evidence', 'view', $v->view)) {
$evidenceviews[$v->view] = $view->get('id');
// and if a personal collection will be copied as another personal collection (copying to groups/institutions/site porttfolios will have no owner field)
if (!empty($data->owner)) {
if (!empty($data->framework) && $userid == $data->owner && count_records('framework_evidence', 'view', $v->view)) {
$evidenceviews[$v->view] = $view->get('id');
}
}
if (isset($copystatus['quotaexceeded'])) {
$SESSION->clear('messages');
......
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