require_once(dirname(__FILE__).'/renderables.php'); require_once(dirname(__FILE__).'/renderhelpers.php'); $id = required_param('id', PARAM_INT); $att = $DB->get_record('local_attendance', array('id' => $id), '*', MUST_EXIST); $classinfo = $DB->get_record('local_clclasses',array('id'=>$att->classid)); //$sacademicyearinfo = $DB->get_record('local_academicyear', array('id' =>$sessioninfo ->academicyearid )); $PAGE->set_context(context_system::instance()); require_login(); $att = new local_attendance($att,$classinfo,null , $PAGE->context); $att->perm->require_export_capability(); $PAGE->set_url($att->url_export()); $PAGE->set_pagelayout('admin'); //$PAGE->set_title($course->shortname. ": ".$att->name); //$PAGE->set_heading($course->fullname); $PAGE->set_cacheable(true); //$PAGE->set_button($OUTPUT->update_module_button($cm->id, 'attendance')); $PAGE->navbar->add(get_string('export', 'local_attendance')); $formparams = array( 'attendanceid'=>$att->id, 'modcontext' => $PAGE->context,'attendanceobject'=>$att,'classid'=>$att->classid); $mform = new local_attendance_export_form($att->url_export(), $formparams); if ($mform->is_submitted()) { $formdata = $mform->get_data(); $pageparams = new local_att_page_with_filter_controls();