Пример #1
0
 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()
Пример #2
0
 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)
Пример #3
0
 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
Пример #4
0
 def __init__(self, submission):
     super(OpenAssignmentRowUncorrected, self).__init__(submission)
     self.created = get_date_label(submission.assignment.assigned)
Пример #5
0
 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)