Exemplo n.º 1
0
def Instructor( _id = None, first = None, last = None ):
    global highest_instructor_id

    first = noneSingleGroup( first, rand_name.first(), str )
    last = noneSingleGroup( last, rand_name.last(), str )

    if _id is None:
        highest_instructor_id += int( random.random() * 17 ) + 17
        _id = "%09d" % highest_instructor_id
        highest_instructor_id += int( random.random() * 17 ) + 17

    return _instructor.Instructor( _id = _id, first = first, last = last )
Exemplo n.º 2
0
def Student( _id = None,first = None, last = None ):
    global highest_nshe_id

    first = noneSingleGroup( first, rand_name.first(), str )
    last = noneSingleGroup( last, rand_name.last(), str )

    if _id is None:
        highest_nshe_id += int( random.random() * 17 ) + 17
        _id = highest_nshe_id
        highest_nshe_id += int( random.random() * 17 ) + 17

    student = _student.Student( _id = _id, first = first, last = last )

    return student