qas_editor/quiz.py
def write_xml(self, file_path: str, pretty_print: bool=False):
        """Generates XML compatible with Moodle and saves to a file.

        Args:
            file_path (str): filename where the XML will be saved
            pretty_print (bool, optional): (not implemented) saves XML pretty printed. Defaults to False.
        """
        quiz: et.ElementTree = et.ElementTree(et.Element("quiz"))
        root = quiz.getroot()
        self._to_xml_element(root)
        if pretty_print:
            self._indent(root)
        quiz.write(file_path, encoding="utf-8", xml_declaration=True, short_empty_elements=True)
Generates XML compatible with Moodle and saves to a file.

        Args:
            file_path (str): filename where the XML will be saved
            pretty_print (bool, optional): (not implemented) saves XML pretty printed. Defaults to False.
        
Generates XML compatible with Moodle and saves to a file.
Generates XML compatible with Moodle and saves to a file .
def write_xml(self, file_path: str, pretty_print: bool=False):
        quiz: et.ElementTree = et.ElementTree(et.Element("quiz"))
        root = quiz.getroot()
        self._to_xml_element(root)
        if pretty_print:
            self._indent(root)
        quiz.write(file_path, encoding="utf-8", xml_declaration=True, short_empty_elements=True)
def write_xml ( self , file_path : str , pretty_print : bool = False ) : quiz : et . ElementTree = et . ElementTree ( et . Element ( "quiz" ) ) root = quiz . getroot ( ) self . _to_xml_element ( root ) if pretty_print : self . _indent ( root ) quiz . write ( file_path , encoding = "utf-8" , xml_declaration = True , short_empty_elements = True )
Generates XML compatible with Moodle and saves to a file.
Generates XML compatible with Moodle and saves to a file .
"""Generates XML compatible with Moodle and saves to a file.

        Args:
            file_path (str): filename where the XML will be saved
            pretty_print (bool, optional): (not implemented) saves XML pretty printed. Defaults to False.
        """
self
file_path
str
filename where the XML will be saved
filename where the XML will be saved
pretty_print
bool
(not implemented) saves XML pretty printed. Defaults to False.
( not implemented ) saves XML pretty printed . Defaults to False .
False