--- /home/dan/tmp/cvs/moodle/lib/dmllib.php	2007-12-04 17:29:35.000000000 +0000
+++ dmllib.php	2007-12-05 16:10:03.000000000 +0000
@@ -723,7 +723,7 @@
             /// End of DIRTY HACK
                 $record[$firstcolumn->name] = $key;/// Re-add the assoc field
                 if ($debugging && array_key_exists($key, $objects)) {
-                    debugging("Did you remember to make the first column something unique in your call to get_records? Duplicate value '$key' found in column '$firstcolumn'.", DEBUG_DEVELOPER);
+                    debugging("Did you remember to make the first column something unique in your call to get_records? Duplicate value '$key' found in column '".$firstcolumn->name."'.", DEBUG_DEVELOPER);
                 }
                 $objects[$key] = (object) $record; /// To object
             }
@@ -738,7 +738,7 @@
                 }
             /// End of DIRTY HACK
                 if ($debugging && array_key_exists($record[$firstcolumn->name], $objects)) {
-                    debugging("Did you remember to make the first column something unique in your call to get_records? Duplicate value '$key' found in column '$firstcolumn'.", DEBUG_DEVELOPER);
+                    debugging("Did you remember to make the first column something unique in your call to get_records? Duplicate value '".$record[$firstcolumn->name]."' found in column '".$firstcolumn->name."'.", DEBUG_DEVELOPER);
                 }
                 $objects[$record[$firstcolumn->name]] = (object) $record; /// The key is the first column value (like Assoc)
             }
