Copying a portfolio with SmartEvidence into the group/institution/site level throws errors

Bug #1911822 reported by Kristina Hoeppner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Medium
Unassigned

Bug Description

When you created a portfolio with SmartEvidence and want to add that to the group, institution, or site level, you get the following error message:

[WAR] 80 (lib/collection.php:406) Undefined property: stdClass::$owner
Call stack (most recent first):

    log_message("Undefined property: stdClass::$owner", 8, true, true, "/home/kristina/code/mahara/htdocs/lib/collection.p...", 406) at /home/kristina/code/mahara/htdocs/lib/errors.php:515
    error(8, "Undefined property: stdClass::$owner", "/home/kristina/code/mahara/htdocs/lib/collection.p...", 406, array(size 21)) at /home/kristina/code/mahara/htdocs/lib/collection.php:406
    Collection::create_from_template(array(size 5), 1) at /home/kristina/code/mahara/htdocs/lib/view.php:7625
    createview_submit(object(Pieform), array(size 5)) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:568
    Pieform->__construct(array(size 8)) at /home/kristina/code/mahara/htdocs/lib/pieforms/pieform.php:168
    Pieform::process(array(size 8)) at /home/kristina/code/mahara/htdocs/lib/mahara.php:5507
    pieform(array(size 8)) at /home/kristina/code/mahara/htdocs/view/choosetemplate.php:30

Note: Groups cannot yet handle SmartEvidence. Therefore, that page would be ignored during the copying process.

To replicate:

1. Create a collection in a non-site admin account. Make sure it includes SmartEvidence. Note: I saw the problem without adding annotations etc.
2. Make the collection copyable to all registered people.
3. Copy the collection into an institution, the site, or the group.
Expected result: It works.
Actual result: You get the above error message.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "master" branch: https://reviews.mahara.org/11525

Doris Tam (doristam)
Changed in mahara:
status: Confirmed → In Progress
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/11525
Committed: https://git.mahara.org/mahara/mahara/commit/846052adf2cddef2aa93e86203c2c5011d5c3478
Submitter: Lisa Seeto (<email address hidden>)
Branch: master

commit 846052adf2cddef2aa93e86203c2c5011d5c3478
Author: Doris Tam <email address hidden>
Date: Tue Jan 26 12:40:35 2021 +1300

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

Lisa Seeto (lisaseeto)
Changed in mahara:
status: In Progress → Fix Committed
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.