Exemple #1
0
def student_list():
    # 검색어를 추출한다.
    stu_name = request.args.get('stu_name')
    # 학생 정보 리스트를 가져온다.
    stu_list = db.get_student_list(stu_name)

    html = render_template('student_list.html', data_list=stu_list)
    return html
Exemple #2
0
 def generate_scores(self, student):
     self.student_list = database.get_student_list()
     self.by_words_spelt = sorted(self.student_list, 
                                  key=operator.itemgetter(5))
     self.by_words_correct = sorted(self.student_list, 
                                    key=operator.itemgetter(6))
     self.by_percent_correct = sorted(self.student_list,
                                      key=operator.itemgetter(8))
     for l in ([self.by_words_spelt, self.by_words_correct,
                self.by_percent_correct]):
         l.reverse()
     self.student_ratings = [(self.by_words_spelt.index(self.student)+1),
                             (self.by_words_correct.index(self.student)+1),
                             (self.by_percent_correct.index(self.student)+1)]
Exemple #3
0
 def __init__(self, master):
     self.master = master
     Frame.__init__(self, self.master, background="skyblue")
     self.list_of_students = database.get_student_list()
     self.create_widgets()