# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: moodle/lib/db/install.xml
--- moodle/lib/db/install.xml Base (1.280)
+++ moodle/lib/db/install.xml Locally Modified (Based On 1.280)
@@ -778,7 +778,7 @@
       <FIELDS>
         <FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" SEQUENCE="true" NEXT="userid"/>
         <FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" UNSIGNED="true" DEFAULT="0" SEQUENCE="false" PREVIOUS="id" NEXT="name"/>
-        <FIELD NAME="name" TYPE="char" LENGTH="50" NOTNULL="true" SEQUENCE="false" PREVIOUS="userid" NEXT="value"/>
+        <FIELD NAME="name" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" PREVIOUS="userid" NEXT="value"/>
\ No newline at end of file
         <FIELD NAME="value" TYPE="char" LENGTH="255" NOTNULL="true" SEQUENCE="false" PREVIOUS="name"/>
       </FIELDS>
       <KEYS>
Index: moodle/lib/db/upgrade.php
--- moodle/lib/db/upgrade.php Base (1.493)
+++ moodle/lib/db/upgrade.php Locally Modified (Based On 1.493)
@@ -5308,6 +5308,35 @@
         upgrade_main_savepoint(true, 2010101900);
     }
 
+    // MDL-24694 needs increasing size of user_preferences.name(varchar[50]) field due to
+    // long preferences names for messaging which need components parts within the name
+    // eg: 'message_provider_mod_assignment_assignments_loggedin'
+    if ($oldversion < 2010102100) {
+
+        // Define index userid-name (unique) to be dropped form user_preferences
+        $table = new xmldb_table('user_preferences');
+        $index = new xmldb_index('userid-name', XMLDB_INDEX_UNIQUE, array('userid', 'name'));
+
+        // Conditionally launch drop index userid-name
+        if ($dbman->index_exists($table, $index)) {
+            $dbman->drop_index($table, $index);
+        }
+
+        // Changing precision of field name on table user_preferences to (255)
+        $field = new xmldb_field('name', XMLDB_TYPE_CHAR, '255', null, XMLDB_NOTNULL, null, null, 'userid');
+
+        // Launch change of precision for field name
+        $dbman->change_field_precision($table, $field);
+
+        // Conditionally launch add index userid-name
+        if (!$dbman->index_exists($table, $index)) {
+            $dbman->add_index($table, $index);
+        }
+
+        // Main savepoint reached
+        upgrade_main_savepoint(true, 2010102100);
+    }
+
     return true;
 }
 
Index: moodle/mod/assignment/db/messages.php
--- moodle/mod/assignment/db/messages.php No Base Revision
+++ moodle/mod/assignment/db/messages.php Locally New
@@ -0,0 +1,35 @@
+<?php
+
+// This file is part of Moodle - http://moodle.org/
+//
+// Moodle 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.
+//
+// Moodle 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 Moodle.  If not, see <http://www.gnu.org/licenses/>.
+
+/**
+ * Defines message providers (types of messages being sent)
+ *
+ * @package mod-assignment
+ * @copyright  2010 onwards  Aparup Banerjee  http://moodle.com
+ * @license   http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
+ */
+
+$messageproviders = array (
+
+/// Ordinary single forum posts
+    'assignment_updates' => array (
+    )
+
+);
+
+
+
Index: moodle/mod/assignment/lang/en/assignment.php
--- moodle/mod/assignment/lang/en/assignment.php Base (1.23)
+++ moodle/mod/assignment/lang/en/assignment.php Locally Modified (Based On 1.23)
@@ -133,6 +133,7 @@
 $string['maximumgrade'] = 'Maximum grade';
 $string['maximumsize'] = 'Maximum size';
 $string['maxpublishstate'] = 'Maximum visibility for blog entry before due date';
+$string['messageprovider:assignment_updates'] = 'Assignment Notifications';
 $string['modulename'] = 'Assignment';
 $string['modulename_help'] = 'Assignments enable the teacher to specify a task either on or offline which can then be graded.';
 $string['modulenameplural'] = 'Assignments';
Index: moodle/mod/assignment/lib.php
--- moodle/mod/assignment/lib.php Base (1.503)
+++ moodle/mod/assignment/lib.php Locally Modified (Based On 1.503)
@@ -1745,8 +1745,9 @@
                 $eventdata->fullmessagehtml  = $posthtml;
                 $eventdata->smallmessage     = '';
 
-                $eventdata->name       = 'assignment_submitted';
+                $eventdata->name       = 'assignment_updates';
                 $eventdata->component       = 'mod_assignment';
+                $eventdata->notification       = 1;
                 
                 message_send($eventdata);
             }
Index: moodle/mod/assignment/version.php
--- moodle/mod/assignment/version.php Base (1.65)
+++ moodle/mod/assignment/version.php Locally Modified (Based On 1.65)
@@ -5,8 +5,8 @@
 //  This fragment is called by /admin/index.php
 ////////////////////////////////////////////////////////////////////////////////
 
-$module->version  = 2010080300;
-$module->requires = 2010080300;  // Requires this Moodle version
+$module->version  = 2010102100;
+$module->requires = 2010102100;  // Requires this Moodle version
 $module->cron     = 60;
 
 
Index: moodle/version.php
--- moodle/version.php Base (1.1804)
+++ moodle/version.php Locally Modified (Based On 1.1804)
@@ -29,7 +29,7 @@
 
 defined('MOODLE_INTERNAL') || die();
 
-$version = 2010101901;  // YYYYMMDD   = date of the last version bump
+$version = 2010102100;  // YYYYMMDD   = date of the last version bump
                         //         XX = daily increments
 
 $release = '2.0 RC1 (Build: 20101022)';  // Human-friendly version name
