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