From 37d8c8e30f554f40b5c90f479d199c7975a94b75 Mon Sep 17 00:00:00 2001 From: Hartmut Seichter Date: Thu, 9 Nov 2023 19:33:00 +0100 Subject: [PATCH] update to grid-table generator --- coursebuilder/__main__.py | 10 +++++----- test/simple/mod.interactsys.yaml | 23 ++++++++++++++--------- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/coursebuilder/__main__.py b/coursebuilder/__main__.py index 2065554..68e96f2 100644 --- a/coursebuilder/__main__.py +++ b/coursebuilder/__main__.py @@ -51,15 +51,15 @@ class MarkdownGenerator: h = textwrap.wrap(k, h_len, break_long_words=False) wrapper = textwrap.TextWrapper(d_len) - # t = [wrapper.wrap(line) for line in v.split('\n')] # if line != '' - # t = list(itertools.chain.from_iterable(t)) - + # split test to wrap lines into correct length t = [wrapper.wrap(line) for line in v.split('\n')] + # replace empty arrays from split with a empty string t = list(map(lambda e: [""] if e == [] else e, t)) + + # zip items of list t = list(itertools.chain.from_iterable(t)) - - + # get rows rows = list(itertools.zip_longest(h,t,fillvalue="")) diff --git a/test/simple/mod.interactsys.yaml b/test/simple/mod.interactsys.yaml index 4849091..d8efd55 100644 --- a/test/simple/mod.interactsys.yaml +++ b/test/simple/mod.interactsys.yaml @@ -42,13 +42,18 @@ goal: content: de: | + Inhalte: + * Wahrnehmung * Visuelle Gestaltung von Graphischen Nutzerschnittstellen * Applikationsdesign mit Fokus auf GUI Konzepte * Nutzerstudien * Evaluierungsmethoden mit interaktiven Systemen * Statistikmethoden für UX-Design + en: | + Content: + * visual perception * design of graphical user interfaces * application design with focus on GUI concepts @@ -58,15 +63,15 @@ content: media-of-instruction: de: | - H5P Lernmodule, Lernforum und Übungen am PC - - Auszug aus der Literaturliste: - - * Card, Stuart K., Thomas P. Moran, and Allen Newell. The Psychology of Human-Computer Interaction. Repr. Mahwah, NJ: Erlbaum, 2008. - * Cooper, Alan. About Face: The Essentials of Interaction Design, 4th Edition. 4th edition. Indianapolis, IN: John Wiley and Sons, 2014. - * Dix, Alan, Janet Finlay, Gregory D Abowd, and Russell Beale. Human-Computer Interaction. Pearson Education, 2003 - * Krug, Steve. Don't Make Me Think, Revisited: A Common Sense Approach to Web Usability. Third edition. Berkeley, Calif.: New Riders, 2014. - * Nielsen, Jakob. Usability Engineering. Boston: Academic Press, 1993. + H5P Lernmodule, Lernforum und Übungen am PC + + Auszug aus der Literaturliste: + + * Card, Stuart K., Thomas P. Moran, and Allen Newell. The Psychology of Human-Computer Interaction. Repr. Mahwah, NJ: Erlbaum, 2008. + * Cooper, Alan. About Face: The Essentials of Interaction Design, 4th Edition. 4th edition. Indianapolis, IN: John Wiley and Sons, 2014. + * Dix, Alan, Janet Finlay, Gregory D Abowd, and Russell Beale. Human-Computer Interaction. Pearson Education, 2003 + * Krug, Steve. Don't Make Me Think, Revisited: A Common Sense Approach to Web Usability. Third edition. Berkeley, Calif.: New Riders, 2014. + * Nielsen, Jakob. Usability Engineering. Boston: Academic Press, 1993. en: | H5P learing modules, lerning forum and exersises