Feature #3857
Import glossary items
Description
Importing a glossary would be very useful. Exporting would be nice as well. I'll work on this soon.
Files
Related issues
History
Updated by Bas Wijnen over 9 years ago
- File glossary.patch glossary.patch added
- Status changed from New to Needs more info
- Assignee deleted (
Bas Wijnen) - % Done changed from 0 to 80
Here's a patch to implement import and export as CSV. It includes a csv library which turns an array into a csv string and vice versa. I'll use that code in the course progress import/export as well. It uses the CSV "definition" of wikipedia, which means it writes commas and accepts both commas and semicolons.
A problem with excel: depending on the locale it accepts commas or semicolons as separators. It is impossible to write a csv file which all localizations of excel will understand. Now I don't have excel and can't test that anyway, but I suppose this is a pity for some people. The export function might be improved by outputting the correct separator for the locale, or perhaps this should be a setting somewhere.
Feedback is welcome.
Updated by Bas Wijnen over 9 years ago
- Status changed from Needs more info to Assigned
- Assignee set to Bas Wijnen
It works for me (with the new csv lib from the course progress patch), but replacing the glossary doesn't work in a session. It does work outside a session. I'll have to look into that.
Updated by Alain Deschênes about 9 years ago
Is-it possible to add this feature in 1.9 ?
A lot of time, we have glossary in a file (225 items for example ...)
Thanks,
Alain
Updated by Julio Montoya about 9 years ago
- Status changed from Assigned to Needs more info
- Assignee deleted (
Bas Wijnen)
hello guys thanks for posting this,
I'm adding this in Chamilo 1.9 requires testing
i'm using the import/export classes that we use in chamilo everywhere
Updated by Juan Carlos Raña Trabado about 9 years ago
Ojo la herramienta ahora no deja añadir nuevas entradas mediante el editor al glosario
Updated by Alain Deschênes about 9 years ago
- File Input_file.csv Input_file.csv added
- File Output_file.csv Output_file.csv added
Hi Julio,
I've tried it on 1.9 and the import is working well with a lot of terms into the course AD 2012.
May be, you should specify the file format for csv import's file.
And after import, I've tried to export it and it is working except for two things -
Get a look on two attached files samples
1- Codage of output (I'm not sure if it is UTF-8 because accents are not ok)
2 - The file format is not the same as the input.... and you will found html code at the bottom of the file.
Thanks,
Alain
Updated by Julio Montoya about 9 years ago
Juan Carlos Raña wrote:
Ojo la herramienta ahora no deja añadir nuevas entradas mediante el editor al glosario
Fixed due a typo:
Updated by Julio Montoya about 9 years ago
- % Done changed from 80 to 70
Some fixes added:
term;definition line added in the CSV file
Updated by Yannick Warnier almost 9 years ago
- Target version changed from 1.9 Stable to 1.9 Beta
Updated by Yoselyn Castillo almost 9 years ago
- File glossary_course_TESTGLOSSARY.csv glossary_course_TESTGLOSSARY.csv added
- % Done changed from 70 to 50
Al exportar el glsario se genera un fichero como este que se adjunta, que no tiene el formato correcto cvs
Al tratar de importar el fichero input_file.csv que tiene formato correcto sale el sgt error
Fatal error: Call to a member function reset() on a non-object in /var/www/chamilodev.beeznest.com/www/main/inc/lib/system/io/file_reader.class.php on line 160 Call Stack: 0.0017 808864 1. {main}() /var/www/chamilodev.beeznest.com/www/main/glossary/index.php:0 1.3090 56339576 2. CsvReader->rewind() /var/www/chamilodev.beeznest.com/www/main/inc/lib/system/io/csv_reader.class.php:0 5.2781 77224472 3. FileReader->rewind() /var/www/chamilodev.beeznest.com/www/main/inc/lib/system/io/csv_reader.class.php:147
Updated by Laurent Opprecht almost 9 years ago
- Assignee changed from Yoselyn Castillo to Laurent Opprecht
Updated by Yoselyn Castillo almost 9 years ago
- File glossary_course_01.csv glossary_course_01.csv added
- % Done changed from 50 to 70
Importacion funciona correctamente probado con el file adjunto
Updated by Laurent Opprecht almost 9 years ago
- Assignee changed from Laurent Opprecht to Yoselyn Castillo
Should work now.
Updated by Yoselyn Castillo almost 9 years ago
- File 1.csv 1.csv added
- Status changed from Needs more info to Assigned
- Assignee changed from Yoselyn Castillo to Laurent Opprecht
In http://chamilodev.beeznest.com, Importing process works fine but exporting process continues generating a bad file such as this(1.csv)
Updated by Laurent Opprecht over 8 years ago
- Assignee changed from Laurent Opprecht to Yoselyn Castillo
Should work now.
Glossary Adding import/export to CSV added by Bas Wijnen + changing ifs with a switch see #3857