From 496106cee5cea99a1d677449d654d150bbddd5af Mon Sep 17 00:00:00 2001 From: Matheus Garcia Date: Thu, 23 Dec 2021 16:11:18 -0300 Subject: [PATCH] =?UTF-8?q?In=C3=ADcio=20de=20altera=C3=A7=C3=A3o=20para?= =?UTF-8?q?=20pauta=20digital?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/sessions_page_params.php | 3 +++ manage.php | 22 ++++++++++++++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/classes/sessions_page_params.php b/classes/sessions_page_params.php index 3d3e974..cce5f55 100644 --- a/classes/sessions_page_params.php +++ b/classes/sessions_page_params.php @@ -61,6 +61,9 @@ class mod_attendance_sessions_page_params { */ const ACTION_DELETE_HIDDEN = 6; + + const ACTION_ILB_SYNC = 90; + /** @var int view mode of taking attendance page*/ public $action; } diff --git a/manage.php b/manage.php index 468cdfe..0aef2a8 100644 --- a/manage.php +++ b/manage.php @@ -31,6 +31,7 @@ $id = required_param('id', PARAM_INT); $from = optional_param('from', null, PARAM_ALPHANUMEXT); $pageparams->view = optional_param('view', null, PARAM_INT); $pageparams->curdate = optional_param('curdate', null, PARAM_INT); +$ilbsync = optional_param('ilbsync', null, PARAM_ALPHANUMEXT); $pageparams->perpage = get_config('attendance', 'resultsperpage'); $cm = get_coursemodule_from_id('attendance', $id, 0, false, MUST_EXIST); @@ -70,7 +71,7 @@ if ($from === 'block') { $att->view = ATT_VIEW_DAYS; } } - + $PAGE->set_url($att->url_manage()); $PAGE->set_title($course->shortname. ": ".$att->name); $PAGE->set_heading($course->fullname); @@ -78,6 +79,10 @@ $PAGE->set_cacheable(true); $PAGE->force_settings_menu(true); $PAGE->navbar->add($att->name); +if($ilbsync) { + echo html_writer::tag('p', 'ILB SYNC foi chamado', array()); +} + $output = $PAGE->get_renderer('mod_attendance'); $tabs = new attendance_tabs($att, attendance_tabs::TAB_SESSIONS); $filtercontrols = new attendance_filter_controls($att); @@ -96,5 +101,18 @@ echo $output->render($tabs); echo $output->render($filtercontrols); echo $output->render($sesstable); -echo $output->footer(); +echo html_writer::start_div(); +echo html_writer::start_tag('form', array()); +echo html_writer::tag('input', '', array('type' => 'hidden', 'name' => 'id', 'value' => $id)); +echo html_writer::tag('input', '', + array( + 'type'=>'submit', + 'value' => 'Sincronizar frequĂȘncias', + 'name' => 'ilbsync' + )); +echo html_writer::end_tag('form'); +echo html_writer::end_div(); + + +echo $output->footer();