Index: main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py	(revision 14011)
+++ main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py	(revision 14012)
@@ -257,8 +257,10 @@
     """A school grade entry.
     """
+
     subject = schema.Choice(
         title = _(u'Subject'),
         source = SubjectSource(),
         )
+
     grade = schema.Choice(
         title = _(u'Grade'),
@@ -276,4 +278,6 @@
     """A referee entry.
     """
+    email_sent = Attribute('True if email has been sent')
+
     name = schema.TextLine(
         title = _(u'Name'),
@@ -281,4 +285,5 @@
         description = _(u'Name'),
         )
+
     email = schema.ASCIILine(
         title = _(u'Email Address'),
Index: main/waeup.kofa/trunk/src/waeup/kofa/refereeentries.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/refereeentries.py	(revision 14011)
+++ main/waeup.kofa/trunk/src/waeup/kofa/refereeentries.py	(revision 14012)
@@ -40,5 +40,5 @@
     email = FieldProperty(IRefereeEntry['email'])
 
-    def __init__(self, name=None, email=None):
+    def __init__(self, name=None, email=None, email_sent=False):
         super(RefereeEntry, self).__init__()
         if name is not None:
@@ -46,4 +46,7 @@
         if email is not None:
             self.email = email
+        self.email_sent = email_sent
+        if not email_sent == True:
+            self.email_sent = False
         return
 
@@ -68,7 +71,8 @@
         """A string representation that can be used in exports.
 
-        Returned is a unicode string of format ``(u'<NAME>',u'<EMAIL>')``.
+        Returned is a unicode string of format
+        ``(u'<NAME>','<EMAIL>',<EMAILSENT>)``.
         """
-        return unicode((self.name, self.email))
+        return unicode((self.name, self.email, self.email_sent))
 
     @classmethod
@@ -85,7 +89,7 @@
         i.e. use the `RefereeEntry` class, not an instance thereof.
         """
-        string = string.replace("u''", "None")
-        name, email = eval(string)
-        return cls(name, email)
+        string = string.replace("u''", "None").replace("''", "None")
+        name, email, email_sent = eval(string)
+        return cls(name, email, email_sent)
 
 
Index: main/waeup.kofa/trunk/src/waeup/kofa/tests/test_refereeentries.py
===================================================================
--- main/waeup.kofa/trunk/src/waeup/kofa/tests/test_refereeentries.py	(revision 14012)
+++ main/waeup.kofa/trunk/src/waeup/kofa/tests/test_refereeentries.py	(revision 14012)
@@ -0,0 +1,111 @@
+# Tests for schoolgrades module.
+import unittest
+from zope.component import getGlobalSiteManager
+from zope.interface.verify import verifyObject, verifyClass
+from zope.schema.interfaces import ConstraintNotSatisfied, WrongType
+from waeup.kofa.interfaces import (
+    IRefereeEntry, IRefereeEntryField, IKofaUtils, NotAnEmailAddress)
+from waeup.kofa.refereeentries import RefereeEntry, RefereeEntryField
+from waeup.kofa.utils.utils import KofaUtils
+
+
+class RefereeEntryTests(unittest.TestCase):
+
+    def setUp(self):
+        self.valid_name = u'Otis Stone'
+        self.valid_email = 'otis@stones.de'
+        return
+
+    def tearDown(self):
+        return
+
+    def test_ifaces(self):
+        # make sure we implement the promised interfaces
+        obj = RefereeEntry()
+        verifyObject(IRefereeEntry, obj)
+        verifyClass(IRefereeEntry, RefereeEntry)
+        return
+
+    def test_init(self):
+        # we can pass initial values
+        item1 = RefereeEntry()
+        item2 = RefereeEntry(self.valid_name, self.valid_email)
+        self.assertTrue(item1.name is None)
+        self.assertTrue(item1.email is None)
+        self.assertEqual(item2.name, self.valid_name)
+        self.assertEqual(item2.email, self.valid_email)
+        self.assertFalse(item1.email_sent)
+        self.assertFalse(item2.email_sent)
+        return
+
+    def test_illegal_value(self):
+        # we do not accept wrong values
+        item = RefereeEntry()
+        self.assertRaises(
+            WrongType, RefereeEntry, 'invalid', 'invalid')
+        self.assertRaises(
+            WrongType, RefereeEntry, 'invalid')
+        self.assertRaises(
+            WrongType, setattr, item, 'name', 99)
+        self.assertRaises(
+            NotAnEmailAddress, setattr, item, 'email', 'blah')
+        return
+
+    def test_to_string(self):
+        # the string representation is handy for export
+        item1 = RefereeEntry()
+        item2 = RefereeEntry(self.valid_name, self.valid_email)
+        self.assertEqual(item1.to_string(), u"(None, None, False)")
+        self.assertEqual(item2.to_string(), u"(u'%s', '%s', False)" % (
+            self.valid_name, self.valid_email))
+        return
+
+    def test_from_string(self):
+        # we can create new result entries based on strings
+        myinput = u"(u'%s','%s',True)" % (
+            self.valid_name, self.valid_email)
+        item1 = RefereeEntry.from_string(myinput)
+        item2 = RefereeEntry.from_string(u"(u'','',999)")
+        item3 = RefereeEntry.from_string(u"(None, None, False)")
+        self.assertEqual(item1.name, self.valid_name)
+        self.assertEqual(item1.email, self.valid_email)
+        self.assertTrue(item1.email_sent is True)
+        self.assertTrue(item2.name is None)
+        self.assertTrue(item2.email is None)
+        self.assertTrue(item2.email_sent is False)
+        self.assertTrue(item3.name is None)
+        self.assertTrue(item3.email is None)
+        self.assertTrue(item3.email_sent is False)
+        return
+
+    def test_eq(self):
+        # we can compare equality of RefereeEntry objects
+        item1 = RefereeEntry(self.valid_name, self.valid_email)
+        item2 = RefereeEntry(self.valid_name, self.valid_email)
+        item3 = RefereeEntry()
+        item4 = RefereeEntry()
+        assert item1 is not item2
+        assert item1 == item1
+        assert item1 == item2
+        assert item3 is not item4
+        assert item3 == item4
+        assert item1.__eq__(item2) is True
+        assert item1.__eq__(item3) is False
+
+    def test_ne(self):
+        # we can also tell, which ResultEntries are _not_ equal
+        item1 = RefereeEntry(self.valid_name, self.valid_email)
+        item2 = RefereeEntry()
+        assert item1 != item2
+        assert item1.__ne__(item2) is True
+        assert item1.__ne__(item1) is False
+
+
+class RefereeEntryFieldTests(unittest.TestCase):
+
+    def test_ifaces(self):
+        # make sure we implement the promised interfaces.
+        obj = RefereeEntryField()
+        verifyObject(IRefereeEntryField, obj)
+        verifyClass(IRefereeEntryField, RefereeEntryField)
+        return
