Dear All,
block_attendance.php
<?php
defined('MOODLE_INTERNAL') || die();
require_once('attendance_form.php');
class block_getattendance extends block_base {
public function init() {
$this->title = get_string('pluginname', 'block_getattendance');
}
public function get_content(){
$this->content = new stdClass();
$this->content->text = '';
$mform = new attendance_form();
if ($mform->is_cancelled()) {
} else if ($fromform = $mform->get_data()) {
} else {
$mform->set_data($toform);
$this->content->text = $mform->render();
}
return $this->content;
}
public function instance_allow_multiple() {
return true;
}
function has_config() { return true; }
}
attendance_form.php