Beispiel #1
0
    def get(self, username="******"):
        obj = {}
        student_query = Student.query(ancestor=student_key(
            key=username)).order(Student.student_nr)
        students = student_query.fetch(1)

        schedules = None
        data = []
        obj = {"start": "10.30", "chamber": "h.05.002", "vak": "ANL05"}

        self.response.write(json.dumps(obj))
Beispiel #2
0
    def get(self,username):
        time = None
        date = None
        student_query = Student.query(
            ancestor=student_key(key=username)).order(Student.student_nr)
        students = student_query.fetch(1)

        for student in students:
            time = student.last_edit_time
            date = student.last_edit_date

        response = {'date':date, 'time': time}
        self.response.write(json.dumps(response))
Beispiel #3
0
    def get(self, username="******"):
        obj = {}
        student_query = Student.query(
            ancestor=student_key(key=username)).order(Student.student_nr)
        students = student_query.fetch(1)

        schedules = None
        data = []
        obj = {"start": "10.30", "chamber": "h.05.002", "vak": "ANL05" }



        self.response.write(json.dumps(obj))
Beispiel #4
0
    def get(self, username):
        time = None
        date = None
        student_query = Student.query(ancestor=student_key(
            key=username)).order(Student.student_nr)
        students = student_query.fetch(1)

        for student in students:
            time = student.last_edit_time
            date = student.last_edit_date

        response = {'date': date, 'time': time}
        self.response.write(json.dumps(response))
Beispiel #5
0
    def get(self, username="******"):
        student_query = Student.query(
            ancestor=student_key(key=username)).order(Student.student_nr)
        students = student_query.fetch(1)

        data = []
        # Get student
        for student in students:
            # Get schedule
            for grade_list in student.grade_list:
                grade_listt = grade_list.get()
                item = grade_listt.grades
                vak_code = grade_listt.vak_code
                grades = grade_listt.grades.get()
                grade = grades.grades
                data.append(vak_code)
                obj = {'vak_code': vak_code, 'grade': 7}

        self.response.write(json.dumps(obj))
Beispiel #6
0
    def get(self, username="******"):
        student_query = Student.query(ancestor=student_key(
            key=username)).order(Student.student_nr)
        students = student_query.fetch(1)

        data = []
        # Get student
        for student in students:
            # Get schedule
            for grade_list in student.grade_list:
                grade_listt = grade_list.get()
                item = grade_listt.grades
                vak_code = grade_listt.vak_code
                grades = grade_listt.grades.get()
                grade = grades.grades
                data.append(vak_code)
                obj = {'vak_code': vak_code, 'grade': 7}

        self.response.write(json.dumps(obj))
Beispiel #7
0
    def post(self):
        username = self.request.get("username")
        password = self.request.get("password")
        regId = self.request.get("regId")

        student_query = Student.query(ancestor=student_key(
            key=username)).order(Student.student_nr)
        students = student_query.fetch(1)
        logging.info(students)
        if students:
            logging.info("student bestaat al")
        else:
            # call the crawler api for injecting the user to the crawler
            logging.info(username)
            logging.info(password)

            student = Student(parent=student_key(key=username),
                              student_nr=username,
                              password=password,
                              registration_id=regId)
            student.put()
Beispiel #8
0
    def post(self):
        username = self.request.get("username")
        password = self.request.get("password")
        regId = self.request.get("regId")

        student_query = Student.query(
            ancestor=student_key(key=username)).order(Student.student_nr)
        students = student_query.fetch(1)
        logging.info(students)
        if students:
            logging.info("student bestaat al")
        else:
            # call the crawler api for injecting the user to the crawler
            logging.info(username)
            logging.info(password)

            student = Student(
                parent=student_key(key=username),
                student_nr=username,
                password=password,
                registration_id=regId
            )
            student.put()