Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-7760

sendemail function not working

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 3.5.5
    • None
    • 3.7.0 2019060300
    • MOODLE_35_STABLE

      In SQL reports, if a field has the name sendmail (e.g. SELECT u.email as sendemail) then in the output there are tick boxes and a button to send selected users a common email. 

      Emails are not being sent however.

      Steps to reproduce: 

      1. In configurable reports with a SQL report that selects email filed and is called sendemail (e.g. SELECT u.email as sendemail, u.lastname AS last FROM mdl_user AS u)
      2. tick one or more rows
      3. press Send email button at bottom of page
      4. fill in email title and text
      5. press Send

      Emails not sent.

      Debug Errors reported

      Notice: Undefined index: userids in /home/proskills/public_html/moodle/blocks/configurable_reports/send_emails.php on line 61

      Warning: implode(): Invalid arguments passed in /home/proskills/public_html/moodle/blocks/configurable_reports/send_emails.php on line 61
      Did you remember to call setType() for 'usersids'? Defaulting to PARAM_RAW cleaning.
      line 1354 of /lib/formslib.php: call to debugging()
      line 312 of /lib/formslib.php: call to moodleform->detectMissingSetType()
      line 218 of /lib/formslib.php: call to moodleform->_process_submission()
      line 61 of /blocks/configurable_reports/send_emails.php: call to moodleform->__construct()
      Did you remember to call setType() for 'courseid'? Defaulting to PARAM_RAW cleaning.
      line 1354 of /lib/formslib.php: call to debugging()
      line 312 of /lib/formslib.php: call to moodleform->detectMissingSetType()
      line 218 of /lib/formslib.php: call to moodleform->_process_submission()
      line 61 of /blocks/configurable_reports/send_emails.php: call to moodleform->__construct()
      Can not send email to null user
      line 5803 of /lib/moodlelib.php: call to debugging()
      line 68 of /blocks/configurable_reports/send_emails.php: call to email_to_user()
      This page did not call $PAGE->set_url(...). Using https://proskillsonline.com/moodle/blocks/configurable_reports/send_emails.php
      line 600 of /lib/pagelib.php: call to debugging()
      line 820 of /lib/pagelib.php: call to moodle_page->magic_get_url()
      line 104 of /blocks/quickcourselist/block_quickcourselist.php: call to moodle_page->__get()
      line 288 of /blocks/moodleblock.class.php: call to block_quickcourselist->get_content()
      line 230 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
      line 1216 of /lib/blocklib.php: call to block_base->get_content_for_output()
      line 1268 of /lib/blocklib.php: call to block_manager->create_block_contents()
      line 604 of /lib/outputrenderers.php: call to block_manager->ensure_content_created()
      line 75 of /theme/essential/classes/output/core_renderer.php: call to core_renderer->standard_head_html()
      line 38 of /theme/essential/layout/redirect.php: call to theme_essential\output\core_renderer->standard_head_html()
      line 1287 of /lib/outputrenderers.php: call to include()
      line 1217 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
      line 1136 of /lib/outputrenderers.php: call to core_renderer->header()
      line 2869 of /lib/weblib.php: call to core_renderer->redirect_message()
      line 71 of /blocks/configurable_reports/send_emails.php: call to redirect()

       

      Seems to be a typo on line 61. Replace userids with usersids

       

      This is a great feature. hope we can resolve

      Mik 

            jleyva Juan Leyva
            mikoleary Mik O'Leary (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:

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