Maybe this functionality could be extended to send mails when a teacher set the grades for his students, so that the system alerts them.
Sorry if my specification is not to formal. but is also my first post. I wait your replies.
Thanks
I know how you feel. I am proposing Moodle to a mid-sized company to replace their current LMS, and they are set on rejecting it due to the lack of automatic email reminders / notifications.
I'm trying to find ways around it, but it seems like Moodle doesn't feel like this is a critical requirement.
Does anyone know if this capability exists? for example, i set up an event, and X days before the event, a reminder is sent out.
I personally LOVE Moodle and see nothing wrong with it, (as a moodle administrator), but when the organization wants to have it set up and run automatically, then this is a HUGE issue.
Maybe someone can shed some light on this?
Thanks
Arturo
http://moodle.org/mod/data/view.php?d=13&rid=755
Someone pointed me to that module. It doesnt seem to be up for 1.9 and it has errors on 1.8! I'll keep an eye on it though
Thanks!
Arturo
By the way, I used spanish works to code it, I'll try to traduced it when I have time
Good luck, and if you change the script try to upload it so everyone can use it
Bye
Thanks
How do I use this. I can make my way around the c-panel but I'm new add this stuff. Where do I save the php to and what do I do with the second doc (change eventws reminder)?
Thanks
Chris
Hi Roman,
can you please explain which directory to install this eventreminder file?
thanks so much
Version 1.9.3 problems
- I uploaded eventReminder.php after filling my data connection to /admin.
- I created a new field "eventReminder" likes screenreader field in the user table.
- I added the language strings.
- I modified the file user/editlib.php adding the lines indicated.
- Running /admin/eventReminder.php I get a blank page.
Can you help me, please?
Regards.
Finally I´ve got the event reminder for 1.9.x version but it only sends to user events and global events, but not for course or group events.
Can you help me with this?
Thanks and best regards.
Am I wrong to get the students from a course?
Please help.
/**
Here I get the students from a course
*/
function getCourseStudents($course){
global $DB;
//if it is the main course
if ($course==1){
$rs = $DB->Execute("SELECT id,firstname,lastname,email FROM mdl_user eventreminder=1");
}
//other course
else {
$rs = $DB->Execute("SELECT u.id,u.firstname,u.lastname,u.email FROM mdl_role_assignments r, mdl_user u, mdl_context c WHERE r.contextid = c.id AND r.userid=u.id AND contextlevel = 50 AND instanceid=? AND u.eventreminder=1 ",array($course));
}
return $rs;
}
I finally got it to work the script for version 1.9.3.
Php file attached.
Works with all events types: user, course, group and site.
Greetings.
Hello, I'm getting the same blank page. I added the field "eventreminder" to the mdl_usr table, then uploaded eventreminder.php to the admin folder of my Moodle install.
Any ideas what is happening?
Hi Roman,
I´m making a Calendar Event reminder by week. It means you will receive a mail with all events in the week. Maybe tomorrow, I will share you with all of you. In this moment this reminder is for courseevents not for userevents neither for siteevents.
See you
Re: I wish to propose an "Calendar Event Reminder"
I have posted desperately in three modules for this solution.
one is as follows...
http://moodle.org/mod/forum/discuss.php?d=186205
so my question is will i be able to use this in moodle 2.1.1 ?
or anybody knows a solution for this???
Re: I wish to propose an "Calendar Event Reminder"
Hi Lentin,
I´ve made some changes for moodle 2.1
I have created two reminders one for each activity and the other one is a resume for the activities for the week
Read the README.txt file
Best Regards
Re: I wish to propose an "Calendar Event Reminder"
Hey Martin,
Thanx a ton...i am going to try it now......
once againg thanks a lot....
Regards,
Lentin
Re: I wish to propose an "Calendar Event Reminder"
Hi Martin,
May be my this question will be so dump and boring, but i dont have an option and i think it will be better if i ask you once again as i am just dumb in programming part.
1) I have to put both the attached files (eventreminder.php and weekeventsreminder.php) in the following path "/var/www/moodle/"
ami rite???
2) The function which i need to add in "moodlelib.php", can i just copy and paste in end of moodlelib.php (with adding email and from name)
3)last but most important :-
in the below path "/etc/cron.d" i have seen crontab for moodle.
with following content"
# Regular cron jobs for the moodle package */5 * * * * www-data [ -f /usr/share/moodle/admin/cron.php ] && /usr/bin/php -f /usr/share/moodle/admin/cron.php > /dev/null"
what should i add here to execute the script automatically every 5 hour for the above function?
your help will be very much appreciated.......and sorry for my dumb questions....
thanks,
Lentin Varghese
Re: I wish to propose an "Calendar Event Reminder"
Hi Lentin,
I did this in the server
*/10 * * * * root wget 'http://**.****.**.**/moodle/course/reminderalertaccess.php' >/dev/null;
This is for execute this script each 10 minutes
in your case if you want to execute each 5 hours
* * /5 * * * root wget 'http://**.***.**.***/moodle/weekeventseminder.php' >/dev/null;
you can check this link
http://docs.moodle.org/20/en/Cron
But if you don´t hace access to moodle server you can tell your moodle site administator to put this line in the server
Regards
Tell me if works or you
Re: I wish to propose an "Calendar Event Reminder"
Hi Martin,
I am not sure whether i am doing it in the proper manner.
Here is what i did:-
1) i have put "eventreminder.php and weekeventsreminder.php" in "/var/www/moodle" .
2) I have added the function in moodlelib.php
3) I tried to create cron jobs via terminal as well as file manager. It did not work. Finally in webmin i went to scheduled cron jobs and created new cron job to run these scripts "eventreminder.php and weekeventsreminder.php" . I ran the cron job from there itself and got an output as follows
"
Output from command wget 'http://xxxxxxxxxxxxx/weekeventsreminder.php' >/dev/null ..
--2011-10-08 14:52:05-- http://xxxxxxxxxxxxx/weekeventsreminder.php
Resolving xxxxxxxxxxxxxxx... 192.168.1.32
Connecting to xxxxxxxxxxxxx|192.168.1.32|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 0 [text/html]
Saving to: `weekeventsreminder.php.1'
0K 0.00 =0s
2011-10-08 14:52:05 (0.00 B/s) - `weekeventsreminder.php.1' saved [0/0]
I made both of these scripts executable and tried. Then also it did not work.
I followed this link to create cron jobs using webmin...
"http://doxfer.webmin.com/Webmin/ScheduledCommands"
Could you please let me know what i am doing wrong???
Regards & Thanks,
Lentin
Re: I wish to propose an "Calendar Event Reminder"
Hi Lentin,
Steps 1 and 2 ok
You are using webmin you have to do this in command box in the form
/usr/bin/wget -q -O /dev/null http://yourroot/moodle/weekeventsreminder.php
and put the schedule you want to execute the script
this is for each script
for weekeventsreminder I put every monday at 0:00
and the other one is each day at 0:01
You need to change the code in each file change the function getevents() because I get the events according the execution of the script
Regards
Re: I wish to propose an "Calendar Event Reminder"
Hi Martin,
I believe all configurations.....cron job schedules are correct ...but i think there is some thing wrong with the mail configuration. In moodle under plugins , there is a email plugin where i have configured my external smtp server details with user name and password. Will these php scripts use that settings or do i have to configure another mail transfer agent like postfix in server?
Thanks,
Lentin
Re: I wish to propose an "Calendar Event Reminder"
Hi Lentin,
mmm I don´t know how to test that
First, try to run the script manually
Type in the web explorer the route of the script. For example: http://yourmoodlesite/moodle/eventreminder.php
If it doesn´t work, is problem of your smtp server. But, if you receive mails maybe is problem in the configuration of your cron in the server.
How do you configurate the smtp server, I can ask to the admin server
Regards,
Re: I wish to propose an "Calendar Event Reminder"
Hi Martin,
The webserver software unsupported error was an error came when i executed the script in webmin.
when i am executing the script in browser as you said , i am getting a blank screen.
I got a php script which will send emails upon execution and it is working and sending out mails.
When I am executing the script as follows in terminal
"/usr/bin/php5 /var/www/moodle/weekeventsreminder.php " i am getting an error message as follows
"Command line scripts must define CLI_SCRIPT before requiring config.php"
So any clues on the above error??
Regards,
Lentin
Re: I wish to propose an "Calendar Event Reminder"
Hi Martin,
i have configured moodle email in the following path:-
plugins-message outputs-email
with my mail server details and my mail server will work only with ssl
So i have enetered mail server name as "ssl://mail.XXXXXXXXXX.com:465"
in smtp hosts tab and then username and passwords.
Regards,
Lentin Varghese
Re: I wish to propose an "Calendar Event Reminder"
Hi Martin,
Just an update...
When i am executing the script from terminal like this "
" /usr/bin/php5 /var/www/moodle/weekeventsreminder.php"
I am getting an error like as follows
"
Command line scripts must define CLI_SCRIPT before requiring config.php"
Any clues on this error??
Do i have to set any value CLI_SCRIPT anywhere??
Regards,
Lentin
yes your command line script must start by :
define('CLI_SCRIPT', true);
see for example yourmoodle/auth/cas/cli/sync_users.php
define('CLI_SCRIPT', true);
require(dirname(dirname(dirname(dirname(__FILE__)))).'/config.php');
require_once($CFG->dirroot.'/course/lib.php');
// Ensure errors are well explained
$CFG->debug = DEBUG_NORMAL;
...
Cheers
Re: I wish to propose an "Calendar Event Reminder"
Hi Lentin,
I hope you have been resolved your problem with the smtp server.It´s strange you have this problem. In my moodle I didn´t have this problem
Regards
Re: I wish to propose an "Calendar Event Reminder"
Re: I wish to propose an "Calendar Event Reminder"
Your welcome Lentin