From c85467541b852dfe4216380941f747f3fca7b70a Mon Sep 17 00:00:00 2001 From: Matheus Garcia Date: Wed, 19 Jun 2019 10:25:06 -0300 Subject: [PATCH] =?UTF-8?q?Inclus=C3=A3o=20de=20link=20em=20bot=C3=A3o=20d?= =?UTF-8?q?e=20inscri=C3=A7=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/output/core/course_renderer.php | 32 +++++++++++++++---------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/classes/output/core/course_renderer.php b/classes/output/core/course_renderer.php index 6623305..120ecc3 100644 --- a/classes/output/core/course_renderer.php +++ b/classes/output/core/course_renderer.php @@ -230,23 +230,29 @@ class course_renderer extends \core_course_renderer { $content .= html_writer::end_tag('div'); // End coursecat. } } + // Display course summary. - if ($course->has_summary()) { $content .= html_writer::start_tag('div', array('class' => 'card-see-more text-center teste')); - $content .= html_writer::start_tag('div', array('class' => 'btn btn-inscrever')); - $content .= 'Inscrever'; - $content .= html_writer::end_tag('div'); - $content .= html_writer::start_tag('div', array('class' => 'btn btn-mais-info m-2', - 'id' => "course-popover-{$course->id}", 'role' => 'button', 'data-region' => 'popover-region-toggle', - 'data-toggle' => 'popover', 'data-placement' => 'right', - 'data-content' => $chelper->get_course_formatted_summary($course, - array('noclean' => true, 'para' => false)), 'data-html' => 'true', 'tabindex' => '0', 'data-trigger' => 'focus')); - $content .= 'Mais informações'; - $content .= html_writer::end_tag('div'); - + if ($icons = enrol_get_course_info_icons($course)) { + $content .= html_writer::start_tag('div', + array('class' => 'btn btn-inscrever', + 'onclick'=>"window.location.href='" . $courseurl . "';") + ); + $content .= 'Inscrever'; + $content .= html_writer::end_tag('div'); + } + //if ($course->has_summary() && false) { + $content .= html_writer::start_tag('div', array('class' => 'btn btn-mais-info m-2', + 'id' => "course-popover-{$course->id}", 'role' => 'button', 'data-region' => 'popover-region-toggle', + 'data-toggle' => 'popover', 'data-placement' => 'right', + 'data-content' => $chelper->get_course_formatted_summary($course, + array('noclean' => true, 'para' => false)), 'data-html' => 'true', 'tabindex' => '0', 'data-trigger' => 'focus')); + $content .= 'Mais informações'; + $content .= html_writer::end_tag('div'); + //} $content .= html_writer::end_tag('div'); // End summary. - } + return $content; } /**