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

cron should not use globals $PAGE or $USER. function cron_setup_user should go

    XMLWordPrintable

Details

    • Bug
    • Status: Reopened
    • Major
    • Resolution: Unresolved
    • 2.0
    • None
    • Administration

    Description

      I think that any code that may be used in a cron script should not rely on the globals $PAGE, $USER, etc.

      Instead, it should take an explicit $page, $user arguments to any functions. Then we could delete the cron_setup_user function completely.

      If that is not possible, perhaps for backwards compatibility, then we should not try to modify the global $PAGE. Instead we should create a new one when necessary.

      Attachments

        Activity

          People

            Unassigned Unassigned
            timhunt Tim Hunt
            Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: