def viewContributionRatio(self): if not self.viewsExists: return None return float(CourseStats.getNumForumViews()) / float( CourseStats.getNumContributions())
def viewContributionRatio(self): if not self.viewsExists: return None return float(CourseStats.getNumForumViews())/float(CourseStats.getNumContributions())
def numContributionsPerLectureActive(self): return float(CourseStats.getNumContributions()) / float( len(self.lectureActivesByAnon))
def numContributionsPerLectureActive(self): return float(CourseStats.getNumContributions()) / float(len(self.lectureActivesByAnon))