protected function structural_change($change) {
        $cm = $change['module'];
        switch ($change['action']) {
            case 'delete mod':
                $text = get_string('deletedactivity', 'moodle', $cm->modfullname);
                break;
            case 'add mod':
                $text = get_string('added', 'moodle', $cm->modfullname). '<br />'.
                    html_writer::link($cm->url, format_string($cm->name, true));
                break;
            case 'update mod':
                $text = get_string('updated', 'moodle', $cm->modfullname). '<br />'.
                    html_writer::link($cm->url, format_string($cm->name, true));
                break;
            default:
                return '';
        }
        return html_writer::tag('p', $text, array('class' => 'activity'));
    }