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

Send email to new users added manually

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.6.6, 1.6.7, 1.6.8, 1.6.9, 1.7, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.7.7, 1.8, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.8.5, 1.8.6, 1.8.7, 1.8.8, 1.8.9, 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5, 2.0.7, 2.1, 2.2, 2.5
    • Fix Version/s: 2.6
    • Labels:
    • Database:
      Any
    • Testing Instructions:
      Hide

      1/ add new user - select "generate new password..."
      2/ verify new user receives email and is forced to change password after first login
      3/ test password is required when not generating it
      4/ test password requirements
      5/ test existing account editing with and without password change

      Show
      1/ add new user - select "generate new password..." 2/ verify new user receives email and is forced to change password after first login 3/ test password is required when not generating it 4/ test password requirements 5/ test existing account editing with and without password change
    • Affected Branches:
      MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE, MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_26_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w27_MDL-19390_m26_notifynewuser

      Description

      When a user is created manually by admin, the user is not sent a welcome email with login information. Also when an admin changes a users password there is no way to send an email with login information.

      Perhaps this could be an option under bulk user actions "Email login information" and/or a checkbox on the create/edit user page.

      See these 2 forum requests for the feature
      http://moodle.org/mod/forum/discuss.php?d=117005
      http://moodle.org/mod/forum/post.php?reply=547725

        Gliffy Diagrams

          Activity

          Hide
          johncurran John Curran added a comment -

          This is a small but very important requirement especially for Moodle in the commercial/corporate world.

          Currently when you add a new user manually you have to transpose their username and password to another e-mail and send that so that they can access Moodle. What is required is a system generated 'welcome' e-mail with all the necessary details plus a nice welcome para along the lines of 'Welcome to Moodle - the popular OpenSource course management system....'

          Show
          johncurran John Curran added a comment - This is a small but very important requirement especially for Moodle in the commercial/corporate world. Currently when you add a new user manually you have to transpose their username and password to another e-mail and send that so that they can access Moodle. What is required is a system generated 'welcome' e-mail with all the necessary details plus a nice welcome para along the lines of 'Welcome to Moodle - the popular OpenSource course management system....'
          Hide
          aborrow Anthony Borrow added a comment -

          Just a couple of points to consider here.

          1) There is somewhat of a move away from directly sending emails because of the variety of forms that folks like to receive communications. For example, some users may want to receive an IM or SMS message from Moodle rather than an email. The goal is to use a united messaging system and then let the user control how that message gets sent out.

          2) That said, I realize that for an initial communication such as account creation that an email is the standard. I think if we take care of an option to email new accounts when they are manually created, we should also make sure that those same emails go out when a series of accounts are created when uploading them via a CSV file.

          3) I have been working on something that may be helpful in this regard as well, MDL-19851 which tries to allow for some user information to be inserted into a message (like fullname and username). This could accomplish something similar as a way of following up with folks who have never logged in (see MDL-15502) and sending them a message which could then be mailed out to the user or whatever other method the site decides as its default.

          Peace - Anthony

          Show
          aborrow Anthony Borrow added a comment - Just a couple of points to consider here. 1) There is somewhat of a move away from directly sending emails because of the variety of forms that folks like to receive communications. For example, some users may want to receive an IM or SMS message from Moodle rather than an email. The goal is to use a united messaging system and then let the user control how that message gets sent out. 2) That said, I realize that for an initial communication such as account creation that an email is the standard. I think if we take care of an option to email new accounts when they are manually created, we should also make sure that those same emails go out when a series of accounts are created when uploading them via a CSV file. 3) I have been working on something that may be helpful in this regard as well, MDL-19851 which tries to allow for some user information to be inserted into a message (like fullname and username). This could accomplish something similar as a way of following up with folks who have never logged in (see MDL-15502 ) and sending them a message which could then be mailed out to the user or whatever other method the site decides as its default. Peace - Anthony
          Hide
          thunkele Timothy Hunkele added a comment -

          Has there been any progress made on this feature?

          Show
          thunkele Timothy Hunkele added a comment - Has there been any progress made on this feature?
          Hide
          derekcx Derek Chirnside added a comment -

          The 2007 thread here: http://moodle.org/mod/forum/discuss.php?d=85333 has some code that seems to do what is required here. I'm also curious with Timothy: any progress?? any chance of this getting into the core?
          Maybe: when you create an account, tick and ":e-mail user" checkbox.

          Show
          derekcx Derek Chirnside added a comment - The 2007 thread here: http://moodle.org/mod/forum/discuss.php?d=85333 has some code that seems to do what is required here. I'm also curious with Timothy: any progress?? any chance of this getting into the core? Maybe: when you create an account, tick and ":e-mail user" checkbox.
          Hide
          mstdistance Nigel Cunningham added a comment -

          This would be really good. I don't think you need to get too stuck on email though. If the account creation form (or import method) allows for the entry of (say) a mobile number, there's no reason the admin couldn't be given check boxes beside each potential transport so that the person could be notified of the new account in any way possible, and perhaps more than one way.

          Show
          mstdistance Nigel Cunningham added a comment - This would be really good. I don't think you need to get too stuck on email though. If the account creation form (or import method) allows for the entry of (say) a mobile number, there's no reason the admin couldn't be given check boxes beside each potential transport so that the person could be notified of the new account in any way possible, and perhaps more than one way.
          Hide
          aborrow Anthony Borrow added a comment -

          Nigel - I would say prior to 2.0, email was the primary way that Moodle communicated with users. Post 2.0, I think you raise a good point that there are multiple way for folks to receive notifications/messages from Moodle and those should be used consistently. Peace - Anthony

          Show
          aborrow Anthony Borrow added a comment - Nigel - I would say prior to 2.0, email was the primary way that Moodle communicated with users. Post 2.0, I think you raise a good point that there are multiple way for folks to receive notifications/messages from Moodle and those should be used consistently. Peace - Anthony
          Hide
          biodojo Colin Matheson added a comment -

          So is there a way to choose to send a message to a new user account? Then let the messaging system decide the best way to send? Or perhaps have a checkbox next to any available communication methods of the new account (email, sms message, IM) which the admin can choose to have Moodle send login info to. Also a box "send changes via message" would be great for admin password resets or other user changes by admin.

          Show
          biodojo Colin Matheson added a comment - So is there a way to choose to send a message to a new user account? Then let the messaging system decide the best way to send? Or perhaps have a checkbox next to any available communication methods of the new account (email, sms message, IM) which the admin can choose to have Moodle send login info to. Also a box "send changes via message" would be great for admin password resets or other user changes by admin.
          Hide
          aborrow Anthony Borrow added a comment -

          Petr's work was focusing on uploading users but there seems to be a desire to have an option to notify users on account creation regardless of the method and in 2.0 it seems that that method should include options as to how the notification should be delivered (not necessarily email) - with the exception of auth/email because the email address needs to be verified. Peace - Anthony

          Show
          aborrow Anthony Borrow added a comment - Petr's work was focusing on uploading users but there seems to be a desire to have an option to notify users on account creation regardless of the method and in 2.0 it seems that that method should include options as to how the notification should be delivered (not necessarily email) - with the exception of auth/email because the email address needs to be verified. Peace - Anthony
          Hide
          aborrow Anthony Borrow added a comment -

          Colin - The message_post_message function in /message/lib.php would be my first guess. /lib/moodlelib.php's send_confirmation_email was being used by the email and ldap types. The distinction being that with manual account creation the user is not having to confirm the account and we are simply notifying the user of the account creation. The logic of how the default messaging settings will determine the specific way of resolving this issue. Peace - Anthony

          Show
          aborrow Anthony Borrow added a comment - Colin - The message_post_message function in /message/lib.php would be my first guess. /lib/moodlelib.php's send_confirmation_email was being used by the email and ldap types. The distinction being that with manual account creation the user is not having to confirm the account and we are simply notifying the user of the account creation. The logic of how the default messaging settings will determine the specific way of resolving this issue. Peace - Anthony
          Hide
          roal Robert Allerstorfer added a comment -

          This feature still has not gone into 2.0.x and 2.1.x as well, right? Then the Affected Branches field should be updated to include those branches as well.

          Show
          roal Robert Allerstorfer added a comment - This feature still has not gone into 2.0.x and 2.1.x as well, right? Then the Affected Branches field should be updated to include those branches as well.
          Hide
          derekcx Derek Chirnside added a comment -

          So we are still debating this matter after quite a while? Surely NO notification method available is bad: at least one method should be available. Maybe print an address label so we can post a letter?
          Why not do a quick fix that sends an e-mail with account details whenever a new account is manually created. A Rolls Royce version of course would have a welcome e-mail with other details.

          -Derek

          Show
          derekcx Derek Chirnside added a comment - So we are still debating this matter after quite a while? Surely NO notification method available is bad: at least one method should be available. Maybe print an address label so we can post a letter? Why not do a quick fix that sends an e-mail with account details whenever a new account is manually created. A Rolls Royce version of course would have a welcome e-mail with other details. -Derek
          Hide
          derekcx Derek Chirnside added a comment -

          OK, some news (at least news to me) on this tracker request that has been unresolved through 27 Moodle versions. </irritation>

          I posted about this to see if there was a workaround. There is, sort of.
          See http://moodle.org/mod/forum/discuss.php?d=198617#p866017

          Apparently, if you OMIT password in the CSV file you upload, a cron job runs and an e-mail IS sent to users.
          This info was in the help, just a bit buried and I never noticed it.
          It is NOT really a full solution. The e-mail needs to be customisable. IMO.

          E-mail contents:
          --------------
          Hi George Harrison,

          A new account has been created for you at 'snip'
          and you have been issued with a new temporary password.

          Your current login information is now:
          username: georgeh
          password: gobbuldygook
          (you will have to change your password
          when you login for the first time)

          To start using 'snip', login at
          http://yoursite/login/

          In most mail programs, this should appear as a blue link
          which you can just click on. If that doesn't work,
          then cut and paste the address into the address
          line at the top of your web browser window.

          Cheers from the 'snip' administrator,

          XXX Administrator
          moodlehost@xxx
          ----------------------

          Show
          derekcx Derek Chirnside added a comment - OK, some news (at least news to me) on this tracker request that has been unresolved through 27 Moodle versions. </irritation> I posted about this to see if there was a workaround. There is, sort of. See http://moodle.org/mod/forum/discuss.php?d=198617#p866017 Apparently, if you OMIT password in the CSV file you upload, a cron job runs and an e-mail IS sent to users. This info was in the help, just a bit buried and I never noticed it. It is NOT really a full solution. The e-mail needs to be customisable. IMO. E-mail contents: -------------- Hi George Harrison, A new account has been created for you at 'snip' and you have been issued with a new temporary password. Your current login information is now: username: georgeh password: gobbuldygook (you will have to change your password when you login for the first time) To start using 'snip', login at http://yoursite/login/ In most mail programs, this should appear as a blue link which you can just click on. If that doesn't work, then cut and paste the address into the address line at the top of your web browser window. Cheers from the 'snip' administrator, XXX Administrator moodlehost@xxx ----------------------
          Hide
          derekcx Derek Chirnside added a comment -

          At this point I am curious why there is no patch here for this. I've just checked out a couple of posts and code has been referred to.

          This seems to me to be a very simple fix.

          Andrew has commented here: http://tracker.moodle.org/browse/MDL-19390?focusedCommentId=78591&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-78591
          There is debate about text, e-mail.

          Is there anytyhing we can do to move this on? Maybe just got with the basic e-mail channel.
          Has someone got a code snippet they could post here?

          -Derek

          Show
          derekcx Derek Chirnside added a comment - At this point I am curious why there is no patch here for this. I've just checked out a couple of posts and code has been referred to. This seems to me to be a very simple fix. Andrew has commented here: http://tracker.moodle.org/browse/MDL-19390?focusedCommentId=78591&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-78591 There is debate about text, e-mail. Is there anytyhing we can do to move this on? Maybe just got with the basic e-mail channel. Has someone got a code snippet they could post here? -Derek
          Hide
          mickyjune26 Micky Fokken added a comment - - edited

          Just to clarify - I would be interested in it automatically e-mailing new users their login information after they are imported via CSV. I know we could leave it blank, but in case we have a predefined password requiremet, it would be nice if it e-mailed the users.

          Show
          mickyjune26 Micky Fokken added a comment - - edited Just to clarify - I would be interested in it automatically e-mailing new users their login information after they are imported via CSV. I know we could leave it blank, but in case we have a predefined password requiremet, it would be nice if it e-mailed the users.
          Hide
          flips Philippe Siwinski added a comment - - edited

          Hi, could we increase the priority of this feature request ?

          34 voters already, all modern web apps having this feature... I guess it's time to implement it

          Thank you.

          Show
          flips Philippe Siwinski added a comment - - edited Hi, could we increase the priority of this feature request ? 34 voters already, all modern web apps having this feature... I guess it's time to implement it Thank you.
          Hide
          libertymoodle Luis de Vasconcelos added a comment -

          Derek, the contents of that e-mail that you described can be customised via the Moodle Language Customization function under Site Admin / Language / Language customization. Edit $string['newusernewpasswordtext'] in \lang\en\moodle.php and change the message to say whatever you want.

          Show
          libertymoodle Luis de Vasconcelos added a comment - Derek, the contents of that e-mail that you described can be customised via the Moodle Language Customization function under Site Admin / Language / Language customization. Edit $string ['newusernewpasswordtext'] in \lang\en\moodle.php and change the message to say whatever you want.
          Hide
          derekcx Derek Chirnside added a comment -

          Luis, you are right of course. I meant "Customisable by the person doing the upload of users on a one off basis" our manager does some of these uploads, and does not have access to the language strings. Ideally a generic "Welcome to Moodle" and a personal "This is for the course in skinning ferrets, welcome to a whole new topic".

          I'm trying to move this along a little. Watch this space.

          -Derek

          Show
          derekcx Derek Chirnside added a comment - Luis, you are right of course. I meant "Customisable by the person doing the upload of users on a one off basis" our manager does some of these uploads, and does not have access to the language strings. Ideally a generic "Welcome to Moodle" and a personal "This is for the course in skinning ferrets, welcome to a whole new topic". I'm trying to move this along a little. Watch this space. -Derek
          Hide
          derekcx Derek Chirnside added a comment -

          I'd like to propose something very simple: default option is e-mail, but if there are other options, you can add them. But do the coding for the other options later.

          Screen shot attached. I am now spending 15-20 min a day doing e-mailing.

          Show
          derekcx Derek Chirnside added a comment - I'd like to propose something very simple: default option is e-mail, but if there are other options, you can add them. But do the coding for the other options later. Screen shot attached. I am now spending 15-20 min a day doing e-mailing.
          Hide
          salvetore Michael de Raadt added a comment -

          This issue looks like it has been in existence for a while and people have been showing interest in it lately.

          It's not at the top of the priority list by any measure, currently, but could be advanced with more votes.

          If someone is willing take this on, please add patches and, if you do, add a patch label.

          Show
          salvetore Michael de Raadt added a comment - This issue looks like it has been in existence for a while and people have been showing interest in it lately. It's not at the top of the priority list by any measure, currently, but could be advanced with more votes. If someone is willing take this on, please add patches and, if you do, add a patch label.
          Hide
          ianmcn Ian McNaught added a comment -

          For those wanting to customise the text of the email sent after doing the csv upload, you can change it in the language pack (Site Admin/Language/Language Customisation): search for string newusernewpasswordtext in the core/moodle.php component and change it to what you want.

          But yes, this issue does need addressing in a more permenant way.

          Show
          ianmcn Ian McNaught added a comment - For those wanting to customise the text of the email sent after doing the csv upload, you can change it in the language pack (Site Admin/Language/Language Customisation): search for string newusernewpasswordtext in the core/moodle.php component and change it to what you want. But yes, this issue does need addressing in a more permenant way.
          Hide
          gb2048 Gareth J Barnard added a comment -

          Could the 'reset password' code be used? And is a welcome message sent on CSV upload user creation? If so, what line / area of code performs this task?

          Show
          gb2048 Gareth J Barnard added a comment - Could the 'reset password' code be used? And is a welcome message sent on CSV upload user creation? If so, what line / area of code performs this task?
          Hide
          ianmcn Ian McNaught added a comment -

          @Gareth - the welcome message is sent out on CSV upload only when no password is present and Moodle is set to create passwords in that situation. In all other cases a welcome message is not sent out.

          Show
          ianmcn Ian McNaught added a comment - @Gareth - the welcome message is sent out on CSV upload only when no password is present and Moodle is set to create passwords in that situation. In all other cases a welcome message is not sent out.
          Hide
          gb2048 Gareth J Barnard added a comment -

          @Ian - Thank you, will help me to potentially consider a solution.

          Show
          gb2048 Gareth J Barnard added a comment - @Ian - Thank you, will help me to potentially consider a solution.
          Hide
          dtaylor@itgovernance.co.uk Darrell added a comment -

          I agree with this being added and also hope that the newuseremail subject and body can be edited more easily too.

          Show
          dtaylor@itgovernance.co.uk Darrell added a comment - I agree with this being added and also hope that the newuseremail subject and body can be edited more easily too.
          Hide
          lmajerus@partners.org Laura Gay Majerus added a comment -

          I'm wondering if this plugin solves some of this issue: https://moodle.org/plugins/view.php?plugin=local_welcome. Has anyone used it?

          Show
          lmajerus@partners.org Laura Gay Majerus added a comment - I'm wondering if this plugin solves some of this issue: https://moodle.org/plugins/view.php?plugin=local_welcome . Has anyone used it?
          Hide
          fvendrell Francis Vendrell added a comment -

          I tried to test the Welcome plugin with moodle 2.4 but I could not install it (suppose to work for moodle 2.3 I guess).

          Show
          fvendrell Francis Vendrell added a comment - I tried to test the Welcome plugin with moodle 2.4 but I could not install it (suppose to work for moodle 2.3 I guess).
          Hide
          nitinwaves Nitin Jain added a comment -

          Vote for this feature...

          Show
          nitinwaves Nitin Jain added a comment - Vote for this feature...
          Hide
          gfox Graham Fox added a comment -

          This would be an amazing new feature.

          Show
          gfox Graham Fox added a comment - This would be an amazing new feature.
          Hide
          skodak Petr Skoda added a comment - - edited

          Thanks for the report. I have used the same logic and code as the upload users tool.

          Please edit your local language pack if you want to customise the welcome message.

          Show
          skodak Petr Skoda added a comment - - edited Thanks for the report. I have used the same logic and code as the upload users tool. Please edit your local language pack if you want to customise the welcome message.
          Hide
          samhemelryk Sam Hemelryk added a comment -

          Thanks Petr - this has been integrated now

          I did make an additional commit just to fix a typo.
          Also tossed up whether the new option should have a help icon, but really the title sums it up really well.

          Many thanks
          Sam

          Show
          samhemelryk Sam Hemelryk added a comment - Thanks Petr - this has been integrated now I did make an additional commit just to fix a typo. Also tossed up whether the new option should have a help icon, but really the title sums it up really well. Many thanks Sam
          Hide
          skodak Petr Skoda added a comment -

          Thanks Sam!

          Show
          skodak Petr Skoda added a comment - Thanks Sam!
          Hide
          salvetore Michael de Raadt added a comment -

          Test result: Success!

          Show
          salvetore Michael de Raadt added a comment - Test result: Success!
          Hide
          damyon Damyon Wiese added a comment -

          This issue is fixed! Hurray! Hurray!
          Your issue is fixed, what a wonderful day!

          Cheers, Damyon

          Show
          damyon Damyon Wiese added a comment - This issue is fixed! Hurray! Hurray! Your issue is fixed, what a wonderful day! Cheers, Damyon
          Hide
          eolasbeo Colin Farrelly added a comment -

          Hi Damyon,

          Is there a way of addressing this issue on Moodle 2.5 in relation to sending an automated email to new users as per your fix?

          Thanks

          Show
          eolasbeo Colin Farrelly added a comment - Hi Damyon, Is there a way of addressing this issue on Moodle 2.5 in relation to sending an automated email to new users as per your fix? Thanks
          Hide
          salvetore Michael de Raadt added a comment -

          Hi, Colin.

          As this was an improvement, we won't be backporting it. You can apply the change to your Moodle instance if you wish.

          Show
          salvetore Michael de Raadt added a comment - Hi, Colin. As this was an improvement, we won't be backporting it. You can apply the change to your Moodle instance if you wish.
          Hide
          eolasbeo Colin Farrelly added a comment -

          Hi Michael,
          Thanks for your reply, how would I apply these changes I am very new to Moodle

          Kind Regards Colin

          Show
          eolasbeo Colin Farrelly added a comment - Hi Michael, Thanks for your reply, how would I apply these changes I am very new to Moodle Kind Regards Colin
          Hide
          salvetore Michael de Raadt added a comment -

          Hi, Colin.

          The changes are shown in the commits tab above.

          You can also access the changes at http://git.moodle.org/gw?p=moodle.git&a=search&h=HEAD&st=commit&s=MDL-19390

          Show
          salvetore Michael de Raadt added a comment - Hi, Colin. The changes are shown in the commits tab above. You can also access the changes at http://git.moodle.org/gw?p=moodle.git&a=search&h=HEAD&st=commit&s=MDL-19390
          Hide
          marycooch Mary Cooch added a comment -

          Removing docs_required label as this is now documented in http://docs.moodle.org/26/en/Add_a_new_user and also http://docs.moodle.org/26/en/Accounts_FAQ

          Show
          marycooch Mary Cooch added a comment - Removing docs_required label as this is now documented in http://docs.moodle.org/26/en/Add_a_new_user and also http://docs.moodle.org/26/en/Accounts_FAQ
          Hide
          marycooch Mary Cooch added a comment -

          Also for the record, QA test added here MDLQA-6667 (2.6) and to master copy MDLQA-6666

          Show
          marycooch Mary Cooch added a comment - Also for the record, QA test added here MDLQA-6667 (2.6) and to master copy MDLQA-6666

            People

            • Votes:
              60 Vote for this issue
              Watchers:
              53 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                18/Nov/13