Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-36602

Add mnethostid as a bulk uploadable field

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.5
    • Fix Version/s: 2.5
    • Component/s: Administration
    • Labels:
    • Testing Instructions:
      Hide

      1/ try as much operations as possible with csv user files "without" mnehostid column
      2/ set up mnet OR alternatively edit some user records to have different mnethostids and mnet auth type.
      3/ modify the cvs file to inlcude enrolment, cohort and group info for some mnet user - verify the information is used
      4/ modify the cvs file to included suspended flag for mnet user - verify use is suspended
      5/ modify the cvs file to include invalid information - non-existent mnet user, modification of email, first/last names, etc. - make sure the record is either skipped or changes are ignored

      Show
      1/ try as much operations as possible with csv user files "without" mnehostid column 2/ set up mnet OR alternatively edit some user records to have different mnethostids and mnet auth type. 3/ modify the cvs file to inlcude enrolment, cohort and group info for some mnet user - verify the information is used 4/ modify the cvs file to included suspended flag for mnet user - verify use is suspended 5/ modify the cvs file to include invalid information - non-existent mnet user, modification of email, first/last names, etc. - make sure the record is either skipped or changes are ignored
    • Affected Branches:
      MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w03_MDL-36602_m25_mnetuser

      Description

      Several of our customers have requested to be able to assign the mnethostid when bulk uploading users. Is this possible

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Hello Thomas,

              Have you tried custom user profile fields option ? Please go through List of user fields that can be uploaded and let us know if this helps.

              Show
              rajeshtaneja Rajesh Taneja added a comment - Hello Thomas, Have you tried custom user profile fields option ? Please go through List of user fields that can be uploaded and let us know if this helps.
              Hide
              rajeshtaneja Rajesh Taneja added a comment -

              Thanks for reporting this.

              I just realised what you meant by menthostid field. IMO, yes this should be possible. I've put that on the backlog.

              In the meantime feel free to help us work on this issue. If you are able to provide a patch or links to your Git repository branch, please add a patch label so we will spot it.

              Show
              rajeshtaneja Rajesh Taneja added a comment - Thanks for reporting this. I just realised what you meant by menthostid field. IMO, yes this should be possible. I've put that on the backlog. In the meantime feel free to help us work on this issue. If you are able to provide a patch or links to your Git repository branch, please add a patch label so we will spot it.
              Hide
              skodak Petr Skoda added a comment -

              Hi, this was not implemented because it would require to whitelist only course enrolment operations and cohort membership, we should not modify user details because the original site is responsible for them. One of the options is to break apart the enrolment functionality and implement it separately.

              Show
              skodak Petr Skoda added a comment - Hi, this was not implemented because it would require to whitelist only course enrolment operations and cohort membership, we should not modify user details because the original site is responsible for them. One of the options is to break apart the enrolment functionality and implement it separately.
              Hide
              skodak Petr Skoda added a comment -

              Hello,

              I have implemented a partial support for mnethostid:
              1/ enrolling to courses: username+mnethostid+course required
              2/ adding to group: username+mnethostid+course+group required
              3/ adding to cohort: username+mnethostid+cohort required
              4/ suspending/reviving accounts: username+mnethostid+suspended required

              All other operations are ignored. You can not add users, delete them or update them (such as change names or email, profile fields, etc.)

              This patch is for 2.5dev only because new features are not allowed in STABLE branches, sorry.

              Show
              skodak Petr Skoda added a comment - Hello, I have implemented a partial support for mnethostid: 1/ enrolling to courses: username+mnethostid+course required 2/ adding to group: username+mnethostid+course+group required 3/ adding to cohort: username+mnethostid+cohort required 4/ suspending/reviving accounts: username+mnethostid+suspended required All other operations are ignored. You can not add users, delete them or update them (such as change names or email, profile fields, etc.) This patch is for 2.5dev only because new features are not allowed in STABLE branches, sorry.
              Hide
              poltawski Dan Poltawski added a comment -

              What is the rationale that we should expose this horrible internal detail externally?

              Show
              poltawski Dan Poltawski added a comment - What is the rationale that we should expose this horrible internal detail externally?
              Hide
              skodak Petr Skoda added a comment -

              The "detail" is that username+mnethostid must be unique and user import uses usernames as identifiers.

              Show
              skodak Petr Skoda added a comment - The "detail" is that username+mnethostid must be unique and user import uses usernames as identifiers.
              Hide
              poltawski Dan Poltawski added a comment -

              The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

              TIA and ciao

              Show
              poltawski Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
              Hide
              poltawski Dan Poltawski added a comment -

              Oki, integrated. thanks Petr.

              Show
              poltawski Dan Poltawski added a comment - Oki, integrated. thanks Petr.
              Hide
              dmonllao David Monllaó added a comment -

              Adding Adrian as watcher, I remember one issue he worked on where he had to deal with something related

              Show
              dmonllao David Monllaó added a comment - Adding Adrian as watcher, I remember one issue he worked on where he had to deal with something related
              Hide
              poltawski Dan Poltawski added a comment -

              Ah yes, I meant to ping Adrian about this one too.

              Show
              poltawski Dan Poltawski added a comment - Ah yes, I meant to ping Adrian about this one too.
              Hide
              andyjdavis Andrew Davis added a comment -

              It appears to be working as described. I have linked a minor bug I spotted while testing. Passing.

              Show
              andyjdavis Andrew Davis added a comment - It appears to be working as described. I have linked a minor bug I spotted while testing. Passing.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Surely you will be happy to know that your code is now part of Moodle upstream. Thanks, thanks!

              Closing as fixed, ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Surely you will be happy to know that your code is now part of Moodle upstream. Thanks, thanks! Closing as fixed, ciao
              Hide
              marycooch Mary Cooch added a comment -

              Removing docs_required label as this is documented in http://docs.moodle.org/25/en/Upload_users

              Show
              marycooch Mary Cooch added a comment - Removing docs_required label as this is documented in http://docs.moodle.org/25/en/Upload_users

                People

                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/May/13