示例#1
14
 def get(self, hid):
     gp, uid = is_loged(self)
     if gp == 't':
         h = get_homework(hid)
         comment = html2Text(h['comment'])
         self.render('teacher_cmt_homework.html', id=uid, active='dsh', active_slide='cmt', hid=hid, comment=comment)
     else:
         self.redirect('/404')
示例#2
0
 def get(self, hid):
     gp, uid = is_loged(self)
     if gp == 't':
         h = get_homework(hid)
         comment = html2Text(h['comment'])
         self.render('teacher_cmt_homework.html',
                     id=uid,
                     active='dsh',
                     active_slide='cmt',
                     hid=hid,
                     comment=comment)
     else:
         self.redirect('/404')
示例#3
-28
    def get(self, infoId, *args, **kwargs):
        gp, uid = is_loged(self)

        if gp == 't':
            info = get_info(infoId)
            content = html2Text(info['detail'])
            title = info['t‎itle']

            self.render('teacher_publish_resource.html', id=uid, active='dsh', active_slide='ntfc', r_title=title,
                        r_content=content, act='edit')
        else:
            self.redirect('/404')