def on_gen_table():
name = self.controller.state['student']
- rows = [DataEditModel.Record.DISPLAY_NAMES] + self.controller.data[name]
+ head = list(DataEditModel.Record.DISPLAY_NAMES)
+ head.insert(5, "Score (Comp)")
+ def with_composite(record):
+ new = list(record)
+ new.insert(5, round(record.overall_score(), 1))
+ return new
+ rows = [head] + list(map(with_composite, self.controller.data[name]))
data = json.dumps(rows).encode('utf-8')
server = AsyncHttpServer(57853, data)
server.start()