Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.2
    • Component/s: Administration, Groups
    • Labels:
    • Database:
      MySQL
    • Testing Instructions:
      Hide

      1/ create user upload csv file with cohort1, cohort2, ... column
      2/ add user row with nun-numeric cohort idnumber string
      3/ add user row with numeric cohort id integer
      4/ verify cohorts were uploaded properly

      Show
      1/ create user upload csv file with cohort1, cohort2, ... column 2/ add user row with nun-numeric cohort idnumber string 3/ add user row with numeric cohort id integer 4/ verify cohorts were uploaded properly
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w27_MDL-26965_m22_cohortuploaduser

      Description

      Allocating users to a cohort looks very manual and intensive atm - unless I've missed something. Can the ability to add to a cohort for new and existing users be added to the upload user options?

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            ray Ray Lawrence added a comment -

            Added Helen, Carl and Petr as watchers

            Show
            ray Ray Lawrence added a comment - Added Helen, Carl and Petr as watchers
            Hide
            tsala Helen Foster added a comment -

            Ray, thanks for your suggested improvement. I'm definitely voting for it!

            Show
            tsala Helen Foster added a comment - Ray, thanks for your suggested improvement. I'm definitely voting for it!
            Hide
            kimpark Kimberly Park added a comment -

            Agreed, just voted for it, hope we can get some more votes!

            Show
            kimpark Kimberly Park added a comment - Agreed, just voted for it, hope we can get some more votes!
            Hide
            alex.buchner Alex Büchner added a comment -

            And while we are at it, can we also add batch upload to the user context, so schools don't have to assign 2000 parent roles for 1000 pupils manually?

            Show
            alex.buchner Alex Büchner added a comment - And while we are at it, can we also add batch upload to the user context, so schools don't have to assign 2000 parent roles for 1000 pupils manually?
            Hide
            marycooch Mary Cooch added a comment -

            +1 for Alex's comment above!

            Show
            marycooch Mary Cooch added a comment - +1 for Alex's comment above!
            Hide
            ray Ray Lawrence added a comment -

            Bump. Any thoughts on this. 25 votes.

            Show
            ray Ray Lawrence added a comment - Bump. Any thoughts on this. 25 votes.
            Hide
            benreynolds Ben Reynolds added a comment -

            Alex asks for the long awaited. Is there a tracker issue for that request? I'll vote for it every day

            Show
            benreynolds Ben Reynolds added a comment - Alex asks for the long awaited. Is there a tracker issue for that request? I'll vote for it every day
            Hide
            lazydaisy Mary Evans added a comment -

            All you need now is some wiz-kid to get this implemented!

            Show
            lazydaisy Mary Evans added a comment - All you need now is some wiz-kid to get this implemented!
            Hide
            neogic B Johnson added a comment -

            +1. Cohort is generally lacking support in the Moodle UI, despite it being a powerful and important feature (i.e., only way to create site-wide groups of users).

            Related needed features: filtering Configurable Reports by Cohort and filtering Bulk User Actions by Cohort, plus discussion at MDL-26612.

            BTW - looks like this issue is duplicated by [MDL-22405 http://tracker.moodle.org/browse/MDL-22405] - probably merge? The comments seem to indicate this is slated for fixing in v2.0.4.

            Show
            neogic B Johnson added a comment - +1. Cohort is generally lacking support in the Moodle UI , despite it being a powerful and important feature (i.e., only way to create site-wide groups of users). Related needed features: filtering Configurable Reports by Cohort and filtering Bulk User Actions by Cohort , plus discussion at MDL-26612 . BTW - looks like this issue is duplicated by [MDL-22405 http://tracker.moodle.org/browse/MDL-22405] - probably merge? The comments seem to indicate this is slated for fixing in v2.0.4.
            Hide
            skodak Petr Skoda added a comment - - edited

            Note to integrators - I wish we already moved to separate admin/tool plugins with own lang packs because I do not like polluting error and admin lang packs.

            Edit: I have moved the strings to cohort pack.

            Show
            skodak Petr Skoda added a comment - - edited Note to integrators - I wish we already moved to separate admin/tool plugins with own lang packs because I do not like polluting error and admin lang packs. Edit: I have moved the strings to cohort pack.
            Hide
            ray Ray Lawrence added a comment -

            Does the arbitrary upload limit of 5 apply here too? (As with courses, if so why?)
            There is no mention of a cohort short name in testing instructions.
            Would it be better to have a cohort unique shortname for the upload and retain the ID field for external references so that cohort enrolments can be made from an external database that has another reference.

            Show
            ray Ray Lawrence added a comment - Does the arbitrary upload limit of 5 apply here too? (As with courses, if so why?) There is no mention of a cohort short name in testing instructions. Would it be better to have a cohort unique shortname for the upload and retain the ID field for external references so that cohort enrolments can be made from an external database that has another reference.
            Hide
            skodak Petr Skoda added a comment -

            what kind of limit is that? Do you know issue number for that?

            Show
            skodak Petr Skoda added a comment - what kind of limit is that? Do you know issue number for that?
            Hide
            skodak Petr Skoda added a comment -

            Having both unique shortname and idnumber is problematic because you then do not know which one to sync - everybody thinks we should use something different. I wish we used only idnumbers for that everywhere.

            Show
            skodak Petr Skoda added a comment - Having both unique shortname and idnumber is problematic because you then do not know which one to sync - everybody thinks we should use something different. I wish we used only idnumbers for that everywhere.
            Hide
            ray Ray Lawrence added a comment -

            1. "what kind of limit is that? Do you know issue number for that?" There has been a long-standing limit of:
            Max. 5 course enrolments per upload.
            Max. 1 group per course.

            Have these been removed?

            2. There's a well established principle of shortnames being unique in moodle e.g. courses, profile field. ID number fields don't require a (Moodle) unique entry iirc (but should probably be unique in the referencing system).

            3. If there is only an ID field this could be unique in Moodle and serve as a suitable reference for this new upload facility. But having an ID field only that must use a Moodle unique reference breaks the existing convention established in courses i.e. shortname and optional ID field.

            Show
            ray Ray Lawrence added a comment - 1. "what kind of limit is that? Do you know issue number for that?" There has been a long-standing limit of: Max. 5 course enrolments per upload. Max. 1 group per course. Have these been removed? 2. There's a well established principle of shortnames being unique in moodle e.g. courses, profile field. ID number fields don't require a (Moodle) unique entry iirc (but should probably be unique in the referencing system). 3. If there is only an ID field this could be unique in Moodle and serve as a suitable reference for this new upload facility. But having an ID field only that must use a Moodle unique reference breaks the existing convention established in courses i.e. shortname and optional ID field.
            Hide
            skodak Petr Skoda added a comment - - edited

            1. one group/role per course is expected limit because it is using the ending numbers to match groups to courses, I doubt this can be changed; the course limit should not be there though, please file new issue for that

            2. I do not think this breaks consistency because there is nothing like that in the rest of our codebase - the most related thing are groups but they do not have any short names or idnumbers. In fact 'unique' group names in mysql sometimes create big headaches for non-english languages such as Czech, if we decide to change something we should probably make groups look more like cohorts instead of the opposite. Anyway feel free to discuss it elsewhere, my opinion is not the final decision. Oh, there is one major difference between groups and cohorts - you can mostly force course unique group names because they are inside one course only, but in case of cohorts you might want to create the same cohort names in different course categories - we do not require them to be unique in moodle internals because we use their ids - the idnumber is used when interacting with external systems which is exactly the case of csv upload...

            Edit: sorry for the confusions, I meant cohorts instead of groupings, I have fixed it above

            Show
            skodak Petr Skoda added a comment - - edited 1. one group/role per course is expected limit because it is using the ending numbers to match groups to courses, I doubt this can be changed; the course limit should not be there though, please file new issue for that 2. I do not think this breaks consistency because there is nothing like that in the rest of our codebase - the most related thing are groups but they do not have any short names or idnumbers. In fact 'unique' group names in mysql sometimes create big headaches for non-english languages such as Czech, if we decide to change something we should probably make groups look more like cohorts instead of the opposite. Anyway feel free to discuss it elsewhere, my opinion is not the final decision. Oh, there is one major difference between groups and cohorts - you can mostly force course unique group names because they are inside one course only, but in case of cohorts you might want to create the same cohort names in different course categories - we do not require them to be unique in moodle internals because we use their ids - the idnumber is used when interacting with external systems which is exactly the case of csv upload... Edit: sorry for the confusions, I meant cohorts instead of groupings, I have fixed it above
            Hide
            ray Ray Lawrence added a comment -

            1. Group/role. Agreed. Course limit issue coming up - removal of this will make a big difference.

            2. Groupings: Not needed as they are a collection of course groups.

            3. Where this breaks consistency is with courses (IMO). Courses have a unique internal name (shortname). Courses have an ID field, that is not mandatory, that facilitates the linking of a course with a separate identifier in another system. This is useful for external enrolments.

            Cohorts are supposed to be a mechanism to support course enrolments. The same approach just seems make sense here too i.e. with cohorts.

            Show
            ray Ray Lawrence added a comment - 1. Group/role. Agreed. Course limit issue coming up - removal of this will make a big difference. 2. Groupings: Not needed as they are a collection of course groups. 3. Where this breaks consistency is with courses (IMO). Courses have a unique internal name (shortname). Courses have an ID field, that is not mandatory, that facilitates the linking of a course with a separate identifier in another system. This is useful for external enrolments. Cohorts are supposed to be a mechanism to support course enrolments. The same approach just seems make sense here too i.e. with cohorts.
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Thanks Petr, this has been integrated now.
            Also gave it a quick test while I was reviewing it and all worked perfectly

            Cheers
            Sam

            Show
            samhemelryk Sam Hemelryk added a comment - Thanks Petr, this has been integrated now. Also gave it a quick test while I was reviewing it and all worked perfectly Cheers Sam
            Hide
            ray Ray Lawrence added a comment -

            Ref. edited post above.

            Regarding using the same ID for more than on cohort. So the upload could populate for 2 categories on the site?

            Not good as there could be Managers working independently on the site who, unknown to each other, use the same cohort ID.

            Manager A makes an upload that gives all of the users access to courses synced to an identical cohort ID elsewhere on the site. Big privacy issues, not good.

            A unique identifier is required.

            Show
            ray Ray Lawrence added a comment - Ref. edited post above. Regarding using the same ID for more than on cohort. So the upload could populate for 2 categories on the site? Not good as there could be Managers working independently on the site who, unknown to each other, use the same cohort ID. Manager A makes an upload that gives all of the users access to courses synced to an identical cohort ID elsewhere on the site. Big privacy issues, not good. A unique identifier is required.
            Hide
            skodak Petr Skoda added a comment -

            There is no privacy issue - the upload users is supposed to be executed by admin that has access to everything, there is no feature that would allow you to separate users from course categories for administrative purposes. The cohort "id number" must be unique site-wide.

            This does not seem to be a good place to discuss these issues, I suppose some sort of cohort specific partner meeting might be better.

            Show
            skodak Petr Skoda added a comment - There is no privacy issue - the upload users is supposed to be executed by admin that has access to everything, there is no feature that would allow you to separate users from course categories for administrative purposes. The cohort "id number" must be unique site-wide. This does not seem to be a good place to discuss these issues, I suppose some sort of cohort specific partner meeting might be better.
            Hide
            ray Ray Lawrence added a comment -

            OK. Well, if the cohort ID is unique site wide that addresses this issue.

            FYI, user management is often a task that is not undertaken by an administrator (who can change site configuration). On many sites there is a bespoke role that has user upload permissions.

            Show
            ray Ray Lawrence added a comment - OK. Well, if the cohort ID is unique site wide that addresses this issue. FYI, user management is often a task that is not undertaken by an administrator (who can change site configuration). On many sites there is a bespoke role that has user upload permissions.
            Hide
            skodak Petr Skoda added a comment -

            Moodle is not designed for fine grained user account control, it was always all or nothing. The easiest solution for large organisations is to use external system (ldap, db) and synchronise Moodle user accounts/enrolments with it. The csv user upload script is a complex tool for advanced users that are fully trusted, I would personally recommend to do a full db backup before any use.

            Show
            skodak Petr Skoda added a comment - Moodle is not designed for fine grained user account control, it was always all or nothing. The easiest solution for large organisations is to use external system (ldap, db) and synchronise Moodle user accounts/enrolments with it. The csv user upload script is a complex tool for advanced users that are fully trusted, I would personally recommend to do a full db backup before any use.
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Tried with some new and existing users, correct and incorrect cohorts, all seems ok. Passing.

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Tried with some new and existing users, correct and incorrect cohorts, all seems ok. Passing.
            Hide
            samhemelryk Sam Hemelryk added a comment -

            Congratulations - this fix has just been released in the weeklies.

            Show
            samhemelryk Sam Hemelryk added a comment - Congratulations - this fix has just been released in the weeklies.
            Hide
            ray Ray Lawrence added a comment -

            Sam, when is this available? This week or in 2.2 (as indicate din fix version)?

            Show
            ray Ray Lawrence added a comment - Sam, when is this available? This week or in 2.2 (as indicate din fix version)?
            Hide
            skodak Petr Skoda added a comment -

            This is already available in the master branch (aka 2.2dev), you can see the details when you click on the "Source" tab above.

            Show
            skodak Petr Skoda added a comment - This is already available in the master branch (aka 2.2dev), you can see the details when you click on the "Source" tab above.
            Hide
            ray Ray Lawrence added a comment -

            Thanks. Is that the same as the weekly for 2.1 .i.e. 20th July?

            Show
            ray Ray Lawrence added a comment - Thanks. Is that the same as the weekly for 2.1 .i.e. 20th July?
            Hide
            skodak Petr Skoda added a comment -

            It is a different git branch, weekly is MOODLE_21_STABLE.

            Show
            skodak Petr Skoda added a comment - It is a different git branch, weekly is MOODLE_21_STABLE.
            Hide
            taatparya vikram solia added a comment -

            Thanks Sam and Petr!

            It would be great if this could be backported to Moodle 2.1 and 2.0 as well.

            Show
            taatparya vikram solia added a comment - Thanks Sam and Petr! It would be great if this could be backported to Moodle 2.1 and 2.0 as well.
            Hide
            tsala Helen Foster added a comment -

            I'd like to write a QA test for this new feature, however I don't quite understand the testing instructions.

            Please could anyone provide a sample csv file for testing and clarify whether the cohorts must exist before the csv file is uploaded or whether new cohorts are created automatically.

            Show
            tsala Helen Foster added a comment - I'd like to write a QA test for this new feature, however I don't quite understand the testing instructions. Please could anyone provide a sample csv file for testing and clarify whether the cohorts must exist before the csv file is uploaded or whether new cohorts are created automatically.
            Hide
            ghenrick gavin henrick added a comment -

            I have tested and if the cohort does not exist, it says : Unknown cohort (year3)!

            Here is text for sample csv:

            username,password,firstname,lastname,email, cohort1
            tomjones,Pass1234*,Tom,Jones,tomjones@example.com, year3
            marysmith,Pass1234*,Mary,Smith,marysmith@example.com, year4
            bobjones,Pass1234*,Bob,Jones,bobjones@example.com, year3
            alicesmith,Pass1234*,Alice,Smith,alicesmith@example.com, year4

            Show
            ghenrick gavin henrick added a comment - I have tested and if the cohort does not exist, it says : Unknown cohort (year3)! Here is text for sample csv: username,password,firstname,lastname,email, cohort1 tomjones,Pass1234*,Tom,Jones,tomjones@example.com, year3 marysmith,Pass1234*,Mary,Smith,marysmith@example.com, year4 bobjones,Pass1234*,Bob,Jones,bobjones@example.com, year3 alicesmith,Pass1234*,Alice,Smith,alicesmith@example.com, year4
            Hide
            skodak Petr Skoda added a comment -

            Yes, you need to create the cohorts first.

            Show
            skodak Petr Skoda added a comment - Yes, you need to create the cohorts first.
            Hide
            tsala Helen Foster added a comment -

            Thanks Gavin and Petr, I've created MDLQA-1446 (plus test master copy) using the suggested sample csv file.

            Show
            tsala Helen Foster added a comment - Thanks Gavin and Petr, I've created MDLQA-1446 (plus test master copy) using the suggested sample csv file.

              People

              • Votes:
                55 Vote for this issue
                Watchers:
                37 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  5/Dec/11