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

Provide a contact form which sends to the site support email and replace mailto link in footer

    XMLWordPrintable

Details

    • MOODLE_400_STABLE
    • MOODLE_400_STABLE
    • MDL-73608-master
    • Hide

      Setup

      In order to test this, you'll need to setup your moodle to send emails, reCAPTCHA enabled, support email and no-reply email set.

      • SMTP configuration - I suggest installing MailCatcher and just add 127.0.0.1:1025 to smtphosts setting in Site administration > Server > Email > Outgoing mail configuration
        • Still on that page, set No-reply address to a valid email address.
        • Note: Ensure the service is running during the test by running the command mailcatcher.
      • ReCAPTCHA - You'll need to setup site and secret keys in Site administration > Plugins > Authentication > Manage authentication.
      • Support email set in Site administration > Server > Supportcontact

      Test contact site support page

      1. Without logging in, click on the in the footer and then click Contact site support link.
      2. Test the form validation, trying to submit without any data.
      3. Make sure you see Required validation message in all fields, except for the Security question.
      4. Now fill the form and try to submit without answering the reCAPTCHA (Security question).
      5. Make sure you get a "Failed reCAPTCHA challenge, try again." validation message.
      6. Answer the security question (reCAPTCHA) field and click Submit.
      7. Make sure you are redirected to the Site homepage and see a confirmation message.
      8. Look the MailCatcher page http://127.0.0.1:1080/ in your browser and make sure you have received an email:
      9. Make sure the From email is the same of the no reply address.
      10. Make sure the To email is the same of the support email setting.
      11. Make sure the Subject is "Support contact message: The subject you have entered in the form"
      12. Make sure the information in the email body is the same you have entered in the form.
      13. Make sure there is a warning below the subject of the email, which warns you that the user who sent the email  was not logged in.
      14. Now log in as admin.
      15. Go to the contact support page again.
      16. Repeat the test above, the only differences should be that:
        • the Name and Email address are pre-filled and you are not able to edit.
        • you do not see the warning about the user not being logged in between the subject and email lines.
      17. Go to Site administration > Server > Support contact and set the Support page to https://moodle.com/contact/support/
      18. Click on the in the footer and then click "Contact site support" link.
      19. Make sure you don't see the contact page and you are redirected to moodle's support page in a new window/tab.
      20. Remove the Support page.
      21. Update the smtphosts setting in Site administration > Server > Email > Outgoing mail configuration so that it uses an invalid port (eg add a 1 to the end) and save.
      22. Go to the contact site support page again, fill the form and submit.
      23. Make sure you are redirected back to the support form and see an error message that it could not be sent. Also make sure all of the information you previously filled in has been re-populated in the form.
      24. Now remove the value for  the smtphosts setting in Site administration > Server > Email > Outgoing mail configuration and save.
      25. Click on the in the footer and then click "Contact site support" link.
      26. Make sure you do not see the support form when the page loads.
      27. Make sure you do see a message on the page that you can't submit a request, and make sure it also lists the support email address. Mouse over the support email address and make sure it links to a mailto link for the email address displayed on the page.
      28. Log out, then click on the in the footer and then click "Contact site support" link.
      29. Make sure you see the same thing as you saw in step 26, but importantly make sure that the email address section is not shown on the page.
      Show
      Setup In order to test this, you'll need to setup your moodle to send emails, reCAPTCHA enabled, support email and no-reply email set. SMTP configuration - I suggest installing MailCatcher and just add 127.0.0.1:1025 to smtphosts setting in Site administration > Server > Email > Outgoing mail configuration Still on that page, set No-reply address to a valid email address. Note: Ensure the service is running during the test by running the command mailcatcher . ReCAPTCHA - You'll need to setup site and secret keys in Site administration > Plugins > Authentication > Manage authentication . To obtain those keys you need to generate it at Google reCAPTCHA . Support email set in Site administration > Server > Supportcontact Test contact site support page Without logging in, click on the in the footer and then click Contact site support link. Test the form validation, trying to submit without any data. Make sure you see Required validation message in all fields, except for the Security question . Now fill the form and try to submit without answering the reCAPTCHA (Security question). Make sure you get a " Failed reCAPTCHA challenge, try again. " validation message. Answer the security question (reCAPTCHA) field and click Submit . Make sure you are redirected to the Site homepage and see a confirmation message. Look the MailCatcher page http://127.0.0.1:1080/  in your browser and make sure you have received an email: Make sure the From email is the same of the no reply address. Make sure the To email is the same of the support email setting. Make sure the Subject is "Support contact message: The subject you have entered in the form" Make sure the information in the email body is the same you have entered in the form. Make sure there is a warning below the subject of the email, which warns you that the user who sent the email  was not logged in. Now log in as admin. Go to the contact support page again. Repeat the test above, the only differences should be that: the Name and Email address are pre-filled and you are not able to edit. you do not see the warning about the user not being logged in between the subject and email lines. Go to Site administration > Server > Support contact and set the Support page to https://moodle.com/contact/support/ Click on the in the footer and then click "Contact site support" link. Make sure you don't see the contact page and you are redirected to moodle's support page in a new window/tab. Remove the Support page . Update the smtphosts setting in Site administration > Server > Email > Outgoing mail configuration so that it uses an invalid port (eg add a 1 to the end) and save. Go to the contact site support page again, fill the form and submit. Make sure you are redirected back to the support form and see an error message that it could not be sent. Also make sure all of the information you previously filled in has been re-populated in the form. Now remove the value for  the smtphosts setting in Site administration > Server > Email > Outgoing mail configuration and save. Click on the in the footer and then click "Contact site support" link. Make sure you do not see the support form when the page loads. Make sure you do see a message on the page that you can't submit a request, and make sure it also lists the support email address. Mouse over the support email address and make sure it links to a mailto link for the email address displayed on the page. Log out, then click on the in the footer and then click "Contact site support" link. Make sure you see the same thing as you saw in step 26, but importantly make sure that the email address section is not shown on the page.
    • 3
    • HQ Team International CIH2-217, HQ Team International CIH2-218

    Description

      This is a follow up from MDL-72984

      There is some concern that the public email address would be misused. As a result it is better to hide this for not logged in users.

      The proposal for this issue is to:

      1. If the supportpage is set, show the link to the support page
      2. If not, show a link to a generic contact form which will send an email to the support email address

      The updated footer support link logic for this issue is:

      1. If the supportpage is set, show the link to the support page (which will open in a new window).
      2. If not, and SMTP is configured on the Moodle site, link to a generic contact form within Moodle, which will send an email to the support email address.
      3. If not, and SMTP is not configured, still direct to the internal page, but display a message that it can't be sent from that page. If the user is logged in, also show them a mailto link to the support email address. If not logged in (or a guest user), then omit the support email address.

      Uli has provided UX mockups for both the email received by support, as well as the version of the page described in point #3 above:

      Email mockup:

      When internal form hidden (SMTP not configured):

      (Note some of the suggested mockup strings have been used, but were not all designed to be final strings, so some have been refined/changed since. The icon was also changed to an appropriate fontawesome one, since the cone doesn't exist in our icons or FA.)

      Attachments

        1. could not send support email.png
          could not send support email.png
          43 kB
        2. MDL-73608 form.png
          MDL-73608 form.png
          46 kB
        3. screenshot-1.png
          screenshot-1.png
          32 kB
        4. Step 3_Screenshot.png
          Step 3_Screenshot.png
          53 kB
        5. Step 5_Screenshot.png
          Step 5_Screenshot.png
          47 kB
        6. Step 7_Screenshot.png
          Step 7_Screenshot.png
          115 kB
        7. Step No. 16_Screenshot A.png
          Step No. 16_Screenshot A.png
          40 kB
        8. Step No. 16_Screenshot B.png
          Step No. 16_Screenshot B.png
          45 kB
        9. Step No. 16_Screenshot C.png
          Step No. 16_Screenshot C.png
          25 kB
        10. Step No. 16_Screenshot D.png
          Step No. 16_Screenshot D.png
          87 kB
        11. Step No. 19.png
          Step No. 19.png
          49 kB
        12. Step No. 23_Screenshot.png
          Step No. 23_Screenshot.png
          115 kB
        13. Step No. 26 -27_Screenshot.png
          Step No. 26 -27_Screenshot.png
          115 kB
        14. Step No. 29_Screenshot.png
          Step No. 29_Screenshot.png
          24 kB
        15. Step No. 9 to 13.png
          Step No. 9 to 13.png
          84 kB
        16. support email body.png
          support email body.png
          26 kB
        17. support-email-mockup.png
          support-email-mockup.png
          18 kB
        18. support-form-no-smtp-config-mockup.png
          support-form-no-smtp-config-mockup.png
          43 kB

        Issue Links

          Activity

            People

              lameze Simey Lameze
              sanderbangma Sander Bangma
              Michael Hawkins Michael Hawkins
              Jun Pataleta Jun Pataleta
              Gladys Basiana Gladys Basiana
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 week, 2 days, 6 hours, 54 minutes
                  1w 2d 6h 54m

                  Clockify

                    Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.