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

Check for regressions caused by accesslib updates

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Critical
    • 2.2
    • 2.2
    • Libraries

    Description

      After the accesslib changes in MDL-29602, a number of regressions have been found.

      In 2.2, get_context_instance(xxxxx, CONTEXT_USER) can now return false in some cases (like if the user is deleted).

      However, some old code always assumes that a context is returned eg:

       $usercontextid = get_context_instance(CONTEXT_USER, $userid)->id;

      Someone must check all the calls to get_context_instance(xxxxx, CONTEXT_USER) and make sure they are handling the case of a returned "false" correctly, eg for the above:

       $usercontext = get_context_instance(CONTEXT_USER, $userid);
       
       if (!$usercontext) {
          continue;
       }

      Attachments

        Issue Links

          Activity

            People

              skodak Petr Skoda (Inactive)
              dougiamas Martin Dougiamas
              Sam Hemelryk Sam Hemelryk
              Sam Hemelryk Sam Hemelryk
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

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