diff -r e31414fd3b2a -r 157f6b8de010 app/soc/views/models/student_project.py --- a/app/soc/views/models/student_project.py Sat Apr 25 20:50:48 2009 +0200 +++ b/app/soc/views/models/student_project.py Sat Apr 25 20:52:03 2009 +0200 @@ -200,6 +200,26 @@ 'status': 'active'} fields['mentor'] = mentor_logic.logic.getForFields(filter, unique=True) + def _public(self, request, entity, context): + """Adds the names of all additional mentors to the context. + + For params see base.View._public() + """ + + additional_mentors = entity.additional_mentors + + if not additional_mentors: + context['additional_mentors'] = [] + else: + mentor_names = [] + + for mentor_key in additional_mentors: + additional_mentor = mentor_logic.logic.getFromKeyName( + mentor_key.id_or_name()) + mentor_names.append(additional_mentor.name()) + + context['additional_mentors'] = ', '.join(mentor_names) + @decorators.merge_params @decorators.check_access def manage(self, request, access_type,