Feature #7225
Plugin: Announcements sendable by SMS
Description
There is no way to find an open-source software to do this, as this requires access to a mobile phone infrastructure. However, there are systems around which make it very easy to register an account, get an API key and send a few SMS.
I believe a small plugin could enable this by plugging into the courses announcements system (would require hacks to the announcements mail-sending process, but no change to the database).
There is a REST interface for Clockwork explained here: http://www.clockworksms.com/doc/easy-stuff/http-interface/send-sms/ and the cost of each SMS is ~0.06€/SMS (it is still expensive, but it works to send them all around the world). You can send it to up to 50 numbers at a time, with a single REST call, which makes it practical for most courses.
The process to register an account with Clockwork is simply to register here: http://www.clockworksms.com/platforms/piwik/ (in the case of Piwik), register, confirm your mail, get an API key and register this API key in the Chamilo plugin's config page and... that's it... We could then add a "mobile phone" user field at the plugin's install time (or ask for the name of the corresponding extra field in the plugin configuration).
Ideally, the plugin would also send an e-mail to the teacher with the results of the message sending for each user, so the teacher knows if some people did not receive it, for example.
Finally, to avoid overcosts, the plugin should offer a list of checkboxes with each message type, and only send an SMS in these cases where the checkbox has been selected.
A landing page will be setup by Clockworks for us at http://www.clockworksms.com/platforms/chamilo/ This is where the plugin should send you to get an API key.
Files
Related issues
Associated revisions
Remove useless files in clockworks plugin - refs #7225
Change directory structure and follow code convention - refs #7225
History
Updated by Yannick Warnier over 8 years ago
- Status changed from New to Assigned
- Assignee set to Angel Quiroz
Updated by Yannick Warnier over 8 years ago
- Description updated (diff)
- Due date set to 26/08/2014
- Estimated time set to 40.00 h
Updated by Yannick Warnier over 8 years ago
Attaching modified list of e-mails sent by the platform. Lines marked in grey should be ignored (not included in the options offered to admins) although they should have a message type assigned.
Updated by Yannick Warnier over 8 years ago
- Status changed from Assigned to Needs testing
- Assignee deleted (
Imanol Losada)
Merge done.
Needs review.
Updated by Julio Montoya over 8 years ago
This plugin introduces a lot of fatal errors and does not respect coding standards see task:
https://task.beeznest.com/issues/8717
Yannick, I think I'm going to remove your merge permissions :)
https://github.com/chamilo/chamilo-lms/commit/79b7d90130152be65b30bf98161afb39086a303a
Updated by Yannick Warnier over 8 years ago
In your fix, I cannot see anything that would lead to a fatal error if the plugin is disabled... and the plugin is still in "needs testing" :-)
Updated by Yannick Warnier over 8 years ago
Ok, found it in your comment in the private task:
Fatal error: Can't use function return value in write context in www/plugin/clockworksms/lib/clockworksms.lib.php on line 37
This is one of those pesky PHP errors that don't show in all contexts.
empty() is not a function but a language construct (not sure), and it only takes variables, so it doesn't work on the return value of a function.
Note: Prior to PHP 5.5, empty() only supports variables; anything else will result in a parse error. In other words, the following will not work: empty(trim($name)). Instead, use trim($name) == false.
This explains why it worked on Imanol's server but not on Noa's (still in 5.4)
Updated by Julio Montoya over 8 years ago
Updated by Imanol Losada over 8 years ago
Two commits:* Tabspaces replaced with whitespaces* Code style fixed following Yannick's corrections
PR: https://github.com/chamilo/chamilo-lms/pull/371
These two PRs apply your corrections. First of them is for chamilo files only. The other one is for plugin part only.
PR: https://github.com/chamilo/chamilo-lms/pull/372
PR: https://github.com/chamilo/chamilo-lms/pull/373
Updated by Yannick Warnier over 8 years ago
- Status changed from Needs testing to Feature implemented
- Assignee changed from Yannick Warnier to Imanol Losada
- % Done changed from 0 to 100
PRs checked and applied. There is an issue still with the PR related to the mobile phone number field, but this is something else. Closing this one.
This one was good for the learning process :-)
Updated by Yannick Warnier over 8 years ago
Imanol, please update the time spent on this one. I believe it is more than 40h :-)
Updated by Yannick Warnier over 8 years ago
There's a license issue with this plugin, as explained in https://github.com/mediaburst/clockwork-php/issues/3
We are pending an answer from Mediaburst to know if we might include it.
Create Clockworksms plugin; Implement in several mail sending calls - refs #7225