ioc / moodle-local_mail Goto Github PK
View Code? Open in Web Editor NEWLocal mail plugin for Moodle
License: GNU General Public License v3.0
Local mail plugin for Moodle
License: GNU General Public License v3.0
Local mail plugin for Moodle ============================ This plugin allows users to send messages to each other, using an interface and features similar to webmail clients. Messages are tied to courses, so users can only contact other participants in courses the user is enrolled in. Reading/sending of messages is done through a new item in the navigation block called "My Mail". Project page: http://github.com/IOC/moodle-local-mail Source code of the mobile addon: https://github.com/albertgasset/moodlemobile-local_mail Authors ------- Marc Català <[email protected]> Albert Gasset <[email protected]> Installation ------------ Unpack archive inside /path/to/moodle/local/mail For general instructions on installing plugins see: http://docs.moodle.org/24/en/Installing_plugins Copyright --------- Copyright © 2012,2013 Institut Obert de Catalunya This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
'loca/mail:addinstance' => array(
'riskbitmask' => RISK_XSS,
'captype' => 'write',
'contextlevel' => CONTEXT_COURSE,
'archetypes' => array(
'editingteacher' => CAP_ALLOW,
'manager' => CAP_ALLOW
),
'clonepermissionsfrom' => 'moodle/course:manageactivities'
),
Restricting allowed file types would improve security (for all) and usability (for the teacher). This is feature is similar to the assignment and the workshop modules, and could be based off similar code.
Refs
Get the following when trying to send a message in Moodle 2.6.2+ (Build: 20140320)
Coding error detected, it must be fixed by a programmer: Could not load preference popup_provider_local_mail_mail_permitted. Make sure the component and name you supplied to message_send() are valid.
From;
message.class.php:179 if (!has_capability('local/mail:usemail', $context))
We expect the user to have local/mail:usemail capability to be able to see messages. But default unit tests don't set a user. And the normal user on 2.5 does not have this capability on installation. So a number of tests fail.
We have a user that had a message(id: 125) in their inbox. Clicking on it rendered an "Invalid message" alert pop up.
Upon investigation in the DB tables, it appears that they have the message in the local_mail_index as if it is theirs, but if you look at the local_mail_message_users table the message does not belong to them.
I've attached two screen grabs of two SQL queries and their results. The first one shows the index table with the offending message and the affected user(id: 14). The second image shows the user mappings with the two users that the message belongs to, not user id 14 is not on that list. This is on Moodle 2.4.6.
Hi,
I am unable to select user to send email.
I am using Moodle 2.6+ (Build: 20131205). with your latest master.
To reproduce:
I click on "compose", then click on "Add Recipients".
A dialog windows appear but there's an infinite loading in the middle of it. Cannot select user.
Hi,
I'm using Moodle 2.4.3 with the Bootstrap theme for 2.4 (latest build from here):
https://github.com/bmbrands/theme_bootstrap/tree/moodle_24
I installed the mail plugin, and it works great with Moodle 2.4.3 on the same server (same php, mysql, webserver, etc.) using the Ergo theme http://elearning.3rdwavemedia.com/themes/ergo/ with all buttons working.
However, when I use the plugin with Bootstrap to access the Inbox, starred, drafts, sent, or trash, the buttons don't show up to delete. Only when opening an email, it allows me to use the reply or forward buttons below the message.
Firebug (Firefox 22) error:
TypeError: Y.one(...) is null
http://moodle.domain.com/lib/javascript.php?rev=1374279164&jsfile=%2Flocal%2Fmail%2Fmail.js
Line 1
Chrome Developer tool error:
Uncaught TypeError: Cannot call method 'delegate' of null javascript.php?rev=1374279164&jsfile=%2Flocal%2Fmail%2Fmail.js:1
(anonymous function) javascript.php?rev=1374279164&jsfile=%2Flocal%2Fmail%2Fmail.js:1
e._notify yui_combo.php?3.7.3/build/simpleyui/simpleyui-min.js&3.7.3/build/loader/loader-min.js:1
(anonymous function) yui_combo.php?3.7.3/build/simpleyui/simpleyui-min.js&3.7.3/build/loader/loader-min.js:1
e._notify yui_combo.php?3.7.3/build/simpleyui/simpleyui-min.js&3.7.3/build/loader/loader-min.js:1
N yui_combo.php?3.7.3/build/simpleyui/simpleyui-min.js&3.7.3/build/loader/loader-min.js:1
e.Loader._finish yui_combo.php?3.7.3/build/simpleyui/simpleyui-min.js&3.7.3/build/loader/loader-min.js:1
e.Loader._onSuccess yui_combo.php?3.7.3/build/simpleyui/simpleyui-min.js&3.7.3/build/loader/loader-min.js:1
p yui_combo.php?3.7.3/build/simpleyui/simpleyui-min.js&3.7.3/build/loader/loader-min.js:1
s.js.length.e.Get.js.onSuccess yui_combo.php?3.7.3/build/simpleyui/simpleyui-min.js&3.7.3/build/loader/loader-min.js:1
s._finish yui_combo.php?3.7.3/build/simpleyui/simpleyui-min.js&3.7.3/build/loader/loader-min.js:1
s._next yui_combo.php?3.7.3/build/simpleyui/simpleyui-min.js&3.7.3/build/loader/loader-min.js:1
s._progress yui_combo.php?3.7.3/build/simpleyui/simpleyui-min.js&3.7.3/build/loader/loader-min.js:1
h yui_combo.php?3.7.3/build/simpleyui/simpleyui-min.js&3.7.3/build/loader/loader-min.js:1
Is there anyway to empty the trash with this plugin? I'm not seeing anything in the UI when I'm in the 'Trash' folder and a quick run through the code doesn't reveal any secret way to purge the trash.
Hey there, was troubleshooting a client's Moodle trying to figure out why admin/webservice/documentation.php and admin/webservice/service_functions.php?action=add weren't loading correctly and throwing the error "missing parameters". Turns out it's because they had local_mail installed and your API function get_unread_count has no corresponding get_unread_count_parameters function. I added one myself, into classes/external.php, and that fixed the issue. I'm a bit too busy at the moment to create a proper pull request, but figure this info should be all you need to fix!
It would be good to be able to delete your labels via the UI.
Acabo de instalar el módulo para Moodle 2.6 y me he encontrado un pequeño problema: el usuario aunque tenga desactivado lo del envío de correos en su perfil, recibe los correos de este módulo en su correo externo. ¿Existe la posibilidad de desactivar ese envío de correos al correo externo, o al menos que en vez de recibir todos los correos, le envíen uno tipo resumen?
Hello.
Today when we use the compose form, we get a list of courses in the combobox, with the course full name. Then after selecting the "course" and "continue" we are in the "compose" form where the course name appear (again - the full name).
Is there a possibility to display at both cases the short name?
Is it configurable by Preferences or by Settings?
We are using the version of 2.7.
Thank you
In compose form, the maximum characters for subject is not the same in Database (varchar(100) in mdl_local_mail_messages table) and in form's rule (maximum = 255).
In compose_form.php:
$mform->addRule('subject', $text, 'maxlength', 255, 'client');
It generates a coding error :
Debug info: Data too long for column 'subject' at row 1
UPDATE mdl_local_mail_messages SET subject = ?,content = ?,format = ?,time = ? WHERE id=?
[array (
0 => 'RE: Qualification 2ème message avec un sujet long long long longgggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggggg',
1 => '<p>2ème message avec sujet long<br></p>',
2 => '1',
3 => 1444145840,
4 => 166,
)]
Error code: dmlwriteexception
Stack trace:
line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
line 1392 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
line 1424 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->update_record_raw()
line 543 of /local/mail/message.class.php: call to mysqli_native_moodle_database->update_record()
line 104 of /local/mail/compose.php: call to local_mail_message->save()
Hi,
I think it would be a good idea to add a feature which allows an admin/manager to send messages to any student (from a list, rather than browsing through courses), even though the admin/manager isn't enrolled in that course.
Thanks,
cwaffles
I have installed:
Moodle version: 2.6.4+ (Build: 20140724)
Mail version: 0.1.2
And the plugin was working excelent, but now some users (not all) see a blank page wen they go to indbox page (for example: http://MYSITE/local/mail/view.php?t=inbox).
Also web tey redact an email press sent and see a blank page (this is the link page example: http://MYSITE/local/mail/view.php?t=course&c=76).
I didn't change server preferences or configuration.
Please help me or guide me to try to fix this problem.
Thanks
Until Moodle 2.6, the following fields were not in the database for the user table.
'firstnamephonetic', 'lastnamephonetic', 'middlename', 'alternatename'.
Until tests fail because these extra fields are expected in the output comparison, but aren't in the data that's inserted into the Moodle database.
We are upgrading Moodle from 3.1 to Moodle 3.3 for a client, they use local_mail and have issues with attachments for this plugin.
It worked in 3.1, but after upgrading the dev environment it stopped working. They get the mail, all text are sent but there is a white space below the text where the picture should be.
I've checked the database and can see that the file has been uploaded and is registered in the "message" filearea.
Is this a known issue for Moodle version 3.3 and above?
When trying to reply to a message whose subject is exactly 100 characters long we get this error:
==================================================================
Debug info: Data too long for column 'subject' at row 1
UPDATE mdl_local_mail_messages SET subject = ?,content = ?,format = ?,attachments = ?,time = ? WHERE id=?
[array (
0 => 'RE: Bienvenida "Curso de Propiedad Intelectual para inventores, científicos y diseñadores industriales”',
1 => '',
2 => -1,
3 => 0,
4 => 1536855169,
5 => 220706,
)]
Error code: dmlwriteexception
==================================================================
The work around we plan to use is to set the subject to 255 characters but I think this might require a validation.
By the way we are working with Moodle 3.5
I discovered an issue in last version (release = '1.8.1', version = 2016011200).
Sometimes, recipient's list is not updated.
When a teacher add new users in a course, the list in local_mail recipients is not always updated.
Thus, there's a difference between participant's list in a course and recipient's list in local_mail (for the same course).
You can see screenshots below.
Participants in course
Cuando el usuario escribe un subject muy largo y este correo se va respondiendo, se agrega "RE: " al subject.
Cuando esta cadena supera los 100 caracteres definidos en la tabla el correo en particular ya no funciona más, lanzando una excepción de moodle.
Se pueden aumentar los caracteres de subject para la base de datos pero esto no soluciona el problema, solo da un margen mayor antes de recibir el error.
Si usted lo decea, puedo crear un pull request truncando el asunto a 96 caracteres y agregando "..." al final.
When the user writes a very long topic and this email is answered, "RE:" is added to the topic.
When this string exceeds 100 characters excluded in the table, the particular mail no longer works, throwing a moodle exception.
You can increase the subject characters for the database, but this does not solve the problem, it only gives a larger margin before receiving the error.
If you wish, I can create an pull request by truncating the subject to 96 characters and adding "..." at the end.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.