I'm not sure why, but we currently don't support importing from the Moodle XML format. I've committed some code to add it as an option in the import dialog. Since it uses the same import library the others do, I expect it to work but don't have time to test it.

If you want Moodle XML importing, please report your experiences here.

Comments

srikanthlogic’s picture

Thanks, I would test it out and post my feedback, I hope commit #340716 is the only required to do this. I would just take that instead of taking the whole dev.

srikanthlogic’s picture

<question type="multichoice">
    <name>
      <text>Some Q Title</text>
    </name>
    <questiontext format="html">
      <text>Some Q Text</text>
    </questiontext>
    <image></image>
    <generalfeedback>
      <text></text>
    </generalfeedback>
    <defaultgrade></defaultgrade>
    <penalty></penalty>
    <hidden></hidden>
    <shuffleanswers>0</shuffleanswers>
    <single>false</single>
    <shuffleanswers>false</shuffleanswers>
    <correctfeedback>
      <text></text>
    </correctfeedback>
    <partiallycorrectfeedback>
      <text></text>
    </partiallycorrectfeedback>
    <incorrectfeedback>
      <text></text>
    </incorrectfeedback>
    <answernumbering></answernumbering>
  </question>

This was the result of "Export" Moodle XML of an existing quiz.The output was a quiz XML with several questions. Wonder where the answer tags gone missing. Or was that because i had score_chosen differently set for each option (incl negative marking ?) and it was not of the "fraction" form. Can someone else also confirm if this is a bug during export?

I tried export since i wanted to know the entire schema and Moodle site said, do an export of existing quiz to know more about additional tags like penalty (which i would want badly). But i guess, here too for multichoice the scoring is done through *fraction* (like 100 , 50 ) and not actually "score_if_chosen" i guess. Let me try out manual XML which i would test soon and post the results.

falcon’s picture

Assigned: Unassigned » turadg

@turadg: What do you think we should do with this one? (I hope you have the time to handle the import/export issues until we release Quiz 4... :) )

turadg’s picture

Status: Active » Fixed

srikanthlogic, have you had any trouble with *importing* from Moodle XML? I'd like to keep that as the scope of this ticket.

If you have found bugs in the *export* of Moodle XML, please file reports on those bugs.

srikanthlogic’s picture

turadg, I tried importing but got a PHP exception posted below.

Fatal error: require_once() [function.require]: Failed opening required '/xmlize.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/quiz77/modules/quiz/includes/moodle/question/format/xml/format.php on line 13

Do I need to install PEAR for this, i tried doing apt-get, but since i am using ubuntu 7.04 i guess i may not get the packages. Any idea as to how to fix it. Otherwise i would try it out in my personal PC and would post it, but that would take sometime.

Export still fails. I have tested once more. Created an issue #783960: Export to Moodle XML doesnt export choices for multichoice questions.
Thanks.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.