Giter VIP home page Giter VIP logo

moodle-local_mail's Introduction

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/>.

moodle-local_mail's People

Contributors

albertgasset avatar mcagigas-at-wiris avatar necessary3vil avatar reskit avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

moodle-local_mail's Issues

db/access.php has a spelling error s/loca/local

    'loca/mail:addinstance' => array(
        'riskbitmask' => RISK_XSS,
        'captype' => 'write',
        'contextlevel' => CONTEXT_COURSE,
        'archetypes' => array(
            'editingteacher' => CAP_ALLOW,
            'manager' => CAP_ALLOW
        ),
        'clonepermissionsfrom' => 'moodle/course:manageactivities'
    ),

Message in index/inbox of a user that it doesn't belong to

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.

iterm001
iterm003

Unable to select user

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.

YUI not loading buttons

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

Thanks for looking :)
mail fix

Is there a way to empty the 'trash'?

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.

No get_unread_count_parameters function in external.php crashes API functions pages

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!

No recibir esos mensajes en el correo externo

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?

Display the courses short name in the "create" and "compose" screens instead of full name

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

Missing menu link in 3.1

Two sites I upgraded recently to 3.1 and the menu for My Mail has gone.

mail

Did I miss something?

Error in Database : Data too long for column 'subject'

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()

Admin/manager capability to send messages to anyone

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

blank page error

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

Unit tests fail on Moodle 2.5 due to additional user fields

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.

Attachments doesn't show when receiving mail with local_mail plugin

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.

githubissue_localmail

I've checked the database and can see that the file has been uploaded and is registered in the "message" filearea.

githubissue_dbproof

Is this a known issue for Moodle version 3.3 and above?

Replying to a message with a subject of 100 characters generates a database error

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

No update of recipient's list

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
course_participants

Recipients in local_mail
recipients_localmail

[ERROR] Subject too long

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.