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

grous and pinned blocks don't have contexts, but get_child_contexts thinks they do

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Critical Critical
    • 1.9.5
    • 1.9.4
    • Roles / Access
    • None
    • MOODLE_19_STABLE
    • MOODLE_19_STABLE

      function get_child_contexts($context) {
      // ...
      case CONTEXT_COURSE:
      // ...
      $sql = " SELECT ctx.*
      FROM

      {context} ctx
      WHERE ctx.path LIKE ?
      AND ctx.contextlevel IN (".CONTEXT_MODULE.",".CONTEXT_BLOCK.")
      UNION
      SELECT ctx.*
      FROM {context}

      ctx
      JOIN

      {groups}

      g ON (ctx.instanceid=g.id AND ctx.contextlevel=".CONTEXT_GROUP.")
      WHERE g.courseid=?
      UNION
      SELECT ctx.*
      FROM

      {context}

      ctx
      JOIN

      {block_pinned}

      b ON (ctx.instanceid=b.blockid AND ctx.contextlevel=".CONTEXT_BLOCK.")
      WHERE b.pagetype='course-view'";

      That is so wrong!

            skodak Petr Skoda
            timhunt Tim Hunt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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