Problems with copying a SmartEvidence collection with annotations

Bug #1629144 reported by Kristina Hoeppner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
High
Robert Lyon

Bug Description

Mahara 16.10dev

1. Set up a SmartEvidence collection.
2. Put a couple of annotations on the page.
3. Add a couple of feedbacks to the annotations.
4. Copy the collection in the same user account.
5. Open a page that has an annotation.

I get the following error message multiple times:

[WAR] 5f (artefact/annotation/lib.php:1294) Trying to get property of non-object
Call stack (most recent first):

    log_message("Trying to get property of non-object", 8, true, true, "/home/kristina/code/1610stable/htdocs/artefact/ann...", 1294) at /home/kristina/code/1610stable/htdocs/lib/errors.php:513
    error(8, "Trying to get property of non-object", "/home/kristina/code/1610stable/htdocs/artefact/ann...", 1294, array(size 13)) at /home/kristina/code/1610stable/htdocs/artefact/annotation/lib.php:1294
    ArtefactTypeAnnotationfeedback::add_annotation_feedback_form(object(ArtefactTypeAnnotation), object(View), null, "1061", false, "0") at /home/kristina/code/1610stable/htdocs/artefact/annotation/lib.php:1132
    ArtefactTypeAnnotationfeedback::get_annotation_feedback_for_view(object(ArtefactTypeAnnotation), object(View), "1061", true, false) at /home/kristina/code/1610stable/htdocs/artefact/annotation/blocktype/annotation/lib.php:134
    PluginBlocktypeAnnotation::render_instance(object(BlockInstance)) at Unknown:0
    call_user_func_array(array(size 2), array(size 1)) at /home/kristina/code/1610stable/htdocs/lib/mahara.php:1730
    call_static_method("PluginBlocktypeAnnotation", "render_instance", object(BlockInstance)) at /home/kristina/code/1610stable/htdocs/blocktype/lib.php:1007
    BlockInstance->render_viewing(false) at /home/kristina/code/1610stable/htdocs/lib/view.php:2037
    View->build_column(1, 1, false, false) at /home/kristina/code/1610stable/htdocs/lib/view.php:1991
    View->build_columns(1, false, false) at /home/kristina/code/1610stable/htdocs/lib/view.php:1976
    View->build_rows() at /home/kristina/code/1610stable/htdocs/view/view.php:281

----

If possible, the annotations should be linked to the map in the copied collection. Currently, the annotations display on the page, but their status doesn't shop up on the smartEvidence overview page.

Revision history for this message
Kristina Hoeppner (kris-hoeppner) wrote :

Bug #1629147 might be related

Revision history for this message
Robert Lyon (robertl-9) wrote :

The error messages have been fixed by https://reviews.mahara.org/#/c/6976/1 as we now check that an annotation has evidence before trying to ascertain the evidence's state.

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/7057

Revision history for this message
Mahara Bot (dev-mahara) wrote :

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

Revision history for this message
Robert Lyon (robertl-9) wrote :

Currently when one copies their own collection that contains a SE framework it copies the blocks on the page but refers them to the the same artefact as before.

So if they update the annotation on the new collection's page it updates the text in both places (like a notes block)

This is not what we want.

What we want is:

1) copying a collection with smart evidence it makes a copy of the annotation artefacts
2) but does not make a copy of the annotationfeedback artefacts
3) If the user is copying the collection to themselves they get a copy of the framework_evidence rows matching the new view/artefact/block values but no assessment/review set

summary: - Error message when copying a SmartEvidence collection with annotations
+ Problems with copying a SmartEvidence collection with annotations
Changed in mahara:
status: Confirmed → In Progress
Robert Lyon (robertl-9)
Changed in mahara:
assignee: nobody → Robert Lyon (robertl-9)
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7057
Committed: https://git.mahara.org/mahara/mahara/commit/a9360f18ba59ba48358add888cf83a036556f076
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit a9360f18ba59ba48358add888cf83a036556f076
Author: Robert Lyon <email address hidden>
Date: Mon Oct 3 11:01:42 2016 +1300

Bug 1629144: Allow self copying of an annotation to duplicate artefact

Because unlike image/note blocks where we want the blocks to reference
the same underlying artefact here we want to create a new artefact
otherwise updating the block on one page will update the artefact for
all the related blocks.

To do this we need to add a new copytype called 'fullinclself' that
means make a full copy of blockinstance including when doing a self copy

Also we need to allow for the self copying to ignore the
annotationfeedback artefact type as we dont' want to copt the feedback.

behatnotneeded

Change-Id: Icc9e375e3180ff3f25d84ba9695926d5b24bb17d
Signed-off-by: Robert Lyon <email address hidden>

Revision history for this message
Mahara Bot (dev-mahara) wrote :

Reviewed: https://reviews.mahara.org/7059
Committed: https://git.mahara.org/mahara/mahara/commit/4254e377519daed79148b4c39c35e0adb17bbfc1
Submitter: Aaron Wells (<email address hidden>)
Branch: master

commit 4254e377519daed79148b4c39c35e0adb17bbfc1
Author: Robert Lyon <email address hidden>
Date: Mon Oct 3 14:40:47 2016 +1300

Bug 1629144: Allow copying of the framework evidence

If the user copying the collection is also the owner

Copies the annotation block's evidence mapping
but not the assessment/feedback.

behatnotneeded

Change-Id: I0b587889912f18f39035eb200cbe76a7cc7ae893
Signed-off-by: Robert Lyon <email address hidden>

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

Patch for "16.10_STABLE" branch: https://reviews.mahara.org/7153

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7153
Committed: https://git.mahara.org/mahara/mahara/commit/1f5eb705557c6d8217be8e927464efc4a53baca3
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.10_STABLE

commit 1f5eb705557c6d8217be8e927464efc4a53baca3
Author: Robert Lyon <email address hidden>
Date: Mon Oct 3 11:01:42 2016 +1300

Bug 1629144: Allow self copying of an annotation to duplicate artefact

Because unlike image/note blocks where we want the blocks to reference
the same underlying artefact here we want to create a new artefact
otherwise updating the block on one page will update the artefact for
all the related blocks.

To do this we need to add a new copytype called 'fullinclself' that
means make a full copy of blockinstance including when doing a self copy

Also we need to allow for the self copying to ignore the
annotationfeedback artefact type as we dont' want to copt the feedback.

behatnotneeded

Change-Id: Icc9e375e3180ff3f25d84ba9695926d5b24bb17d
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit a9360f18ba59ba48358add888cf83a036556f076)

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

Patch for "16.10_STABLE" branch: https://reviews.mahara.org/7154

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/7154
Committed: https://git.mahara.org/mahara/mahara/commit/f4ac2cfa718fac310cd262a45f43ea04d6d1a085
Submitter: Robert Lyon (<email address hidden>)
Branch: 16.10_STABLE

commit f4ac2cfa718fac310cd262a45f43ea04d6d1a085
Author: Robert Lyon <email address hidden>
Date: Mon Oct 3 14:40:47 2016 +1300

Bug 1629144: Allow copying of the framework evidence

If the user copying the collection is also the owner

Copies the annotation block's evidence mapping
but not the assessment/feedback.

behatnotneeded

Change-Id: I0b587889912f18f39035eb200cbe76a7cc7ae893
Signed-off-by: Robert Lyon <email address hidden>
(cherry picked from commit 4254e377519daed79148b4c39c35e0adb17bbfc1)

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
tags: added: usermanualupdate
Robert Lyon (robertl-9)
Changed in mahara:
status: Fix Committed → Fix Released
tags: removed: usermanualupdate
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.