echo html_writer::end_tag('div'). html_writer::end_tag('form'); } * */ //print_object($facetoface); $sql="SELECT * FROM {modules} m,{course_modules} cm where m.name='facetoface' and m.id=cm.module"; $activities=$DB->get_records_sql($sql); $id = 1; //foreach($activities as $activity) { // $courseid=$activity->course; // $facetoface=$activity->instance; // $facetoface = $DB->get_record('facetoface', array('id' => $activity->instance)); // print_object($facetoface); print_session_list($id, $facetoface, $location); //} /*if (has_capability('mod/facetoface:viewattendees', $context)) { echo $OUTPUT->heading(get_string('exportattendance', 'facetoface')); echo html_writer::start_tag('div') . html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'f', 'value' => $facetoface->id)); echo get_string('format', 'facetoface') . ' '; $formats = array('excel' => get_string('excelformat', 'facetoface'), 'ods' => get_string('odsformat', 'facetoface')); echo html_writer::select($formats, 'download', 'excel', ''); echo html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('exporttofile', 'facetoface'))); echo html_writer::end_tag('div'). html_writer::end_tag('form'); } */ echo $OUTPUT->box_end();
echo $OUTPUT->heading(get_string('allsessionsin', 'facetoface', $facetoface->name), 2); if ($facetoface->intro) { echo $OUTPUT->box_start('generalbox', 'description'); echo format_module_intro('facetoface', $facetoface, $cm->id); echo $OUTPUT->box_end(); } $locations = get_locations($facetoface->id); if (count($locations) > 2) { echo html_writer::start_tag('form', array('action' => 'view.php', 'method' => 'get')); echo html_writer::start_tag('div'); echo html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'f', 'value' => $facetoface->id)); echo html_writer::select($locations, 'location', $location, ''); echo html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('showbylocation', 'facetoface'))); echo html_writer::end_tag('div') . html_writer::end_tag('form'); } print_session_list($course->id, $facetoface->id, $location); if (has_capability('mod/facetoface:viewattendees', $context)) { echo $OUTPUT->heading(get_string('exportattendance', 'facetoface')); echo html_writer::start_tag('form', array('action' => 'view.php', 'method' => 'get')); echo html_writer::start_tag('div'); echo html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'f', 'value' => $facetoface->id)); echo get_string('format', 'facetoface') . ' '; $formats = array('excel' => get_string('excelformat', 'facetoface'), 'ods' => get_string('odsformat', 'facetoface')); echo html_writer::select($formats, 'download', 'excel', ''); echo html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('exporttofile', 'facetoface'))); echo html_writer::end_tag('div') . html_writer::end_tag('form'); } echo $OUTPUT->box_end(); echo $OUTPUT->footer($course); function print_session_list($courseid, $facetofaceid, $location) {
echo '<tr> <td valign="top">Agenda:</td> <td width="20px"> </td> <td valign="top">' . $webinar->agenda . '</td> </tr>'; } echo '</table>'; $locations = get_locations($webinar->id); if (count($locations) > 2) { echo '<form method="get" action="view.php">'; echo '<div><input type="hidden" name="f" value="' . $webinar->id . '"/>'; choose_from_menu($locations, 'location', $location, ''); echo '<input type="submit" value="' . get_string('showbylocation', 'webinar') . '"/>'; echo '</div></form>'; } print_session_list($course->id, $webinar->id, $location, $webinar); $OUTPUT->box_end(); echo $OUTPUT->footer(); function print_session_list($courseid, $webinarid, $location, $webinar) { global $USER; global $CFG; global $DB; global $OUTPUT; $timenow = time(); //$context = get_context_instance(CONTEXT_COURSE, $courseid, $USER->id); $context = context_course::instance($courseid, $USER->id); $viewattendees = has_capability('mod/webinar:viewattendees', $context); $editsessions = has_capability('mod/webinar:editsessions', $context); $customfields = webinar_get_session_customfields(); // Table headers
echo html_writer::end_tag('div'). html_writer::end_tag('form'); } * */ //print_object($facetoface); $sql="SELECT * FROM {modules} m,{course_modules} cm where m.name='facetoface' and m.id=cm.module"; $activities=$DB->get_records_sql($sql); $id = 1; foreach($activities as $activity) { $courseid=$activity->course; $facetoface=$activity->instance; $facetoface = $DB->get_record('facetoface', array('id' => $activity->instance)); //print_object($facetoface); print_session_list($id, $facetoface, $location,$currenttab); } /*if (has_capability('mod/facetoface:viewattendees', $context)) { echo $OUTPUT->heading(get_string('exportattendance', 'facetoface')); echo html_writer::start_tag('div') . html_writer::empty_tag('input', array('type' => 'hidden', 'name' => 'f', 'value' => $facetoface->id)); echo get_string('format', 'facetoface') . ' '; $formats = array('excel' => get_string('excelformat', 'facetoface'), 'ods' => get_string('odsformat', 'facetoface')); echo html_writer::select($formats, 'download', 'excel', ''); echo html_writer::empty_tag('input', array('type' => 'submit', 'value' => get_string('exporttofile', 'facetoface'))); echo html_writer::end_tag('div'). html_writer::end_tag('form'); } */ echo $OUTPUT->box_end();