| Conditions | 4 |
| Total Lines | 16 |
| Code Lines | 15 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | # future: report false positive to JetBrains developers |
||
| 22 | def __str__(self) -> str: |
||
| 23 | text = f"== {self.text} ==" |
||
| 24 | if self.illustration: |
||
| 25 | text += "\n[[Fájl:.png|keret|keretnélküli|500x500px]]" |
||
| 26 | ordered_correct_answers = list(self.correct_answers) |
||
| 27 | ordered_correct_answers.sort() |
||
| 28 | text += ( |
||
| 29 | f"\n{{{{kvízkérdés|típus={self.q_type.value}" |
||
| 30 | f"|válasz={",".join([str(answer) for answer in ordered_correct_answers])}" |
||
| 31 | ) |
||
| 32 | if self.grading: |
||
| 33 | text += f"|pontozás={self.grading}" |
||
| 34 | text += "}}" |
||
| 35 | for answer in self.answers: |
||
| 36 | text += f"\n# {answer.replace("\n", " ")}" |
||
| 37 | return text |
||
| 38 | |||
| 51 |