I am lookingh for the same feature, now the teacher doesn't know, when a student uploads a new file
Do you have a solution yet?
If you just cant wait for 1.5...:
Here is what I did to get email notifications whenever assignments were submitted. Quick and not very clean, but it works well for me. It even tells me which course and which assignment... Do this (AFTER YOU MAKE BACKUPS OF YOUR ORIGINAL FILES, OF COURSE..!) :
In config.php add the following 3 variables anywhere in the file, using your own email address info, of course...:
// $adminemail is where you want the assignment notifications to go
$adminmail = "admin@mymoodle.org";
//$fromemail is whatever you want in the from line in the notifications
$fromemail = "noreply@mymoodle.org";
//$subject is whatever you want in the subject line
$subject = "MOODLE Lesson Submission";
Then in /mod/assignment/upload/php about line 75 find the following two lines:
if (insert_record("assignment_submissions", $newsubmission)) {
print_heading(get_string("uploadsuccess", "assignment", $newfile_name) );
ADD these three lines immedately after and before the "} else {" line
// Notify the admin a submission is made
$message = "Assignment Submitted: $course->shortname: $assignment->name";
$temp = mail( $adminmail, $subject, $message, "From: " . $fromemail) or print "Could not send mail.";
You can modify the $message line if you want to say whatever you like, there are more variables that could be used! That is it, whenever an assignment is uploaded, then an email will be sent to the address in your config.php file.
RDB
This is all excellent information. Thank you to both you and Darren for the responses. Very helpful!
I haven't had the chance to look at the code just yet, but how possible would it be to use a variable to grab the instructor's e-mail, rather than having it all get lumped and sent to the admin?