From 401c03d617584a3e743f9d14c93ca710452bc5a2 Mon Sep 17 00:00:00 2001 From: Matheus Garcia Date: Tue, 18 Jun 2019 12:41:14 -0300 Subject: [PATCH] =?UTF-8?q?Uso=20de=20fun=C3=A7=C3=B5es=20para=20obten?= =?UTF-8?q?=C3=A7=C3=A3o=20de=20par=C3=A2metros=20da=20Escola=20Modelo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- process.php | 5 +++-- return.php | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/process.php b/process.php index 58e3c37..e72605a 100644 --- a/process.php +++ b/process.php @@ -26,6 +26,7 @@ require('../../config.php'); require_once("lib.php"); require_once($CFG->libdir.'/eventslib.php'); require_once($CFG->libdir.'/enrollib.php'); +require_once("../../blocks/escola_modelo/classes/util.php"); global $CFG; @@ -40,9 +41,9 @@ $courseid = $plugin_instance->courseid; // Monta url para redirecionamento após matrícula $urlRedirect = new moodle_url('/enrol/evl/return.php', array('id' => $courseid, 'instanceid' => $instanceid)); // Monta url para matrícula -$urlEnrol = new moodle_url($CFG->emURLWS . '/cursos/registro', +$urlEnrol = new moodle_url(evlURLWebServices() . '/cursos/registro', array( - 'school' => $CFG->emSigla, + 'school' => evlSiglaEscola(), 'school_course' => $courseid, 'key' => $USER->$idnumber, 'redirect' => $urlRedirect->out(false) // false evita codificar '&' na url de redirecionamento diff --git a/return.php b/return.php index 0cf1fbe..8ab0020 100644 --- a/return.php +++ b/return.php @@ -25,6 +25,7 @@ require("../../config.php"); require_once("$CFG->dirroot/enrol/evl/lib.php"); require_once("../../blocks/escola_modelo/lib/httpful.phar"); +require_once("../../blocks/escola_modelo/classes/util.php"); global $DB; @@ -84,7 +85,7 @@ if( matriculadoNaEvl($key, $course->id, 'ILB') ) { // FIXME obter código da esc * Verifica se usuário está matriculado em determinado curso na EVL */ function matriculadoNaEvl($chaveUsuario, $curso, $escola) { - $uri = new moodle_url($CFG->emURLWS . '/cursos/confirmar'); + $uri = new moodle_url(evlURLWebServices() . '/cursos/confirmar'); $array = array( "key" => $chaveUsuario,