### Eclipse Workspace Patch 1.0
#P 19stable
Index: mod/assignment/lib.php
===================================================================
RCS file: /cvsroot/moodle/moodle/mod/assignment/lib.php,v
retrieving revision 1.277.2.47
diff -u -r1.277.2.47 lib.php
--- mod/assignment/lib.php	16 Feb 2009 13:09:01 -0000	1.277.2.47
+++ mod/assignment/lib.php	1 May 2009 00:48:13 -0000
@@ -1894,7 +1894,7 @@
         $status = array();
 
         $typestr = get_string('type'.$this->type, 'assignment');
-
+		// TODO: check to handle non-core assignment types (see assignment_get_types function)
         if (!empty($data->reset_assignment_submissions)) {
             $assignmentssql = "SELECT a.id
                                  FROM {$CFG->prefix}assignment a
@@ -2818,6 +2818,9 @@
     $names = get_list_of_plugins('mod/assignment/type');
     foreach ($names as $name) {
         $types[$name] = get_string('type'.$name, 'assignment');
+        if ($types[$name] == '[[type'.$name.']]') { // if the type was not found check if it is a plugin
+            $types[$name] = get_string('type'.$name, 'assignment_'.$name);
+        } 
     }
     asort($types);
     return $types;
@@ -3006,7 +3009,7 @@
             $type = new object();
             $type->modclass = MOD_CLASS_ACTIVITY;
             $type->type = "assignment&amp;type=$assignmenttype";
-            $type->typestr = get_string("type$assignmenttype", 'assignment');
+            $type->typestr = get_string("type$assignmenttype", 'assignment_'.$assignmenttype);
             $types[] = $type;
         }
     }
