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

Text Backup Mail confusing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.5.4
    • 3.5.2, 3.6
    • Backup
    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • MOODLE_35_STABLE
    • MDL-63920-master
    • Hide

      In a site with some courses...

      1. As an admin go to: Site administration / Courses / Backups /  Automated backup setup
      2. Set setting "backup_auto_active" to "Manual"
      3. Enable every day in backup_auto_weekdays
      4. Set backup_auto_hour to a time very soon to happen.
      5. Set $CFG->noemailever = true; in config.php
      6. Wait until the backup_auto_hour time has passed.
      7. Change lib/moodlelib.php to add a var_dump($messagetext) inside email_to_user() function. More or less like this:

        diff --git a/lib/moodlelib.php b/lib/moodlelib.php
        index 18e7a74cef5..ee375c9efd4 100644
        --- a/lib/moodlelib.php
        +++ b/lib/moodlelib.php
        @@ -5818,6 +5818,7 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml = '',
                                $usetrueaddress = true, $replyto = '', $replytoname = '', $wordwrapwidth = 79) {
         
             global $CFG, $PAGE, $SITE;
        +    var_dump($messagetext);
         
             if (empty($user) or empty($user->id)) {
                 debugging('Can not send email to null user', DEBUG_DEVELOPER);
        

      8. Run php admin/cli/automated_backups.php
      9. Verify the output contains:

      ==================================================
      Courses: 2
      OK: 2
      Skipped: 0
      Error: 0
      Unfinished: 0
      Warning: 0
      Automated backup pending: 0

      Backup completed successfully

      (The numbers do not matter, but it should have : instead of ; )

      Show
      In a site with some courses... As an admin go to: Site administration / Courses / Backups /  Automated backup setup Set setting "backup_auto_active" to "Manual" Enable every day in backup_auto_weekdays Set backup_auto_hour to a time very soon to happen. Set $CFG->noemailever = true; in config.php Wait until the backup_auto_hour time has passed. Change lib/moodlelib.php to add a var_dump($messagetext) inside  email_to_user() function. More or less like this: diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 18e7a74cef5..ee375c9efd4 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -5818,6 +5818,7 @@ function email_to_user($user, $from, $subject, $messagetext, $messagehtml = '', $usetrueaddress = true, $replyto = '', $replytoname = '', $wordwrapwidth = 79) { global $CFG, $PAGE, $SITE; + var_dump($messagetext); if (empty($user) or empty($user->id)) { debugging('Can not send email to null user', DEBUG_DEVELOPER); Run php admin/cli/automated_backups.php Verify the output contains: ================================================== Courses: 2 OK: 2 Skipped: 0 Error: 0 Unfinished: 0 Warning: 0 Automated backup pending: 0 Backup completed successfully (The numbers do not matter, but it should have : instead of ; )

      The test of the backup mail contains:


      Bijeenkomsten en Trainingen; 25
      OK; 7
      Overgeslagen; 17
      Fout; 1


      The dot comma ; is confusing. In this case often read as 25 ok, 7 skipped and 17 wrong. I know it is a small thing, but could you replace the ; with a double dot: ?

      Thx

      Bert

        1. MDL-63920.PNG
          14 kB
          Anna Carissa Sadia

            damyon Damyon Wiese
            bertvanderhooft Bert van der Hooft
            Amaia Anabitarte Amaia Anabitarte
            Eloy Lafuente (stronk7) Eloy Lafuente (stronk7)
            Anna Carissa Sadia Anna Carissa Sadia
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 30 minutes
                1h 30m

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