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

When enrolling students in a course, looking for the next 25 students in the selection control results in an error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Won't Fix
    • Affects Version/s: 2.0
    • Fix Version/s: None
    • Component/s: Course
    • Labels:
      None
    • Environment:
      Windows Server 2008, IIS7, php 5.2.13, mssql.
    • Database:
      Microsoft SQL
    • Affected Branches:
      MOODLE_20_STABLE

      Description

      When enrolling students in a course, looking for the next 25 students in the selection control results in an error.

      To reproduce:
      1) Select a course to access Course Administration block
      2) access 'Edit settings->Users->Enrolled Users'
      3) Click the 'Enrol' button. A list control appears with available students in it.
      4) Scroll to the bottom of the list, and click the 'Next 25...' link.

      Expected: A selection of the next 25 site users to enrol.

      Got: a 'Syntax error' in the control.

      Debug output:
      JSON.parse
      File: theme/yui_combo.php?3.2.0/build/event-custom/event-custom-debug.js&
      3.2.0/build/attribute/attribute-base-debug.js&3.2.0/build/base/base-debug.js&
      3.2.0/build/event/event-synthetic-debug.js&3.2.0/build/event/event-mouseenter-debug.js&
      3.2.0/build/event/event-resize-debug.js&3.2.0/build/queue-promote/queue-promote-debug.js&
      3.2.0/build/datatype/datatype-xml-debug.js&3.2.0/build/io/io-debug.js&3.2.0/build/json/json-parse-debug.js&
      Line: 7576

      Stack trace:

      ln: 7576
      /theme/yui_combo.php?3.2.0/build/event-custom/event-custom-debug.js&3.2.0/b
      ("
      Did you remember to make the first column something unique in your call to get_records? Duplicate value '1' found in column 'line2'.

      • line 847 of \\lib\\dml
        sqlsrv_native_moodle_database.php: call to debugging()
      • line 294 of \\enrol
        locallib.php: call to sqlsrv_native_moodle_database->get_records_sql()
      • line 129 of \\enrol
        ajax.php: call to course_enrolment_manager->get_potential_users()

      Did you remember to make the first column something unique in your call to get_records? Duplicate value '1' found in column 'line2'.

      • line 847 of \\lib\\dml
        sqlsrv_native_moodle_database.php: call to debugging()
      • line 294 of \\enrol
        locallib.php: call to sqlsrv_native_moodle_database->get_records_sql()
      • line 129 of \\enrol
        ajax.php: call to course_enrolment_manager->get_potential_users()

      Did you remember to make the first column something unique in your call to get_records? Duplicate value '1' found in column 'line2'.

      • line 847 of \\lib\\dml
        sqlsrv_native_moodle_database.php: call to debugging()
      • line 294 of \\enrol
        locallib.php: call to sqlsrv_native_moodle_database->get_records_sql()
      • line 129 of \\enrol
        ajax.php: call to course_enrolment_manager->get_potential_users()

      Did you remember to make the first column something unique in your call to get_records? Duplicate value '1' found in column 'line2'.

      • line 847 of \\lib\\dml
        sqlsrv_native_moodle_database.php: call to debugging()
      • line 294 of \\enrol
        locallib.php: call to sqlsrv_native_moodle_database->get_records_sql()
      • line 129 of \\enrol
        ajax.php: call to course_enrolment_manager->get_potential_users()

      Did you remember to make the first column something unique in your call to get_records? Duplicate value '1' found in column 'line2'.

      • line 847 of \\lib\\dml
        sqlsrv_native_moodle_database.php: call to debugging()
      • line 294 of \\enrol
        locallib.php: call to sqlsrv_native_moodle_database->get_records_sql()
      • line 129 of \\enrol
        ajax.php: call to course_enrolment_manager->get_potential_users()

      Did you remember to make the first column something unique in your call to get_records? Duplicate value '1' found in column 'line2'.

      • line 847 of \\lib\\dml
        sqlsrv_native_moodle_database.php: call to debugging()
      • line 294 of \\enrol
        locallib.php: call to sqlsrv_native_moodle_database->get_records_sql()
      • line 129 of \\enrol
        ajax.php: call to course_enrolment_manager->get_potential_users()

      Did you remember to make the first column something unique in your call to get_records? Duplicate value '1' found in column 'line2'.

      • line 847 of \\lib\\dml
        sqlsrv_native_moodle_database.php: call to debugging()
      • line 294 of \\enrol
        locallib.php: call to sqlsrv_native_moodle_database->get_records_sql()
      • line 129 of \\enrol
        ajax.php: call to course_enrolment_manager->get_potential_users()

      Did you remember to make the first column something unique in your call to get_records? Duplicate value '1' found in column 'line2'.

      • line 847 of \\lib\\dml
        sqlsrv_native_moodle_database.php: call to debugging()
      • line 294 of \\enrol
        locallib.php: call to sqlsrv_native_moodle_database->get_records_sql()
      • line 129 of \\enrol
        ajax.php: call to course_enrolment_manager->get_potential_users()

      Did you remember to make the first column something unique in your call to get_records? Duplicate value '1' found in column 'line2'.

      • line 847 of \\lib\\dml
        sqlsrv_native_moodle_database.php: call to debugging()
      • line 294 of \\enrol
        locallib.php: call to sqlsrv_native_moodle_database->get_records_sql()
      • line 129 of \\enrol
        ajax.php: call to course_enrolment_manager->get_potential_users()

      Did you remember to make the first column something unique in your call to get_records? Duplicate value '1' found in column 'line2'.

      • line 847 of \\lib\\dml
        sqlsrv_native_moodle_database.php: call to debugging()
      • line 294 of \\enrol
        locallib.php: call to sqlsrv_native_moodle_database->get_records_sql()
      • line 129 of \\enrol
        ajax.php: call to course_enrolment_manager->get_potential_users()

      \nWarning: Cannot modify header information - headers already sent by (output started at C:\\inetpub\\wwwroot\\moodle\\lib
      weblib.php:2968) in C:\\inetpub\\wwwroot\\moodle\\enrol
      ajax.php on line 198
      \n{\"success\":true,\"response\":{\"totalusers\":32,\"users\":{\"1\":

      {\"line2\":1,\"id\":\"36\",\"auth\":\"manual\",\"confirmed\":1,\"policyagreed\":0,\"deleted\":0,\"suspended\":0,\"mnethostid\":\"1\",\"username\":\"user30\",\"password\":\"b589409c627f711dcf29bb4f225e5641\",\"idnumber\":\"\",\"firstname\":\"user\",\"lastname\":\"30\",\"email\":\"user30@example.com\",\"emailstop\":0,\"icq\":\"\",\"skype\":\"\",\"yahoo\":\"\",\"aim\":\"\",\"msn\":\"\",\"phone1\":\"\",\"phone2\":\"\",\"institution\":\"\",\"department\":\"\",\"address\":\"\",\"city\":\"Armidale\",\"country\":\"AU\",\"lang\":\"en\",\"theme\":\"\",\"timezone\":\"99\",\"firstaccess\":\"0\",\"lastaccess\":\"0\",\"lastlogin\":\"0\",\"currentlogin\":\"0\",\"lastip\":\"\",\"secret\":\"\",\"picture\":\"\\\"Picture<\\/a>\",\"url\":\"\",\"description\":\"\",\"descriptionformat\":1,\"mailformat\":1,\"maildigest\":0,\"maildisplay\":2,\"htmleditor\":1,\"ajax\":1,\"autosubscribe\":1,\"trackforums\":0,\"timecreated\":\"1285553364\",\"timemodified\":\"1285553364\",\"trustbitmask\":\"0\",\"imagealt\":null,\"screenreader\":0,\"line3\":\"36\",\"fullname\":\"user 30\"}

      }},\"error\":\"\"}")
      ln: 303
      /theme/yui_combo.php?moodle/235/enrol/enrolmentmanager/enrolmentmanager.js&
      (2,[object XMLHttpRequest],[object Object])
      ln: 6701
      /theme/yui_combo.php?3.2.0/build/yui/yui-base-debug.js&3.2.0/build/oop/oop-
      ([object Object],[object Array],[object Object])
      ln: 6730
      /theme/yui_combo.php?3.2.0/build/yui/yui-base-debug.js&3.2.0/build/oop/oop-
      ([object Array],[object Object])
      ln: 6463
      /theme/yui_combo.php?3.2.0/build/yui/yui-base-debug.js&3.2.0/build/oop/oop-
      ([object Object],[object Array],(void 0))
      ln: 6550
      /theme/yui_combo.php?3.2.0/build/yui/yui-base-debug.js&3.2.0/build/oop/oop-
      ([object Object],[object Array])
      ln: 6530
      /theme/yui_combo.php?3.2.0/build/yui/yui-base-debug.js&3.2.0/build/oop/oop-
      ([object Array])
      ln: 6519
      /theme/yui_combo.php?3.2.0/build/yui/yui-base-debug.js&3.2.0/build/oop/oop-
      (2,[object XMLHttpRequest])
      ln: 5926
      /theme/yui_combo.php?3.2.0/build/event-custom/event-custom-debug.js&3.2.0/b
      _ioComplete([object Object],[object Object])
      ln: 6218
      /theme/yui_combo.php?3.2.0/build/event-custom/event-custom-debug.js&3.2.0/b
      (0)

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: