Index: mod/assignment/type/upload/assignment.class.php
===================================================================
--- mod/assignment/type/upload/assignment.class.php	(revision 119)
+++ mod/assignment/type/upload/assignment.class.php	(working copy)
@@ -1041,7 +1041,11 @@
         $mform->addHelpButton('var3', 'hideintro', 'assignment');
         $mform->setDefault('var3', 0);
 
-        $mform->addElement('select', 'emailteachers', get_string('emailteachers', 'assignment'), $ynoptions);
+        // CMDL-1629 Additional option to send email confirmation for late assignment submissions (REQ0033173)
+        $options = array( 0 => get_string('no'), 1 => get_string('allsubmissions', "assignment"), 2 => get_string('latesubmissions', "assignment"));
+        //$mform->addElement('select', 'emailteachers', get_string("emailteachers", "assignment"), $ynoptions);
+        $mform->addElement('select', 'emailteachers', get_string("emailteachers", "assignment"), $options);
+        // end CMDL-1629
         $mform->addHelpButton('emailteachers', 'emailteachers', 'assignment');
         $mform->setDefault('emailteachers', 0);
 
Index: mod/assignment/lang/en/assignment.php
===================================================================
--- mod/assignment/lang/en/assignment.php	(revision 119)
+++ mod/assignment/lang/en/assignment.php	(working copy)
@@ -31,6 +31,9 @@
 $string['allownotes_help'] = 'If enabled, students may enter notes into a text area, as in an online text assignment.';
 $string['allowresubmit'] = 'Allow resubmitting';
 $string['allowresubmit_help'] = 'If enabled, students will be allowed to resubmit assignments after they have been graded (for them to be re-graded).';
+// CMDL-1629 Additional option to send email confirmation for late assignment submissions (REQ0033173)
+$string['allsubmissions'] = 'All submissions';
+// end CMDL-1629
 $string['alreadygraded'] = 'Your assignment has already been graded and resubmission is not allowed.';
 $string['assignmentdetails'] = 'Assignment details';
 $string['assignment:exportownsubmission'] = 'Export own submission';
@@ -88,9 +91,14 @@
 for <i>\'{$a->assignment}\'  at {$a->timeupdated}</i><br /><br />
 It is <a href="{$a->url}">available on the web site</a>.';
 $string['emailteachers'] = 'Email alerts to teachers';
-$string['emailteachers_help'] = 'If enabled, teachers receive email notification whenever students add or update an assignment submission.
+// CMDL-1629 Additional option to send email confirmation for late assignment submissions (REQ0033173)
+$string['emailteachers_help'] = 'If \'All submissions\' is enabled, then teachers are alerted with a short email whenever students
+   add or update an assignment submission. If \'Late submissions\' is enabled then teachers
+   only recieve an email alert whenever students
+   add or update an assignment submission AFTER the due date.
 
 Only teachers who are able to grade the particular assignment are notified. So, for example, if the course uses separate groups, teachers restricted to particular groups won\'t receive notification about students in other groups.';
+// end CMDL-1629
 $string['emptysubmission'] = 'You have not submitted anything yet';
 $string['enablenotification'] = 'Send notifications';
 $string['enablenotification_help'] = 'If enabled, students will be notified when their assignment submissions are graded.';
@@ -134,6 +142,9 @@
 $string['itemstocount'] = 'Count';
 $string['lastgrade'] = 'Last grade';
 $string['late'] = '{$a} late';
+// CMDL-1629 Additional option to send email confirmation for late assignment submissions (REQ0033173)
+$string['latesubmissions'] = 'Late submissions';
+// end CMDL-1629
 $string['maximumgrade'] = 'Maximum grade';
 $string['maximumsize'] = 'Maximum size';
 $string['maxpublishstate'] = 'Maximum visibility for blog entry before due date';
Index: mod/assignment/lib.php
===================================================================
--- mod/assignment/lib.php	(revision 119)
+++ mod/assignment/lib.php	(working copy)
@@ -1894,6 +1894,12 @@
         if (empty($this->assignment->emailteachers)) {          // No need to do anything
             return;
         }
+        // CMDL-1629 Additional option to send email confirmation for late assignment submissions (REQ0033173)
+        if ($this->assignment->emailteachers == 2               // We only email for late submissions
+                & $submission->timemodified <= $this->assignment->timedue) {
+            return;
+        }
+        // end CMDL-1629
 
         $user = $DB->get_record('user', array('id'=>$submission->userid));
 
