> For the complete documentation index, see [llms.txt](https://ajuda.rnp.br/conferenciaweb/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ajuda.rnp.br/conferenciaweb/manuais-de-uso-do-servico/manual-do-administrador/integracao-com-o-calendario-do-moodle.md).

# Integração com o calendário do Moodle

**Descrição:**

Os agendamentos realizados via interface LTI também podem ser automaticamente refletidos no calendário do Moodle. A funcionalidade oferece suporte a **eventos únicos e recorrentes**, otimizando a comunicação de atividades para os alunos e professores.

**Público-alvo:**

Usuários finais (alunos e professores)

<figure><img src="https://4071737184-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7hXYp2PZ9COGqQOKpE%2Fuploads%2FdQ4ZPVRaprH7moukh4Gb%2Fimage%20(4).png?alt=media&amp;token=9e628aa8-f3ad-402f-9a3b-86b7fc579d66" alt=""><figcaption></figcaption></figure>

<figure><img src="https://4071737184-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7hXYp2PZ9COGqQOKpE%2Fuploads%2F2Cl62OStatxBcNPwjSev%2Fimage%20(5).png?alt=media&amp;token=ad8d1d27-1325-4b5d-a55b-5a6b15e01d38" alt=""><figcaption></figcaption></figure>

**Pré-requisitos para ativação:**

* Moodle com Web Services habilitado;
* Acesso administrativo ao Moodle

Como ativar a integração:

#### No Moodle (admin)

* Criar um novo serviço externo (`Administração do site` → `Servidor` → `Serviços externos` (na linha de Web services)) conforme abaixo:

<figure><img src="https://4071737184-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7hXYp2PZ9COGqQOKpE%2Fuploads%2FvuuCStMMvmXvMdOxHppL%2FUntitled%20(9).png?alt=media&amp;token=2ca9ae32-eb76-4c97-8cf6-7810af46477b" alt=""><figcaption></figcaption></figure>

Na tela seguinte, clique em Adicionar funções

<figure><img src="https://4071737184-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7hXYp2PZ9COGqQOKpE%2Fuploads%2FVxirau0SwoH5wKNeOmAK%2FUntitled%20(10).png?alt=media&amp;token=6101e231-647e-4a08-aba3-91ae2a59dbb1" alt=""><figcaption></figcaption></figure>

* Adicione as 3 seguinte funções
  * `core_calendar_create_calendar_events`
  * `core_calendar_delete_calendar_events`
  * `core_webservice_get_site_info`

<figure><img src="https://4071737184-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7hXYp2PZ9COGqQOKpE%2Fuploads%2FZ0To7TunyiX1Ox5RnglK%2Fimage%20(6).png?alt=media&amp;token=f76f04e7-d2fe-48d3-8da0-23088d001a9d" alt=""><figcaption></figcaption></figure>

Criar um novo token (Administração do site → Servidor → Gerenciar tokens (na linha de Web services) conforme abaixo:

<figure><img src="https://4071737184-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7hXYp2PZ9COGqQOKpE%2Fuploads%2FwApJxF5BZN03CYEnY0gW%2FUntitled%20(11).png?alt=media&amp;token=d9885175-5489-4e74-866d-0fc94daf4a9d" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}

É importante notar que:

* O nome do usuário é o nome de quem está criando o token;
* O serviço precisa ser o recém-criado (mconf-external-service);
* O checkbox do Válido até está DESMARCADO. Caso queira posteriormente invalidar o token, o mesmo pode ser excluído na página Gerenciar tokens.
  {% endhint %}

Ao criar o token, a seguinte página mostrará o token uma única vez, então anote em algum lugar seguro.

<figure><img src="https://4071737184-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7hXYp2PZ9COGqQOKpE%2Fuploads%2Fdr8fWdXbs2IiPmoAcelA%2FUntitled%20(12).png?alt=media&amp;token=e2746258-5624-4644-a72c-d8e9b91b3539" alt=""><figcaption></figcaption></figure>

### No Dash do ConferenciaWeb

* &#x20;Criar uma ou editar uma `ConsumerConfig`
* Preencher o campo `MoodleToken` com os dados abaixo:

| **Campo**            | **Valor**                                                                                                                                  |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `token`              | O token gerado no Moodle                                                                                                                   |
| `url`                | URL da API do Moodle (ex.: [`https://moodle.h.elos.dev/webservice/rest/server.php`](https://moodle.h.elos.dev/webservice/rest/server.php)) |
| `consumer_config_id` | ID da `ConsumerConfig` do cliente/instituição                                                                                              |

Validação visual

* Ao configurar corretamente ao `token` e a `URL`, no formulário de **Agendamentos** apresentará a opção de replicar agendamento para o calendário do Moodle.

<figure><img src="https://4071737184-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M7hXYp2PZ9COGqQOKpE%2Fuploads%2Fwv5J9pdodDcGdnhcbtay%2Fimage%20(7).png?alt=media&amp;token=23242360-7ae1-4d2f-9ad0-df11eda66281" alt=""><figcaption></figcaption></figure>

{% hint style="danger" %}

### Testes recomendados

Antes de liberar as credencias e a integração, recomendamos:

* Criar um agendamento único e verificar se o evento aparece no calendário do Moodle.
* Criar um agendamento recorrente e confirmar se todos os eventos são refletidos corretamente.
* Verificar se a edição ou exclusão de eventos no LTI reflete corretamente no Moodle.
  {% endhint %}

### Observações

* Essa integração não sincroniza eventos já existentes — apenas novos agendamentos realizados após a ativação.
* O aluno não precisa realizar nenhuma ação para visualizar os eventos no calendário do Moodle


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ajuda.rnp.br/conferenciaweb/manuais-de-uso-do-servico/manual-do-administrador/integracao-com-o-calendario-do-moodle.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
