Ejemplo n.º 1
0
    echo html_writer::tag('div', '', array('class' => 'clearer'));
}
$PAGE->url->param('tab', $SESSION->mod_grouptool->currenttab);
$tab = $SESSION->mod_grouptool->currenttab;
// Shortcut!
/* TRIGGER THE VIEW EVENT */
$event = \mod_grouptool\event\course_module_viewed::create(array('objectid' => $cm->instance, 'context' => context_module::instance($cm->id), 'other' => array('tab' => $tab, 'name' => $instance->get_name())));
$event->add_record_snapshot('course', $course);
// In the next line you can use $PAGE->activityrecord if you have set it, or skip this line if you don't have a record.
$event->add_record_snapshot($PAGE->cm->modname, $grouptool);
$event->trigger();
/* END OF VIEW EVENT */
switch ($tab) {
    case 'administration':
    case 'group_admin':
        $instance->view_administration();
        break;
    case 'group_creation':
        $instance->view_creation();
        break;
    case 'grading':
        $instance->view_grading();
        break;
    case 'selfregistration':
        $instance->view_selfregistration();
        break;
    case 'import':
        $instance->view_import();
        break;
    case 'overview':
        $instance->view_overview();