Changeset 9b1abd2 in flexograder for scripts/import3.py


Ignore:
Timestamp:
12/16/25 16:28:34 (4 months ago)
Author:
Enrico Schwass <ennoausberlin@…>
Branches:
fake-data, main, master
Children:
1a60982
Parents:
a14c6b0
Message:

fix some subtype issues, support png rendering via tk.PhotoImage and remove pillow - rename type to mtype attribute for media items

File:
1 edited

Legend:

Unmodified
Added
Removed
  • scripts/import3.py

    ra14c6b0 r9b1abd2  
    8686                    "answers": {},
    8787                    "domain": current_domain,
    88                     "topic": current_topic,
    89                     "subtopic": current_subtopic,
     88                    "topic": current_topic["title"] if current_topic is not None else None,
     89                    "subtopic": current_subtopic["title"] if current_subtopic is not None else None,
    9090                }
    9191                continue
     
    110110    # ---- Print results for debugging ----
    111111
    112     print(domains)
    113 
    114112    for q in questions:
    115113        options = [
     
    118116        ]
    119117        if not options:
    120             print(f"Warning: {q['qid']} has no answer options — inserting placeholder.")
     118            print(f"Warning: {q['qid']} has no answer options — inserting placeholder.")
    121119            options = [AnswerOption(id="A", text="(keine Antwortoptionen gefunden)")]
    122120        else:
     
    126124                                                      text=q["text"],
    127125                                                      topic=q["topic"],
    128                                                       subtopic=["subtopic"],
     126                                                      subtopic=q["subtopic"],
    129127                                                      options=options)
    130128        question_catalog.add_questions([current])
Note: See TracChangeset for help on using the changeset viewer.