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

get_users_by_capability() silently dying when choice answers

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 1.9
    • 1.9
    • Choice, Roles / Access
    • None
    • etch, mysql
    • MySQL
    • MOODLE_19_STABLE
    • 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

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

              Dates

                Created:
                Updated:
                Resolved:
                3/Mar/08