From ac8abe333fd23b07f5df0d821ad0be1b69bbd28d Mon Sep 17 00:00:00 2001 From: Matheus Garcia Date: Tue, 18 Jun 2019 16:21:35 -0300 Subject: [PATCH] =?UTF-8?q?Ajustes=20para=20enviar=20categoria=20na=20atua?= =?UTF-8?q?liza=C3=A7=C3=A3o=20do=20curso?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- classes/task/escola_modelo.php | 9 +++++++++ classes/util.php | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/classes/task/escola_modelo.php b/classes/task/escola_modelo.php index fe039fc..f92bcf4 100644 --- a/classes/task/escola_modelo.php +++ b/classes/task/escola_modelo.php @@ -83,6 +83,15 @@ class escola_modelo extends \core\task\scheduled_task { FROM {course} c LEFT JOIN {ilb_sync_course} sc ON c.id = sc.course_id + JOIN {context} ctx + ON c.id = ? + AND ctx.contextlevel = 50 + AND ctx.instanceid = c.id + JOIN {customfield_field} f + ON f.shortname = ? + JOIN {customfield_data} d + ON d.fieldid = f.id + AND d.contextid = ctx.id WHERE (sc.course_id is null OR c.timemodified > sc.time_sync) '; diff --git a/classes/util.php b/classes/util.php index 0aa22b0..c07ea09 100644 --- a/classes/util.php +++ b/classes/util.php @@ -136,7 +136,8 @@ function atualizaCursoEVL($curso, $visivel = null) { "visible" => $visivel, "conteudista" => "", "certificador" => evlSiglaEscola(), - "carga_horaria" => $ch + "carga_horaria" => $ch, + "category" => obtemCampoCustomizadoCurso($curso->id, CURSO_CUSTOMFIELD_AREATEMATICA) ); // Monta o JSON que serĂ¡ enviado ao Web Service