function organizer_display_form(moodleform $mform, $title, $addcalendar = true) { global $OUTPUT; if ($addcalendar) { organizer_add_calendar(); } echo $OUTPUT->header(); echo $OUTPUT->heading($title); echo $OUTPUT->box_start('', 'organizer_main_cointainer'); $mform->display(); echo $OUTPUT->box_end(); echo $OUTPUT->footer(); die; }
require_once dirname(__FILE__) . '/lib.php'; require_once dirname(__FILE__) . '/view_lib.php'; require_once dirname(__FILE__) . '/locallib.php'; //------------------------------------------------------------------------------ $instance = organizer_get_course_module_data_new(); require_login($instance->course, false, $instance->cm); $params = organizer_load_params($instance); $url = organizer_create_url($params); $logurl = 'view.php?id=' . $params['id'] . '&mode=' . $params['mode']; $PAGE->set_url($url); $PAGE->set_title($instance->organizer->name); $PAGE->set_heading($instance->course->shortname); //----------------------------- OUTPUT ----------------------------------------- $jsmodule = array('name' => 'mod_organizer', 'fullpath' => '/mod/organizer/module.js', 'requires' => array('node', 'event', 'node-screen', 'panel', 'node-event-delegate'), 'strings' => array(array('teachercomment_title', 'organizer'), array('studentcomment_title', 'organizer'), array('teacherfeedback_title', 'organizer'), array('infobox_showlegend', 'organizer'), array('infobox_hidelegend', 'organizer'))); $PAGE->requires->js_module($jsmodule); organizer_add_calendar(); echo $OUTPUT->header(); $popups = array(); echo $OUTPUT->box_start('', 'organizer_main_cointainer'); switch ($params['mode']) { case ORGANIZER_TAB_APPOINTMENTS_VIEW: if (has_capability('mod/organizer:viewallslots', $instance->context)) { $event = \mod_organizer\event\slot_viewed::create(array('objectid' => $PAGE->cm->id, 'context' => $PAGE->context)); $event->trigger(); echo organizer_generate_appointments_view($params, $instance, $popups); } else { print_error('You do not have the permission to view this page!'); } break; case ORGANIZER_TAB_STUDENT_VIEW: if (has_capability('mod/organizer:viewstudentview', $instance->context)) {