Project

General

Profile

Feature #3857

Import glossary items

Added by Bas Wijnen about 8 years ago. Updated over 7 years ago.

Status:
Bug resolved
Priority:
Normal
Category:
-
Target version:
Start date:
31/08/2011
Due date:
% Done:

100%

Estimated time:
Spent time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

Importing a glossary would be very useful. Exporting would be nice as well. I'll work on this soon.


Files

glossary.patch (13.1 KB) glossary.patch Bas Wijnen, 03/09/2011 23:16
Input_file.csv (40.9 KB) Input_file.csv Alain Deschênes, 23/01/2012 02:00
Output_file.csv (112 KB) Output_file.csv Alain Deschênes, 23/01/2012 02:00
glossary_course_TESTGLOSSARY.csv (27.4 KB) glossary_course_TESTGLOSSARY.csv Yoselyn Castillo, 21/05/2012 15:39
glossary_course_01.csv (117 Bytes) glossary_course_01.csv Yoselyn Castillo, 21/05/2012 16:35
1.csv (28.3 KB) 1.csv Yoselyn Castillo, 23/05/2012 14:01

Related issues

Related to Chamilo LMS - Bug #4758: glossaire csv export with international chars do not workBug resolved16/05/2012

Actions

Associated revisions

Revision 97e37179 (diff)
Added by Julio Montoya over 7 years ago

Glossary Adding import/export to CSV added by Bas Wijnen + changing ifs with a switch see #3857

Revision 4d6c1cdd (diff)
Added by Julio Montoya over 7 years ago

typo fixed see #3857

Revision 1f932c8b (diff)
Added by Julio Montoya over 7 years ago

More fixes in the glossary tool see #3857

History

#1

Updated by Bas Wijnen about 8 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.

#2

Updated by Bas Wijnen about 8 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.

#3

Updated by Alain Deschênes over 7 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

#4

Updated by Julio Montoya over 7 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

http://code.google.com/p/chamilo/source/detail?r=1a7fd2c13bec426bff482b3d2d03621332ad2d57&repo=classic

#5

Updated by Juan Carlos Raña Trabado over 7 years ago

Ojo la herramienta ahora no deja añadir nuevas entradas mediante el editor al glosario

#6

Updated by Alain Deschênes over 7 years ago

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

#7

Updated by Julio Montoya over 7 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:

http://code.google.com/p/chamilo/source/detail?r=3abfe4c94057863806f5a3df7a731f65cb3a7726&repo=classic

#8

Updated by Julio Montoya over 7 years ago

  • % Done changed from 80 to 70
#9

Updated by Yannick Warnier over 7 years ago

  • Assignee set to Yoselyn Castillo

Por revisar.

#10

Updated by Yannick Warnier over 7 years ago

  • Target version changed from 1.9 Stable to 1.9 Beta
#11

Updated by Yoselyn Castillo over 7 years ago

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

#12

Updated by Laurent Opprecht over 7 years ago

  • Assignee changed from Yoselyn Castillo to Laurent Opprecht
#13

Updated by Yoselyn Castillo over 7 years ago

Importacion funciona correctamente probado con el file adjunto

#14

Updated by Laurent Opprecht over 7 years ago

  • Assignee changed from Laurent Opprecht to Yoselyn Castillo

Should work now.

#15

Updated by Yoselyn Castillo over 7 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)

#16

Updated by Laurent Opprecht over 7 years ago

  • Assignee changed from Laurent Opprecht to Yoselyn Castillo

Should work now.

#17

Updated by Yoselyn Castillo over 7 years ago

  • Status changed from Assigned to Bug resolved

Fixed.

#18

Updated by Yoselyn Castillo over 7 years ago

  • % Done changed from 70 to 100

Also available in: Atom PDF