Project

General

Profile

Bug #4071

CSV import problem with classes

Added by Yannick Warnier almost 8 years ago. Updated over 7 years ago.

Status:
Bug resolved
Priority:
High
Assignee:
Category:
-
Target version:
Start date:
25/11/2011
Due date:
% Done:

100%

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

Description

The CSV import still uses the old classes code, I think. See http://www.chamilo.org/forum/viewtopic.php?p=10807#p10807

The CSV import should check the class name in the new table.

Associated revisions

Revision 378324ad (diff)
Added by Julio Montoya over 7 years ago

Fixing queries in the classmanager.lib.php (adding intvals, escape_string), adding breadcrumb and some icons see #4071

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

Adding export, import in usergroups see #4071

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

Add users to usergroup via CSV see #4071

Revision 40e76a7a (diff)
Added by Julio Montoya over 7 years ago

Adding migration: from class to usergroup see #4071

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

Always showing the session box in the platform settings because we are moving the old classes code to the new usergroup code see #4071

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

Minor removing var_dump see #4071

Revision 814ca5b4 (diff)
Added by Julio Montoya over 7 years ago

Adding messages see #4071

History

#1

Updated by Yannick Warnier over 7 years ago

  • Priority changed from Normal to High
#2

Updated by Julio Montoya over 7 years ago

  • Status changed from Assigned to Needs more info
  • Assignee deleted (Julio Montoya)
  • % Done changed from 0 to 50

I sent some fixes it should work now

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

what do you mean with "The CSV import still uses the old classes code"?

which is the new/old class?

Right now the code is using the Import::csv_to_array() that also includes api_to_system_encoding(), and api_fgetcsv

#3

Updated by Yannick Warnier over 7 years ago

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

Updated by Michela Mosquera over 7 years ago

By "the old", Yannick means the class system that was previously used when the sessions were not used. By "the new", he means the classes that are now used (that you developed) in combination with the sessions ("user groups" I think).

Technically, the "old" classes tables content should be migrated to the "new" classes content, but it is out of the scope of this task.

#5

Updated by Michela Mosquera over 7 years ago

The "old" class feature should disappear completely with time, but in order to do that we should offer a CSV import in the "new" class feature (usergroups).

Is it much work to add the CSV import to the admin/usergroups.php script?

#6

Updated by Julio Montoya over 7 years ago

the old class code can't be deleted right now(I wanted to deleted before) but Hubert (hborderiou) and other people still use it .. If the new "class" (usergroup) has all the feature of the old class then we can do a migration script (in a new task)

#7

Updated by Yannick Warnier over 7 years ago

Julio Montoya wrote:

the old class code can't be deleted right now(I wanted to deleted before) but Hubert (hborderiou) and other people still use it .. If the new "class" (usergroup) has all the feature of the old class then we can do a migration script (in a new task)

There's a task for Aix-Mar that should allow you to write that one and maybe still do another improvement: mix the social groups structure with the classes. Please take some time to review this because I think it makes a lot of sense (see Guillaume's explanation about this).

#8

Updated by Yannick Warnier over 7 years ago

  • Status changed from Needs more info to Assigned
  • Assignee set to Julio Montoya
  • Target version changed from 1.9 Beta to 1.9 RC1

Recover the CSV import/export feature of the classes.

#9

Updated by Julio Montoya over 7 years ago

  • Status changed from Assigned to Needs more info
  • Assignee deleted (Julio Montoya)
  • Target version changed from 1.9 RC1 to 1.9 Beta
#10

Updated by Julio Montoya over 7 years ago

  • % Done changed from 50 to 80

Migration was added from old classes to the new usergroup,

#11

Updated by Yannick Warnier over 7 years ago

You underestimated the task here, I think :-)
The idea is to allow for the students directly into a class (but the bit you've added is already a first step).

Please add a possibility to import a list of users into a class:

class_name;user_ids
Class A45;2|3|4
Class B32;2|6|8

Currently, there is still a print_r() of the CSV contents, but I can't see where it's coming from.

The "export" feature exports both CSV and XML format into the same (CSV) file and only exports the name (not the description).

In the meantime, I have added an example CSV file for the import of classes.

#12

Updated by Julio Montoya over 7 years ago

I think that I already added that but in a different way (like in the old class code) see this page:

main/admin/usergroup_user_import.php

This is the format

UserName;ClassName
jdoe;class01
adam;class01

Yannick Warnier wrote:

You underestimated the task here, I think :-)
The idea is to allow for the students directly into a class (but the bit you've added is already a first step).

Please add a possibility to import a list of users into a class:
[...]

Currently, there is still a print_r() of the CSV contents, but I can't see where it's coming from.

The "export" feature exports both CSV and XML format into the same (CSV) file and only exports the name (not the description).

In the meantime, I have added an example CSV file for the import of classes.

#13

Updated by Julio Montoya over 7 years ago

var_dump also was removed

#14

Updated by Yannick Warnier over 7 years ago

  • Status changed from Needs more info to Bug resolved
  • Assignee set to Julio Montoya
  • % Done changed from 80 to 100

...then I'm OK

Also available in: Atom PDF