def __init__(self, announcement): self.message = escape( announcement.message ) # need to escape because user might have entered html tags self.timestamp = get_date_label(announcement.timestamp) self.source = announcement.get_source_label() self.target = announcement.get_target_label()
def __init__(self, submission, assignment_average): super(OpenAssignmentRowCorrected, self).__init__(submission) self.marks = Link(get_average_label(submission.marks), UrlNames.SUBMISSION_ID.name, submission.pk) self.average = get_percentage_label(assignment_average) self.assignment_id = submission.assignment.pk self.submitted = get_date_label(submission.assignment.due)
def __init__(self, graded_assignment): self.date = get_date_label(graded_assignment.due) self.topic = graded_assignment.assignmentQuestionsList.get_title() self.assignment_id = graded_assignment.pk
def __init__(self, submission): super(OpenAssignmentRowUncorrected, self).__init__(submission) self.created = get_date_label(submission.assignment.assigned)
def __init__(self, submission): super(PracticeAssignmentRow, self).__init__(submission) self.subject = submission.assignment.assignmentQuestionsList.subject.name self.marks = Link(get_average_label(submission.marks), UrlNames.SUBMISSION_ID.name, submission.pk) self.created = get_date_label(submission.assignment.assigned)