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

Create a better mechanism for outputting progress information from batch jobs

    XMLWordPrintable

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Libraries
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      I hate the sort of

      if ($feedback) {
      echo ...;
      }

      or

      if (!defined('RESTORE_SILENTLY'))

      { echo "<ul>"; }

      code we have around the place.

      Instead, I am going to make a moodle_progress_trace class with a single output($message) method, with subclasses like null_progress_trace, text_progress_trace, html_progress_trace, etc. Then the batch code can just do $feedback->message('...'); and the right thing will happen.

        Attachments

          Activity

            People

            Assignee:
            timhunt Tim Hunt
            Reporter:
            timhunt Tim Hunt
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              24/Nov/10