XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Duplicate
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Course, Database SQL/XMLDB
    • Labels:
    • Environment:
      Windows 2008 R2 X64, IIS 7.5, PHP 5.3.3 NTS (X86). The server is running in a VM (hyper-v).
      The database is a local install of SQL Express 2008 R2.
    • Database:
      Microsoft SQL
    • URL:
      admin/user.php
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      I have been testing LDAP course enrollment. I got a config that works and I was trying to delete all the existing classes and users again from scratch. Trying to delete users or courses post the following error:

      DELETING CLASSES

      Debug info: The ntext data type cannot be selected as DISTINCT because it is not comparable.
      SELECT DISTINCT e.*
      FROM mdl_enrol e
      JOIN mdl_user_enrolments ue ON (ue.enrolid = e.id AND ue.userid = ?)
      JOIN mdl_enrol pe ON (pe.courseid = e.customint1 AND pe.enrol <> 'meta' AND pe.courseid = ?)
      LEFT JOIN mdl_user_enrolments pue ON (pue.enrolid = pe.id AND pue.userid = ue.userid)
      WHERE pue.id IS NULL
      [array (
      0 => '11',
      1 => '2789',
      )]
      Stack trace:
      line 391 of \lib\dml\moodle_database.php: dml_read_exception thrown
      line 247 of \lib\dml\mssql_native_moodle_database.php: call to moodle_database->query_end()
      line 699 of \lib\dml\mssql_native_moodle_database.php: call to mssql_native_moodle_database->query_end()
      line 728 of \lib\dml\mssql_native_moodle_database.php: call to mssql_native_moodle_database->get_recordset_sql()
      line 159 of \enrol\meta\locallib.php: call to mssql_native_moodle_database->get_records_sql()
      line ? of unknownfile: call to enrol_meta_handler::user_unenrolled()
      line 296 of \lib\eventslib.php: call to call_user_func()
      line 515 of \lib\eventslib.php: call to events_dispatch()
      line 1174 of \lib\enrollib.php: call to events_trigger()
      line 1380 of \lib\enrollib.php: call to enrol_plugin->unenrol_user()
      line 727 of \lib\enrollib.php: call to enrol_plugin->delete_instance()
      line 4178 of \lib\moodlelib.php: call to enrol_course_delete()
      line 4131 of \lib\moodlelib.php: call to remove_course_contents()
      line 3152 of \course\lib.php: call to delete_course()
      line 149 of \course\index.php: call to category_delete_full()

      DELETING USER

      Debug info: The ntext data type cannot be selected as DISTINCT because it is not comparable.
      SELECT DISTINCT e.*
      FROM mdl_enrol e
      JOIN mdl_user_enrolments ue ON (ue.enrolid = e.id AND ue.userid = ?)
      JOIN mdl_enrol pe ON (pe.courseid = e.customint1 AND pe.enrol <> 'meta' AND pe.courseid = ?)
      LEFT JOIN mdl_user_enrolments pue ON (pue.enrolid = pe.id AND pue.userid = ue.userid)
      WHERE pue.id IS NULL
      [array (
      0 => '13',
      1 => '2672',
      )]
      Stack trace:
      line 391 of \lib\dml\moodle_database.php: dml_read_exception thrown
      line 247 of \lib\dml\mssql_native_moodle_database.php: call to moodle_database->query_end()
      line 699 of \lib\dml\mssql_native_moodle_database.php: call to mssql_native_moodle_database->query_end()
      line 728 of \lib\dml\mssql_native_moodle_database.php: call to mssql_native_moodle_database->get_recordset_sql()
      line 159 of \enrol\meta\locallib.php: call to mssql_native_moodle_database->get_records_sql()
      line ? of unknownfile: call to enrol_meta_handler::user_unenrolled()
      line 296 of \lib\eventslib.php: call to call_user_func()
      line 515 of \lib\eventslib.php: call to events_dispatch()
      line 1174 of \lib\enrollib.php: call to events_trigger()
      line 1471 of \lib\enrollib.php: call to enrol_plugin->unenrol_user()
      line 708 of \lib\enrollib.php: call to enrol_plugin->user_delete()
      line 3597 of \lib\moodlelib.php: call to enrol_user_delete()
      line 76 of \admin\user.php: call to delete_user()

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stronk7 Eloy Lafuente (stronk7)
                Reporter:
                ingle28 Thomas Ingle
                Participants:
                Component watchers:
                Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Jake Dallimore, Jun Pataleta
              • Votes:
                1 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: