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

get_users_by_capability() silently dying when choice answers

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9
    • Component/s: Choice, Roles / Access
    • Labels:
      None
    • Environment:
      etch, mysql
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      Come across some very weird bug which is causing a silent dying in get_records_sql() ~370 of accesslib.php

      I discovered some problem with choice answers not appearing and reproduced it by:

      1/ create blank course as admin user
      2/ admin user creating a choice
      3/ admin user answers choice
      4/ view choice responses - get nothing
      5/ add admin user as teacher to choice
      6/ try to view responses

      php is silently dying somwhere (despite full dev debugging). Working through trying to discover where its dying it seems to be in get_records_sql!

      echoed query out:

      SELECT u.id FROM user u
      INNER JOIN role_assignments ra ON ra.userid = u.id
      INNER JOIN role r ON r.id = ra.roleid
      LEFT OUTER JOIN user_lastaccess ul ON (ul.userid = u.id ) WHERE ra.contextid IN (73220,73210,61,1)
      AND u.deleted = 0
      AND ra.roleid in (41,31,21,11)

      ORDER BY u.id ASC

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              martinlanghoff Martín Langhoff
              Reporter:
              poltawski Dan Poltawski
              Tester:
              Nobody
              Participants:
              Component watchers:
              Dan Marsden, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona), Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                3/Mar/08