You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

28 lines
771 B

# coding=utf-8
import os
import datetime
import django
import sys
sys.path.append("/var/www/projects/lms/")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lms.settings")
django.setup()
from __migrate.post_fixtures import show_progress
from journals.models import HomeworkJ, LessonJ, TeacherJ
from access.models import User
from courses.models import Course
_now = 0
big_len = TeacherJ.objects.all().count()
show_progress(big_len, _now)
for journal in TeacherJ.objects.all():
for hj in HomeworkJ.objects.filter(student=journal.student):
if hj.get_status_flag() != 'N':
for lj in LessonJ.objects.filter(student=journal.student, material__theme=hj.material.theme):
lj.saw_this()
_now += 1
show_progress(big_len, _now)