def get(self, *args, **kwargs):
     gp, uid = is_loged(self)
     if gp == 's':
         # 判断是否登陆
         cid = get_student_course(uid)
         if not cid:
             # 数据库中没有课程号记录
             self.render('error.html',
                         title=None,
                         content='提交作业要先录入课程号哦',
                         icon='ion-happy',
                         active='',
                         id=uid)
         else:
             self.render('stu_submit_vedio.html',
                         id=uid,
                         active='dsh',
                         active_slide='mcs')
     else:
         self.render('error.html',
                     title=None,
                     content='提交作业要先登陆哦',
                     icon='ion-happy',
                     active='',
                     id=uid)
 def get(self, *args, **kwargs):
     gp, uid = is_loged(self)
     if gp == 's':
         # 判断是否登陆
         cid = get_student_course(uid)
         if not cid:
             # 数据库中没有课程号记录
             self.render('error.html', title=None, content='提交作业要先录入课程号哦', icon='ion-happy', active='', id=uid)
         else:
             self.render('stu_submit_vedio.html', id=uid, active='dsh', active_slide='mcs')
     else:
         self.render('error.html', title=None, content='提交作业要先登陆哦', icon='ion-happy', active='', id=uid)
Exemple #3
0
 def get(self, *args, **kwargs):
     gp, uid = is_loged(self)
     if gp == 's':
         self.render('stu_index.html', id=uid, active='dsh', active_slide='mcs', course=get_student_course(uid))
     elif gp == 't':
         self.render('teacher_index.html', id=uid, active='dsh', active_slide='mycourse',
                     course=get_teacher_course(uid))
     else:
         self.redirect('/404')