Beispiel #1
0
 def start_checkin_form(self, tec_id):
     print "********  自助考勤菜单  *********"
     # 获取教师选择的课头
     select_courseid = self.select_courseid(tec_id)
     if select_courseid:
         print "开始对课头" + select_courseid + "自助考勤"
         # 进入自助考勤功能模块
         tec_start = TecStartCheckInControl()
         COURSEFILENAME = "../internal/courseProgress.csv"
         STUFILENAME = "../internal/studentInfo.csv"
         SEQFILENAME = "../outputdemo/seq.csv"
         # 实例考勤对象考勤
         cii = CheckInInfo(self.tecid, select_courseid, COURSEFILENAME, STUFILENAME, SEQFILENAME)
         tec_start.tec_start_checkin(cii, SEQFILENAME)
     else:
         print "开启失败,未选择课头"
Beispiel #2
0
            # 写入detail文件
            self.add_to_detail(part_stus_detail, checker, "../outputdemo/")
        else:
            print "请先开启自助考勤"


if __name__ == "__main__":
    # 抽查演示
    t = TecSampleCheckInControl()
    TECID = "2004643"
    COURSEID = "51610145"
    COURSEFILENAME = "../internal/courseProgress.csv"
    STUFILENAME = "../internal/studentInfo.csv"
    SEQFILENAME = "../outputdemo/seq.csv"
    # 实例考勤对象考勤
    cii = CheckInInfo(TECID, COURSEID, COURSEFILENAME, STUFILENAME)
    print cii.stuids
    a_arry = [cii]
    # 在考勤队列中到到考勤对象的学生集合,
    check_stuids = t.get_checkin_stuids(TECID, a_arry)
    if check_stuids:
        print check_stuids
        # 抽取部分学生
        part_stuids = t.get_part_stuids(check_stuids, 5)
        print part_stuids
        # 初始化抽点信息
        part_stus_detail = []
        for a_stuid in part_stuids:
            part_stus_detail.append(t.set_new_detail_line(a_stuid, cii, "zt"))
        print part_stus_detail
        # 写入detail文件
Beispiel #3
0

if __name__ == "__main__":
    c = CheckInArray()
    print c
    TECID = "2004001"
    COURSEID = "51610101"
    COURSEFILENAME = "../internal/courseProgress.csv"
    STUFILENAME = "../internal/studentInfo.csv"
    SEQFILENAME = "../outputdemo/seq.csv"
    # (tec_id, course_id, course_filename, stu_filename, seq_filename)

    CIIARRY = []
    # 处理同教师开开两课
    print "开始考勤1"
    now_cii = CheckInInfo(TECID, COURSEID, COURSEFILENAME, STUFILENAME,
                          SEQFILENAME)
    now_cii.section = 1

    if c.update_arry(now_cii, CIIARRY):
        print "1succeed"
    else:
        print "1false"
    #
    print "开始考勤2"
    TECID = "2004001"
    COURSEID = "51610101"
    now_cii2 = CheckInInfo(TECID, COURSEID, COURSEFILENAME, STUFILENAME,
                           SEQFILENAME)
    now_cii2.section = 2

    if c.update_arry(now_cii2, CIIARRY):
Beispiel #4
0
            else:
                print "别闹!没有这个选项。"

            to_end = raw_input("是否退出学生菜单? Y:是 任意键:否 :")
            if to_end == "Y":
                print "退出学生菜单"
                break
            else:
                pass


if __name__ == "__main__":
    # 模拟教师发起考勤
    TECID = "2004001"
    COURSEID = "51610101"
    COURSEFILENAME = "../internal/courseProgress.csv"
    STUFILENAME = "../internal/studentInfo.csv"
    SEQFILENAME = "../outputdemo/seq.csv"
    DEFAULTPATH = "../outputdemo/"
    STUID = "201516920101"
    cii = CheckInInfo(TECID, COURSEID, COURSEFILENAME, STUFILENAME,
                      SEQFILENAME)
    cii.seqid = "3"
    ini = IniInfo()
    # ini.List.append(cii)
    print cii.tecid, cii.courseid, cii.seqid, cii.classnames, cii.stuids

    s = StuForm("201516920101")
    s.stu_form()