Commit 1adfbdc6 authored by Robert Lyon's avatar Robert Lyon
Browse files

Bug 1623282: property of non-object error for old annotations



When the old annotations have feedback on them

behatnotneeded

Change-Id: I1325ebf9d3067065730442b81c885d5b7178c777
Signed-off-by: default avatarRobert Lyon <robertl@catalyst.net.nz>
parent 83a2deee
Loading
Loading
Loading
Loading
+20 −17
Original line number Diff line number Diff line
@@ -1275,6 +1275,8 @@ class ArtefactTypeAnnotationfeedback extends ArtefactType {
                    safe_require('module', 'framework');

                    $evidence = get_record('framework_evidence', 'annotation', $metadata->block);
                    if (!empty($evidence)) {
                        // we are dealing with an annotation added since smartevidence was added
                        $defaultval = $evidence->state;

                        if ($options = Framework::get_my_assessment_options_for_user($view->get('owner'), $evidence->framework)) {
@@ -1297,6 +1299,7 @@ class ArtefactTypeAnnotationfeedback extends ArtefactType {
                    }
                }
            }
        }

        $form['elements']['ispublic'] = array(
            'type'  => 'switchbox',