Adding multiple words in a glossary into a category all at once (batch processing)

Adding multiple words in a glossary into a category all at once (batch processing)

por Davi DePaula -
Number of replies: 2

I have a 500-word glossary built in the front page that do not have a category assigned to it. I'd like to add all 500 words in the glossary into a new category called TV production.

I know how to do this individually but I'm trying to avoid doing this individually for all 500 words since it would take a long time.

Does anyone have any suggestion on how to tackle this?

I thought about exporting the glossary to a xml file and editing the file manually and accessing the database directly but these methods would also take some time.

I appreciate any suggestions.

 

I'm running Moodle 2.5 on a LAMP server.

 

Thank you.  

Average of ratings: -
In reply to Davi DePaula

Re: Adding multiple words in a glossary into a category all at once (batch processing)

por Sakshi Goel -

Hi Davi

You can add one or two entries in your glossary after that export the entries. You will get a glossary to xml file. Then copy the 1 entry and paste it multiple times only you need to change the 'concept' and definition field. But the file does not include the category name. It is not shown under one category. i think assigning term to a category have to be done manually.

Average of ratings:Useful (1)
In reply to Sakshi Goel

Re: Adding multiple words in a glossary into a category all at once (batch processing)

por Davi DePaula -

Thank you for the suggestion Sakshi> I ended up doing the following to add a category called "TV production" to all 500+ words in the glossary.

1- Created a category called "TV Production".

2- Edited one of the entries so it would be under the newly created category.

3- Exported the entire glossary to an xml file

4- Opened the xml file and used the find and replace function on Notepad++  to find the close entry tag and replace with the category and the closing entry tag like so:

FInd: 

</ENTRY>

Replace with:

<CATEGORIES>
 <CATEGORY>
  <NAME>Television Production</NAME>
 </CATEGORY>
</CATEGORIES>
</ENTRY>

5- Then I uploaded the XML file to a new glossary and done. sorrisa

Average of ratings:Useful (1)