Moodle infectado com ad by…

Em algumas categorias e disciplinas do Moodle apareciam DIVs com publicidade no cabeçalho e no rodapé… A publicidade estava na descrição das próprias categorias e disciplinas e foi adicionada involuntariamente por um dos admins/responsáveis porque tinha o browser infectado…

Para verificar quais as tabelas do Moodle que têm scripts, faz-se uma pesquisa na base de dados…

moodle_search_script

Se aparecer algum resultado diferente de 0, pode ser ali que estão os scripts.

Plugins Moodle

Quando tiver algum tempo tenho que estudar bem as funcionalidades destes plugins.

 

GISMO

GISMO, a graphical interactive student monitoring and tracking system that extracts tracking data from an online course maintained with Moodle, and generates graphical representations that can be explored by course instructors.

https://moodle.org/plugins/view.php?plugin=block_gismo

 

GMoodle

GMoodle é um sistema de gerenciamento da Plataforma Moodle. Atende a necessidade de integração de vários ambientes Moodle. Oferece agilidade no gerenciamento e diversos tipos de relatórios não disponíveis no Moodle.
É uma ferramenta de gestão de website Moodle projetado para instituições que precisam extrair relatórios mais gerenciais, o que o Moodle não oferece. Além disso, permite integrar diversos ambientes Moodle, de diferentes versões, distribuídos em vários servidores. É uma ferramenta projetada para ser um armazém de dados do Moodle destinado para emissão de relatórios gerenciais.

http://www.badiu.net/nportal/index.php?option=com_content&view=article&id=6

Configurar um servidor SMTP do gmail para enviar emails no Moodle 1.9

smtphosts: smtp.gmail.com:465

smtpuser: mail@gmail.com

smtppass: *******

supportemail: mail@gmail.com

 

Editar o ficheiro /lib/phpmailer/class.smtp.php na linha 83:

$host = 'ssl://' . $host;

e alterar a porta na variável $SMTP_PORT para 465:

var $SMTP_PORT = 465;

 

Editar o ficheiro /lib/phpmailer/class.phpmailer.php e alterar a porta na variável $Port para 465:

var $Port = 465;

 

Para desligar double authentication no Gmail ver aqui: https://docs.moodle.org/30/en/Email_setup_gmail

 

Fonte: http://docs.moodle.org/19/en/Email_setup_gmail

Moodle não autentica utilizadores registados

O Administrador desativou o método de autenticação por email e os utilizadores não conseguem fazer login.

É necessário editar manualmente a tabela config na base de dados e incluir “email” na linha com o name “auth”.

Mod_security bloqueia upload de ficheiros do Moodle 2

Aqui fica a solução… o ponto 1 já eu tinha resolvido, faltava-me o 2.

 

I just ran into this same problem. For me it was the Apache module mod_security that was preventing the uploads. Drupal has some issues uploading files and images when running Apache’s mod_security using the default configuration settings. Here’s what I did to identify the problem and get it working.

Besides that javascript error, there should be an error in the apache error log that you can check.

Error 1

Here’s the first error I was getting in the apache error log.
ModSecurity: Request body (Content-Length) is larger than the configured limit (131072)

The configured limit is 131072 BYTES! That’s only 128 kB!!

Solution 1

Edit /etc/apache2/conf.d/modsecurity.conf and set SecRequestBodyLimit to a larger size than the default of 128 KB and then reboot apache. I set mine to match my max_upload setting from my php.ini. Remember it has to be in bytes!

More Info about SecRequestBodyLimit
Description: Configures the maximum request body size ModSecurity will accept for buffering.
Syntax: SecRequestBodyLimit NUMBER_IN_BYTES
Example Usage: SecRequestBodyLimit 134217728
Processing Phase: N/A
Scope: Any
Dependencies/Notes: 131072 KB (134217728 bytes) is the default setting. Anything over this limit will be rejected with status code 413 Request Entity Too Large. There is a hard limit of 1 GB.

Error 2

After I fixed that error I was able to upload files without a problem and things were running smooth…until I tried uploading a certain video. All my other videos uploaded fine except this one. I checked the Apache error log and saw:

ModSecurity: Warning. Match of "eq 0" against "MULTIPART_UNMATCHED_BOUNDARY" required. [file "/etc/apache2/conf.d/modsecurity.conf"] [line "60"] [msg "Multipart parser detected a possible unmatched boundary."]

Solution 2

After digging around on teh internets I found the rule referenced in the error above will sometimes return false positives, which will then deny the request. To fix that just remove the “deny” from the rule so that it will simply log when these events occur.

Edit /etc/apache2/conf.d/modsecurity.conf and update the rule for MULTIPART_UNMATCHED_BOUNDARY, setting it to log only.

OLD

# Did we see anything that might be a boundary?
SecRule MULTIPART_UNMATCHED_BOUNDARY "!@eq 0" \
"phase:2,t:none,log,deny,msg:'Multipart parser detected a possible unmatched boundary.'"

NEW (removed ‘deny’ from line 3)

# Did we see anything that might be a boundary?
SecRule MULTIPART_UNMATCHED_BOUNDARY "!@eq 0" \
"phase:2,t:none,log,msg:'Multipart parser detected a possible unmatched boundary.'"

GARE: Erro “Não está inscrito nesta disciplina” quando o utilizador é aluno da disciplina

Existem duas possibilidades para este erro ocorrer.

1. Nos cargos globais do Moodle as permissões estão modificadas ou não têm valores os valores por defeito.

2. Na tabela de contextos (mdl_context) a path está corrompida e os contextos estão trocados. Por exemplo, um módulo pode ter na path contextos de outras categorias ou outras disciplinas. Neste caso é necessário forçar a reconstrução da tabela de contextos.
Ver aqui como se faz: http://docs.moodle.org/19/en/How_to_rebuild_context_paths

Moodle erro enrol ao fazer login

No meu caso acontecia porque activaram todos os plugins de autenticação das disciplinas.

“This seems to be a issue with course enrollment plugin. One of the enrolment plugins the Course -> Enrolments caused this issue for me. I just unchecked the plugin and it worked for me. But I havent figured out why that happens .”

http://moodle.org/mod/forum/discuss.php?d=122491&parent=649056

Users não conseguem fazer login

No meu caso este era o meu problema:
“Check the value of mnet_localhost_id in the mdl_config database table. It’s normally 1 but must match the mnet_hostid field in your user records in the mdl_user table for the user to be recognised. It can sometimes get changed spuriously during upgrades or site migrations.”

Bastou mudar no mdl_config a opção de 3 para 1 e voilá!

http://docs.moodle.org/23/en/Installation_FAQ#I_can.27t_log_in_-_I_just_stay_stuck_on_the_login_screen