private function activity_link($activity, $cm) {

        $o = html_writer::start_tag('h3');
        $o .= html_writer::link(new moodle_url('/mod/'.$activity->itemmodule.'/view.php',
        array('id' => $cm->id)), format_string(($activity->itemname), true, ['context' => context_module::instance($cm->id)]));
        $o .= html_writer::end_tag('h3');
        return $o;
    }