Ignore:
Timestamp:
27 May 2014, 12:50:03 (10 years ago)
Author:
uli
Message:

Fix problems revealed by test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/webservices.py

    r11668 r11671  
    233233    def get_student_fingerprints(self, identifier=None):
    234234        """Returns student fingerprint data if available.
     235
     236        Result set is a dictionary with entries for ``email``,
     237        ``firstname``, ``lastname``, ``img``, ``img_name``, and
     238        ``fingerprints``.
     239
     240        Here ``img`` and ``img_name`` represent a photograph of the
     241        student (binary image data and filename
     242        respectively).
     243
     244        ``fingerprints`` is a dictionary itself with possible entries
     245        ``1`` to ``10``, containing binary minutiae data
     246        (i.e. fingerprint scans).
    235247        """
    236248        students = self.context['students']
     
    253265                img_name=os.path.basename(img.name))
    254266
    255 
    256267        for num in [str(x + 1) for x in range(10)]:
    257             fp_file = getUtility(IExtFileStore).getFileByContext(
     268            fp_file = file_store.getFileByContext(
    258269                student, attr='%s.fpm' % num)
    259270            if fp_file is not None:
    260                 result.append(xmlrpclib.Binary(fp_file.read()))
     271                result['fingerprints'][num] = xmlrpclib.Binary(fp_file.read())
    261272        return result
Note: See TracChangeset for help on using the changeset viewer.