123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- class Backend:
- pass
- class Course:
- pass
- class AssignmentGrade:
- def __init__(self, name, grade):
- self.name = name
- self.grade = grade
- class CategoryGrade:
- def __init__(self, name, weight, grades):
- self.name = name
- self.weight = weight
- self.grades = grades
- @property
- def mean(self):
- accumulator = 0
- for grade in self.grades:
- accumulator += grade.grade
- return accumulator / len(self.grades)
- class Resource:
- def __init__(self, name):
- self.name = name
- class ResourceRawHTML(Resource):
- def __init__(self, name, html):
- self.name = name
- self.html = html
- class ResourceCategory(Resource):
- def __init__(self, name, children, contents):
- self.name = name
- self.children = children
- self.contents = contents
- class Task:
- def __init__(self, name, due_date):
- self.name = name
- self.due_date = due_date
- class FileUpload:
- def __init__(self, id, name):
- self.id = id
- self.name = name
- class Quiz:
- def __init__(self, id, name):
- self.id = id
- self.name = name
- class MultipleChoiceQuestion:
- def __init__(self, prompt, responses):
- self.prompt = prompt
- self.responses = responses
- self.response = None
- class FreeResponseQuestion:
- def __init__(self, text):
- self.text = text
- self.response = ""
- class Forum:
- def __init__(self, id, name):
- self.id = id
- self.name = name
- class Post:
- def __init__(self, author, body, replies):
- self.author = author
- self.body = body
- self.replies = replies
|