Exemple #1
0
 def save(self, **kw):
     u = Grade(totalPoint=kw['totalPoint'],
               point=kw['point'],
               courseId=kw['courseId'],
               courseName=kw['courseName'],
               techerId=kw['techerId'],
               techerNumber=kw['techerNumber'],
               techerName=kw['techerName'],
               stuId=kw['stuId'],
               stuNumber=kw['stuNumber'],
               stuName=kw['stuName'],
               time=self._nowTime())
     u.save()
Exemple #2
0
 def save(self, **kw):
     u = Grade(totalPoint=kw['totalPoint'], point=kw['point'], courseId=kw['courseId'], courseName=kw['courseName'], 
         techerId=kw['techerId'], techerNumber=kw['techerNumber'], techerName=kw['techerName'],
         stuId=kw['stuId'], stuNumber=kw['stuNumber'], stuName=kw['stuName'],
         time=self._nowTime())
     u.save()
Exemple #3
0
durga = User.objects.create_user('durga', '*****@*****.**', 'thomas')
durga.groups.add(teacher_users)
durga.save()

#Copy and paste everything above into a manage.py shell session

course1  = Course(title="course 1", slug="course-1", description="description", teacher=bob)
course1.save()

week_from_today = datetime.timedelta(days=7)
sample_due_date = datetime.date.today() + week_from_today
assignment1 = Assignment(name="assignment 1",
                         slug="assignment-1",
                         description="Assignment 1 description",
                         #due_date=datetime.datetime(2012, 7, 31, 5, 0, tzinfo=<UTC>),
                         due_date=sample_due_date,
                         teacher=bob,
                         course=course1)
assignment1.save()

grade1 = Grade(letter_grade="A",course=course1,assignment=assignment1)
grade1.save()