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

Enrolling problems in version 3.5.1

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Deferred
    • Affects Version/s: 3.5.1
    • Fix Version/s: None
    • Component/s: Enrolments
    • Labels:
      None
    • Affected Branches:
      MOODLE_35_STABLE

      Description

      Hello,

      we have problem with enroling our students into moodle courses. We are using enrolment method database, but from version 3.5.1 we have problem with that. 

      We can enroll a small amount of students (ex. 500, but we have a lot of other users, around 53000). After running command we get this error:

      Starting user enrolment synchronisation...
      dml_write_exception: Napaka pri pisanju v podatkovno bazo in /var/www/moodle/lib/dml/moodle_database.php:489
      Stack trace:
      #0 /var/www/moodle/lib/dml/mysqli_native_moodle_database.php(1139): moodle_database->query_end(false)
      #1 /var/www/moodle/lib/grade/grade_category.php(927): mysqli_native_moodle_database->execute('UPDATE mdl_grad...', Array)
      #2 /var/www/moodle/lib/grade/grade_category.php(793): grade_category->set_usedinaggregation('62245', Array, Array, Array, Array)
      #3 /var/www/moodle/lib/grade/grade_category.php(567): grade_category->aggregate_grades('62245', Array, Array, NULL, Array, Array, Array)
      #4 /var/www/moodle/lib/grade/grade_item.php(736): grade_category->generate_grades(62245)
      #5 /var/www/moodle/lib/gradelib.php(1256): grade_item->regrade_final_grades(62245)
      #6 /var/www/moodle/lib/grade/grade_item.php(2017): grade_regrade_final_grades('16496', 62245, Object(grade_item))
      #7 /var/www/moodle/lib/gradelib.php(284): grade_item->update_raw_grade(62245, NULL, 'mod/forum', false, '0', 0, NULL, NULL, Object(grade_grade))
      #8 /var/www/moodle/mod/forum/lib.php(1755): grade_update('mod/forum', '16496', 'mod', 'forum', '1455', 0, Array, Array)
      #9 /var/www/moodle/mod/forum/lib.php(1711): forum_grade_item_update(Object(stdClass), Object(stdClass))
      #10 /var/www/moodle/lib/gradelib.php(1381): forum_update_grades(Object(stdClass), 62245)
      #11 /var/www/moodle/lib/gradelib.php(1351): grade_update_mod_grades(Object(stdClass), 62245)
      #12 /var/www/moodle/lib/gradelib.php(1105): grade_grab_course_grades('16496', NULL, 62245)
      #13 /var/www/moodle/lib/enrollib.php(1929): grade_recover_history_grades(62245, '16496')
      #14 /var/www/moodle/enrol/database/lib.php(550): enrol_plugin->enrol_user(Object(stdClass), 62245, '5', 0, 0, 0)
      #15 /var/www/moodle/enrol/database/cli/sync.php(87): enrol_database_plugin->sync_enrolments(Object(text_progress_trace))
      #16 {main}

       

      This error is, we think, related to sync_user_enrollments and is somehow connected with grades in moodle. If we print out query where enrolling chrashed:

      Starting user enrolment synchronisation...
      UPDATE mdl_grade_grades
      SET aggregationstatus = 'used',
      aggregationweight = ?
      WHERE itemid = ? AND userid = ?float(0,11111111111111)
      int(14973)
      string(5) "70741"
      NULL
      NULL
      NULL
      dml_write_exception: Napaka pri pisanju v podatkovno bazo in /var/www/moodle/lib/dml/moodle_database.php:496

      This is very urgent for us, can you help us as soon as possible??

      Please! Thank you.

      Our environment:

      PHP 7, MariaDB 10.1, Debian 9

      For enrolling we are using MSSQL server (2016) and PHP plug in PDO_sqlsrv.

       

      Thank you!

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              erikf Erik
              Participants:
              Component watchers:
              Amaia Anabitarte, Bas Brands, Carlos Escobedo, Sara Arjona (@sarjona), Víctor Déniz Falcón
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: