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

PHP Notice: Error: mdb->get_record() found more than one record!* line 1570 of /lib/dml/moodle_database.php: call to debugging()

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.3.5, 3.4.3, 3.5
    • Fix Version/s: 3.4.5, 3.5.2
    • Component/s: Assignment
    • Labels:
    • Testing Instructions:
      Hide

      Testing steps:

      1. As Admin:
        • Create Course A and B and enrol some test teachers and students
      2. In Course B (as Admin / Teacher):
        • Create Groups for participants
        • Create Assignment with Group Submissions enabled
      3. Click on the created Course B Assignment
        • Click on the Assignment 'Cog' icon > select 'Group overrides'
        • Click on 'Add group override' button
        • Select an available Group to create an 'Override group' setting
        • Change the 'Due date' date/time value, and click 'Save' button
      4. In Course A (as Admin / Teacher):
        • Click on the Course 'Cog' icon > select 'Import' menu option
        • Check Course B and click 'Continue' button
        • Uncheck all Backup settings checkbox options except for 'Include activities and resources', and click 'Next' button
        • Ensure the Topic containing the Assignment created in Step 2 is selected, and click 'Next' button
        • Click 'Perform import' button
        • Click 'Continue' button
      5. Run cron task php admin/cli/cron.php.
      6. In the cron output, you should NOT see any error message (NOTE: line number can be different on different Moodle releases)

        Notice: Undefined property: stdClass::$groupid in /home/zig/moodles/stable_master/moodle/mod/assign/lib.php on line 261
        

      7. In Course A (as Admin / Teacher):
        • Access the imported Assignment from Course B completed in Step 4.
        • Click on the Assignment 'Cog' icon > select 'Edit settings'
        • Edit the 'Due date', 'Cut-off date', 'Reminded me to grade by' values, and click 'Save and return to course' button.
        • The edited Assignment should save correctly without any errors.
      Show
      Testing steps: As Admin: Create Course A and B and enrol some test teachers and students In Course B (as Admin / Teacher): Create Groups for participants Create Assignment with Group Submissions enabled Click on the created Course B Assignment Click on the Assignment 'Cog' icon > select 'Group overrides' Click on 'Add group override' button Select an available Group to create an 'Override group' setting Change the 'Due date' date/time value, and click 'Save' button In Course A (as Admin / Teacher): Click on the Course 'Cog' icon > select 'Import' menu option Check Course B and click 'Continue' button Uncheck all Backup settings checkbox options except for 'Include activities and resources', and click 'Next' button Ensure the Topic containing the Assignment created in Step 2 is selected, and click 'Next' button Click 'Perform import' button Click 'Continue' button Run cron task php admin/cli/cron.php . In the cron output, you should NOT see any error message (NOTE: line number can be different on different Moodle releases) Notice: Undefined property: stdClass::$groupid in /home/zig/moodles/stable_master/moodle/mod/assign/lib.php on line 261 In Course A (as Admin / Teacher): Access the imported Assignment from Course B completed in Step 4. Click on the Assignment 'Cog' icon > select 'Edit settings' Edit the 'Due date', 'Cut-off date', 'Reminded me to grade by' values, and click 'Save and return to course' button. The edited Assignment should save correctly without any errors.
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
    • Pull Master Branch:
      MDL-61870-master

      Description

      On my site this happens after editting assignment imported from different course.

      The full error is:

      PHP Notice: Undefined property: stdClass::$groupid in /var/www/moodle/web.git/mod/assign/lib.php on line 262 PHP Notice: Undefined property: stdClass::$groupid in /var/www/moodle/web.git/mod/assign/lib.php on line 262

      PHP Notice: Undefined property: stdClass::$groupid in /var/www/moodle/web.git/mod/assign/lib.php on line 262

      PHP Notice: Error: mdb->get_record() found more than one record!* line 1570 of /lib/dml/moodle_database.php: call to debugging()

      • * line 1631 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
      • * line 1612 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
      • * line 1196 of /mod/assign/locallib.php: call to moodle_database->get_field_select()
      • * line 162 of /mod/assign/lib.php: call to assign->update_calendar()
      • * line 116 of /mod/assign/lib.php: call to assign_prepare_update_events()
      • * line ? of unknownfile: call to assign_refresh_events()
      • * line 1456 of /course/lib.php: call to call_user_func()
      • * line 1438 of /course/lib.php: call to course_module_calendar_event_update_process()
      • * line 74 of /lib/classes/task/refresh_mod_calendar_events_task.php: call to course_module_bulk_update_calendar_events()
      • * line 81 of /lib/cronlib.php: call to core\task\refresh_mod_calendar_events_task->execute()
      • * line 61 of /admin/cli/cron.php: call to cron_run() in /var/www/moodle/web.git/lib/weblib.php on line 3111

      PHP Notice: Undefined property: stdClass::$groupid in /var/www/moodle/web.git/mod/assign/lib.php on line 262

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  10/Sep/18

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 10 minutes
                  1h 10m