Moodle
  1. Moodle
  2. MDL-29192

It appears the arguments to email_to_user within mod/forum/lib.php::forum_cron are wrong

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.1, 2.2.4, 2.3.1, 2.4
    • Fix Version/s: 2.2.5, 2.3.2
    • Component/s: Forum
    • Labels:

      Description

      While reviewing other things in forums lib.php I noticed that the call to email_to_user within the forum_cron method (line 921 roughly) seem to incorrect, from memory the second argument should be a user also (from user?)

        Gliffy Diagrams

        1. MDL-29192.patch
          1 kB
          Sandareka Wickramanayake

          Activity

          Hide
          Sandareka Wickramanayake added a comment -

          Hello Sam,
          I also found your issue. But sometimes it may be intentional, because when $site->shortname is passed instead of $userfrom the email contains $site->shotname as the FromName and no email address for from email address. If $userfrom is passed FromName would be the name of the poster and email address would be that of the poster. It would be better, I guess. Anyway here I have attached the patch.

          Thank you

          Sandareka

          Show
          Sandareka Wickramanayake added a comment - Hello Sam, I also found your issue. But sometimes it may be intentional, because when $site->shortname is passed instead of $userfrom the email contains $site->shotname as the FromName and no email address for from email address. If $userfrom is passed FromName would be the name of the poster and email address would be that of the poster. It would be better, I guess. Anyway here I have attached the patch. Thank you Sandareka
          Hide
          Sandareka Wickramanayake added a comment -

          This issue is when sending forum digests

          Show
          Sandareka Wickramanayake added a comment - This issue is when sending forum digests
          Hide
          Dan Poltawski added a comment -

          I just came across this issue and reviewed the usage. Like Sandareka says, this is intentional so that the name is used.

          I was going to close not a bug, but instead i'll submit this minor comment clarification for integration.

          Show
          Dan Poltawski added a comment - I just came across this issue and reviewed the usage. Like Sandareka says, this is intentional so that the name is used. I was going to close not a bug, but instead i'll submit this minor comment clarification for integration.
          Hide
          Eloy Lafuente (stronk7) 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
          Eloy Lafuente (stronk7) 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
          Eloy Lafuente (stronk7) added a comment -

          Integrated (22, 23 & master), thanks!

          Show
          Eloy Lafuente (stronk7) added a comment - Integrated (22, 23 & master), thanks!
          Hide
          Eloy Lafuente (stronk7) added a comment -

          For the good and the bad... this is now part of Moodle and people around the world will start using it immediately, what a responsibility!

          Many thanks for your collaboration, yay!

          Closing, ciao

          Show
          Eloy Lafuente (stronk7) added a comment - For the good and the bad... this is now part of Moodle and people around the world will start using it immediately, what a responsibility! Many thanks for your collaboration, yay! Closing, ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: