Moodle
  1. Moodle
  2. MDL-31335

Tidy up use of mtrace from within email_to_user

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.4, 2.2.1, 2.3
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Messages
    • Labels:
    • Testing Instructions:
      Hide

      You will need two users. It helps if you turn maxeditingtime down to 1 minute.

      Check that the email recipient is subscribed to a particular forum.

      Check their messaging preferences to make sure that forum post notifications go to email when they are both on and offline.

      On the messaging preferences page also check what email address their email notifications go to.

      As another user post in the subscribed forum.

      Wait for editing time to expire. Run /admin/cron.php

      Check that the cron output contains something like the below. If you dont see this your editing time probably hasnt elapsed yet.

      Processing user 6
      Sending post 5: test news topic"
      

      Check that the cron output contains no errors and that your user receives the email notification.

      Show
      You will need two users. It helps if you turn maxeditingtime down to 1 minute. Check that the email recipient is subscribed to a particular forum. Check their messaging preferences to make sure that forum post notifications go to email when they are both on and offline. On the messaging preferences page also check what email address their email notifications go to. As another user post in the subscribed forum. Wait for editing time to expire. Run /admin/cron.php Check that the cron output contains something like the below. If you dont see this your editing time probably hasnt elapsed yet. Processing user 6 Sending post 5: test news topic" Check that the cron output contains no errors and that your user receives the email notification.
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-31335_mtrace_email
    • Rank:
      37808

      Description

      While working on MDL-31202 Petr noticed that there are several calls to mtrace within email_to_user that should be altered so that they are not called if this function is called from a web page.
      Have a look at Petr's solution for the noted issue for a good example of what should be done.

        Issue Links

          Activity

          Hide
          Ankit Agarwal added a comment -

          Hi Andrew,
          Changes Looks good to me. Just wondereing using English strings directly is allowed in the logs? Shouldn't we be using something that can be translated?
          Thanks

          Show
          Ankit Agarwal added a comment - Hi Andrew, Changes Looks good to me. Just wondereing using English strings directly is allowed in the logs? Shouldn't we be using something that can be translated? Thanks
          Hide
          Andrew Davis added a comment - - edited

          Ankit, we dont usually translate log or debugging type messages as they seen by relatively few people. The translators have a big back log and have no real way to know which strings are important so we only put strings in the lang files, thus making them translatable, that are going to be seen by lots of people. That essentially means strings within the UI go into a lang file. Log and debugging type messages get hard coded in English.

          Show
          Andrew Davis added a comment - - edited Ankit, we dont usually translate log or debugging type messages as they seen by relatively few people. The translators have a big back log and have no real way to know which strings are important so we only put strings in the lang files, thus making them translatable, that are going to be seen by lots of people. That essentially means strings within the UI go into a lang file. Log and debugging type messages get hard coded in English.
          Hide
          Ankit Agarwal added a comment -

          Thanks for explaining that Andrew.

          Show
          Ankit Agarwal added a comment - Thanks for explaining that Andrew.
          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
          Aparup Banerjee added a comment -

          This looks good to integrate in the coming cycle.

          FTR ref implementation @ http://fisheye.moodle.org/changelog/Moodle?cs=d23fd32be1da9ccdcdf0baf89579952bcb4a92b0

          Show
          Aparup Banerjee added a comment - This looks good to integrate in the coming cycle. FTR ref implementation @ http://fisheye.moodle.org/changelog/Moodle?cs=d23fd32be1da9ccdcdf0baf89579952bcb4a92b0
          Hide
          Aparup Banerjee added a comment -

          integrated and up for testing across the branches.

          Show
          Aparup Banerjee added a comment - integrated and up for testing across the branches.
          Hide
          Rajesh Taneja added a comment -

          Works Great
          Thanks for fixing this Andrew.

          Show
          Rajesh Taneja added a comment - Works Great Thanks for fixing this Andrew.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          Well,

          I wish I said it every time
          you do the things you do.
          You always lend a helping hand,
          and I'm filled with gratitude.

          You are strong and generous
          for each and everyone one of us.
          I am eternally grateful,
          I cannot say thanks enough.

          Sorry for the (un)cool bit above, lol. Closing this as fixed. Ciao

          Show
          Eloy Lafuente (stronk7) added a comment - Well, I wish I said it every time you do the things you do. You always lend a helping hand, and I'm filled with gratitude. You are strong and generous for each and everyone one of us. I am eternally grateful, I cannot say thanks enough. Sorry for the (un)cool bit above, lol. Closing this as fixed. Ciao

            People

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

              Dates

              • Created:
                Updated:
                Resolved: