Ignore:
Timestamp:
13 Nov 2011, 06:13:55 (13 years ago)
Author:
uli
Message:

Update doc strings a bit.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/students/student.py

    r7097 r7099  
    5454            self.student_id = u'Z654321'
    5555        self.password = None
    56        
    5756        return
    5857
     
    145144
    146145class StudentFileNameChooser(grok.Adapter):
    147     """A file id chooser for :class:`Applicant` objects.
    148 
    149     `context` is an :class:`Applicant` instance.
    150 
    151     The :class:`ApplicantImageNameChooser` can build/check file ids
    152     for :class:`Applicant` objects suitable for use with
     146    """A file id chooser for :class:`Student` objects.
     147
     148    `context` is an :class:`Student` instance.
     149
     150    The :class:`StudentImageNameChooser` can build/check file ids for
     151    :class:`Student` objects suitable for use with
    153152    :class:`ExtFileStore` instances. The delivered file_id contains
    154     the file id marker for :class:`Applicant` object and the
    155     registration number or access code of the context applicant. Also
    156     the name of the connected applicant container will be part of the
    157     generated file id.
     153    the file id marker for :class:`Student` object and the student id
     154    of the context student.
    158155
    159156    This chooser is registered as an adapter providing
     
    161158
    162159    File store name choosers like this one are only convenience
    163     components to ease the task of creating file ids for applicant
     160    components to ease the task of creating file ids for student
    164161    objects. You are nevertheless encouraged to use them instead of
    165     manually setting up filenames for applicants.
     162    manually setting up filenames for students.
    166163
    167164    .. seealso:: :mod:`waeup.sirp.imagestorage`
     
    197194
    198195        """
    199         first_character = self.context.student_id[0]
     196        stud_id = self.context.student_id
    200197        marked_filename = '__%s__%s/%s/%s_%s.jpg' % (
    201             STUDENT_FILE_STORE_NAME, first_character,
    202             self.context.student_id, attr, self.context.student_id)
     198            STUDENT_FILE_STORE_NAME, stud_id[0], stud_id, attr, stud_id)
    203199        return marked_filename
    204200
     
    223219
    224220    def pathFromFileID(self, store, root, file_id):
    225         """All applicants images are filed in directory ``applicants``.
     221        """All student files are put in directory ``students``.
    226222        """
    227223        marker, filename, basename, ext = store.extractMarker(file_id)
Note: See TracChangeset for help on using the changeset viewer.