Changeset 767
- Timestamp:
- 05/24/11 03:10:30 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
4.0/enpraxis.educommons/trunk/enpraxis/educommons/browser/__init__.py
r764 r767 539 539 parent = self.ecutil.FindECParent(self.context) 540 540 parentType = parent.Type() 541 course_creators = '',542 543 544 if '(course_default)' in self.context.Creators()and parentType == 'Course':541 course_creators = [] 542 creators = self.getFilteredCreators(self.context) 543 544 if '(course_default)' in creators and parentType == 'Course': 545 545 if parent.instructorAsCreator == True: 546 546 cres = parent.instructorName 547 course_creators = cres, 548 for creator in parent.Creators(): 549 course_creators += creator, 550 if len(self.context.Creators()) > 1: 551 course_creators += self.context.Creators()[1:] 552 self._renderList(node, 'dc:creator', course_creators) 547 course_creators = [cres] 548 for creator in self.getFilteredCreators(parent): 549 course_creators.append(creator) 550 if len(creators) > 1: 551 course_creators += creators[1:] 553 552 elif self.context.Type() == 'Course': 554 553 if self.context.instructorAsCreator == True: 555 554 cres = self.context.instructorName 556 course_creators = cres, 557 for creator in self.context.Creators(): 558 course_creators += creator, 559 self._renderList(node, 'dc:creator', course_creators) 560 else: 561 for creator in self.context.Creators(): 562 course_creators += creator, 555 course_creators = [cres] 556 for creator in creators: 557 course_creators.append(creator) 558 else: 559 course_creators = creators 560 if course_creators: 563 561 self._renderList(node, 'dc:creator', course_creators) 564 562 … … 578 576 rights = self.props.DefaultSiteCopyright 579 577 self._createNode(node, 'dc:rights', rights) 578 579 def getFilteredCreators(self, context): 580 creators = context.Creators() 581 filteredlist = [] 582 for x in creators: 583 if x and '@' == x[0]: 584 filteredlist.append(x[1:]) 585 else: 586 filteredlist.append(x) 587 return filteredlist 580 588 581 589 def _renderList(self, node, element, value):
Note: See TracChangeset
for help on using the changeset viewer.
