Project

General

Profile

Bug #6680

Users insertion in Class though CSV didn't work anymore

Added by David Auzeine about 8 years ago. Updated over 7 years ago.

Status:
Bug resolved
Priority:
Normal
Assignee:
-
Category:
Classes
Target version:
Start date:
07/09/2013
Due date:
24/04/2014
% Done:

100%

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

Description

The example file (CSV or XML) don't have the field 'ClassName' anymore: it existed before 1.9.0 and was very useful to register hundreds of users in their class in one click...
I checked /main/admin/user_import.php, but couldn't find where to add the field.

Associated revisions

Revision 8786296f (diff)
Added by Yoselyn Castillo almost 8 years ago

Adding users to class when importing csv -refs #6680

Revision d04a4a6e (diff)
Added by Yoselyn Castillo almost 8 years ago

some fixes -refs #6680

Revision fc013418 (diff)
Added by Yoselyn Castillo almost 8 years ago

Fixing code conventions details -refs #6680

Revision 92be1618 (diff)
Added by Yoselyn Castillo almost 8 years ago

Fixing indentation -refs #6680

Revision 21d32bf0 (diff)
Added by Yoselyn Castillo almost 8 years ago

Fixing indentation -refs #6680

Revision 1e3b364c (diff)
Added by baelmyhu over 7 years ago

Create new users cvs directly in class (usergroup) -ref #6680

Revision fe86a643 (diff)
Added by baelmyhu over 7 years ago

Insert user csv in platform in a class (usergroup) with class id - ref #6680

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

Adding ClassId support when importing users see #6680

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

Adding id when exporting classes see #6680

Revision 67356021
Added by Yannick Warnier over 7 years ago

Merge pull request #260 from baelmyhu/1.9.x

Insert user csv in class & file main/css/default_scorm.css refs #6680 and refs #6976

History

#1

Updated by Yoselyn Castillo about 8 years ago

  • Status changed from New to Assigned
  • Assignee set to Yoselyn Castillo

checking this...

#2

Updated by Yoselyn Castillo about 8 years ago

  • % Done changed from 0 to 70
#3

Updated by Yoselyn Castillo almost 8 years ago

  • Status changed from Assigned to Needs testing
#4

Updated by Yannick Warnier almost 8 years ago

  • Assignee deleted (Yoselyn Castillo)
#5

Updated by Hubert Borderiou almost 8 years ago

Hi,
I put a field ClassName at the end of the sample csv file we can download

LastName;FirstName;Email;UserName;Password;AuthSource;OfficialCode;PhoneNumber;Status;Courses;ClassName
Mcfly;Marty;marty@example.com;marty;secret;platform;12345678;001-123-456-789;user;COURSE1|COURSE2|COURSE3;plop
Brown;Emmert;drbrown@example.net;emmert;;platform;;;teacher;COURSE2;plop

I always have the error

    Ce nom de classe n'est pas disponible: marty (Marty Mcfly)
    Ce nom de classe n'est pas disponible: emmert (Emmert Brown)

Moreover, I dont think we should use the ClassName.
We should use the Class ID.
Because the ClassName may contain characters " or ' or ; ...

It works if I use the sample csv file

LastName;FirstName;Email;UserName;Password;AuthSource;OfficialCode;PhoneNumber;Status;Courses
Mcfly;Marty;marty@example.com;marty;secret;platform;12345678;001-123-456-789;user;COURSE1|COURSE2|COURSE3
Brown;Emmert;drbrown@example.net;emmert;;platform;;;teacher;COURSE2

#6

Updated by Yannick Warnier almost 8 years ago

Feel free to change it to classId, but then you have to show that ID somewhere visible for the people who can upload these CSV (in the class list and detail pages, show the id somewhere).

#7

Updated by Yannick Warnier over 7 years ago

  • Category set to Classes
  • Status changed from Needs testing to Assigned
  • Assignee set to Hubert Borderiou
  • Priority changed from High to Normal
  • % Done changed from 70 to 50

We need some kind of closure here. The current fix is not enough and there are missing visual pieces to fix the item mentionned by Hubert.

#8

Updated by Hubert Borderiou over 7 years ago

  • Status changed from Assigned to Needs testing
  • Assignee deleted (Hubert Borderiou)

Add functionnality to insert users in the platform with csv registerd in class (usergrou) with class ID
You can see ClassId in the Classes amin tool.

Done in https://github.com/baelmyhu/chamilo-lms/commit/fe86a6434406eecc8592e59b94e397df28447bd8

#9

Updated by Yannick Warnier over 7 years ago

  • Assignee set to Julio Montoya

Assigning to Julio for review

#10

Updated by Julio Montoya over 7 years ago

  • Assignee deleted (Julio Montoya)

When you add a user to a class (usergroup) you're registering the user to the session and courses automatically (that's the idea of using a class).

So instead of using the new custom "$usergroup->addUser()" the function that should be use is "$usergroup->subscribe_users_to_usergroup()".

I sent this change:

https://github.com/chamilo/chamilo-lms/commit/6199ea8f714afa2746d49408eb36f034d12e2d54

#11

Updated by Yannick Warnier over 7 years ago

Will be closed in 5 days, assuming it is fixed if no negative feedback comes in before then.

#12

Updated by Yannick Warnier over 7 years ago

  • Due date set to 24/04/2014
#13

Updated by Yannick Warnier over 7 years ago

  • Status changed from Needs testing to Bug resolved
  • % Done changed from 50 to 100

Also available in: Atom PDF