Uploaded image for project: 'Plugins'
  1. Plugins
  2. CONTRIB-317

SQL error generating certificate

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.9
    • Fix Version/s: 1.9.1
    • Component/s: Module: Certificate
    • Labels:
      None
    • Environment:
      Linux, MySQL 4.1.18
    • Database:
      MySQL
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE

      Description

      I've downloaded the most recent copies of Certificate and Moodle 1.9 (official) today and receive an error when clicking on the button to get the certificate. Not sure if this is possibly related to CONTRIB-315.

      Unknown table 'ul' in field list

      SELECT u.*, ul.timeaccess as lastaccess FROM tmdl_user u JOIN (SELECT DISTINCT ssra.userid FROM tmdl_role_assignments ssra WHERE ssra.contextid IN (1,4,5) AND ssra.roleid IN (3,8) ) ra ON ra.userid = u.id WHERE u.deleted = 0 ORDER BY ul.timeaccess DESC

      line 686 of lib/dmllib.php: call to debugging()
      line 944 of lib/dmllib.php: call to get_recordset_sql()
      line 4576 of lib/accesslib.php: call to get_records_sql()
      line 749 of lib/deprecatedlib.php: call to get_users_by_capability()
      line 324 of mod/certificate/lib.php: call to get_course_teachers()
      line 570 of mod/certificate/lib.php: call to certificate_email_teachers()
      line 112 of mod/certificate/view.php: call to certificate_issue()

      Warning: array_keys(): The first argument should be an array in /home/httpd/httpdocs/moodle-test/lib/accesslib.php on line 4924

      Warning: implode(): Bad arguments. in /home/httpd/httpdocs/moodle-test/lib/accesslib.php on line 4924

      You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND ra.contextid IN (1,4,5)

      SELECT ra.userid FROM tmdl_role_assignments ra JOIN tmdl_role r ON ra.roleid=r.id JOIN tmdl_context ctx ON ra.contextid=ctx.id WHERE ra.userid IN () AND ra.contextid IN (1,4,5) ORDER BY ctx.depth DESC, /* locality wins / r.sortorder ASC, / rolesorting 2nd criteria / ra.id / role assignment order tie-breaker */

      line 1165 of lib/dmllib.php: call to debugging()
      line 4956 of lib/accesslib.php: call to get_fieldset_sql()
      line 750 of lib/deprecatedlib.php: call to sort_by_roleassignment_authority()
      line 324 of mod/certificate/lib.php: call to get_course_teachers()
      line 570 of mod/certificate/lib.php: call to certificate_email_teachers()
      line 112 of mod/certificate/view.php: call to certificate_issue()

      Warning: Invalid argument supplied for foreach() in /home/httpd/httpdocs/moodle-test/lib/accesslib.php on line 4960

      Warning: Cannot modify header information - headers already sent by (output started at /home/httpd/httpdocs/moodle-test/lib/weblib.php:6141) in /home/httpd/httpdocs/moodle-test/lib/fpdf/fpdf.php on line 1035
      FPDF error: Some data has already been output to browser, can't send PDF file

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              me Chardelle Busch
              Reporter:
              bschmidt Brian Schmidt
              Participants:
              Component watchers:
              Mark Nelson
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                15/May/08