How to add subcategory to old categories without the duplicates?
- moosh version: 0.23
- moodle version: 3.1
- database: MySQL 5.5.52
- php version: 5.6.24
- operating system: Debian 8
Actual behaviour
I have exported course category list from Moodle with command: moosh category-export 0
The XML file has structure
<categories>
<category oldid='1' idnumber='Miscellaneous' name='Miscellaneous'>
<category oldid='7' name='ABC'></category>
<category oldid='8' name='DEF'></category>
</category>
</categories>
Where Miscellaneous is the parent-category and ABC and DEF are subcategories. Now when I want to add new subcategory called HIJ
<categories>
<category oldid='1' idnumber='Miscellaneous' name='Miscellaneous'>
<category oldid='7' name='ABC'></category>
<category oldid='8' name='DEF'></category>
<category oldid='9' name='HIJ'></category>
</category>
</categories>
Then when I import the xml file to Moodle with moosh category-import categor-to-import.xml every course category expected the HIJ is duplicated in Moodle. So after the export the category list looks like this:
Miscellaneous ABC DEF Miscellaneous ABC DEF HIJ
It seems that category oldid= doesn't do anything.
Expected behaviour
I wish that only new subcategory
Steps to reproduce
See beginning of this message
Anybody?