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

Fatal error when deleting a shared external tool

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      Requirements
      1. Two sites.
      • One for your LTI consumer.
      • One for your LTI provider.
      On your LTI provider site.
      1. Visit 'Site administration' > 'Plugins' > 'Authentication' > 'Manage authentication'.
      2. Enable 'LTI'.
      3. Visit 'Site administration' > 'Plugins' > 'Enrolments' > 'Manage enrol plugins'.
      4. Enable 'Shared external tool'.
      5. Visit a course and create an assignment.
      6. Visit 'Course administration' > 'Users' > 'Enrolment methods'.
      7. Add a shared external tool with 'Tool to be provided' selected to your assignment.
      8. Visit 'Course administration' > 'Shared external tools'.
      9. Make note of the URL and secret.
      On your LTI consumer site.
      1. Visit a course.
      2. Add a LTI activity and use the URL and secret from your LTI provider site and enter any consumer key you want.
      3. Log in as a student.
      4. Visit the course and click on the LTI activity.
      On your LTI provider site.
      1. Visit 'Course administration' > 'Users' > 'Enrolled users'.
      2. Confirm that there is a user there associated with that shared external tool.
      3. Visit 'Course administration' > 'Shared external tools'.
      4. Ensure you can delete the tool without any issues.
      5. Visit 'Course administration' > 'Users' > 'Enrolment methods''.
      6. Check that the enrolment instance was also deleted.
      7. Visit 'Course administration' > 'Users' > 'Enrolled users'.
      8. Confirm that the user associated with that LTI provider is no longer present.
      Show
      Requirements Two sites. One for your LTI consumer. One for your LTI provider. On your LTI provider site. Visit 'Site administration' > 'Plugins' > 'Authentication' > 'Manage authentication'. Enable 'LTI'. Visit 'Site administration' > 'Plugins' > 'Enrolments' > 'Manage enrol plugins'. Enable 'Shared external tool'. Visit a course and create an assignment. Visit 'Course administration' > 'Users' > 'Enrolment methods'. Add a shared external tool with 'Tool to be provided' selected to your assignment. Visit 'Course administration' > 'Shared external tools'. Make note of the URL and secret. On your LTI consumer site. Visit a course. Add a LTI activity and use the URL and secret from your LTI provider site and enter any consumer key you want. Log in as a student. Visit the course and click on the LTI activity. On your LTI provider site. Visit 'Course administration' > 'Users' > 'Enrolled users'. Confirm that there is a user there associated with that shared external tool. Visit 'Course administration' > 'Shared external tools'. Ensure you can delete the tool without any issues. Visit 'Course administration' > 'Users' > 'Enrolment methods''. Check that the enrolment instance was also deleted. Visit 'Course administration' > 'Users' > 'Enrolled users'. Confirm that the user associated with that LTI provider is no longer present.
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-54030_master

      Description

      Steps to replicate

      1. Login as administrator.
      2. Follow Site administration ► Security ► HTTP security and enable 'Allow frame embedding'.
      3. Follow Site administration ► Plugins ► Authentication ► Manage authentication and enable 'LTI' authentication.
      4. Follow Site administration ► Plugins ► Enrolments ► Manage enrol plugins and enable 'Shared external tool'.
      5. Log out and log in as teacher.
      6. Visit a course with some activity (assignment)
      7. Follow Course administration ► Users ► Enrolment methods.
      8. Add a shared external tool with 'Tool to be provided' selected to assignment
      9. Follow Course administration ► Shared external tools.
      10. Click on Delete icon and press continue on confirmation.
      11. You will observe following

        Debug info: SELECT id FROM {enrol_lti_tools} WHERE enrolid = ?
        [array (
        0 => '11',
        )]
        Error code: invalidrecord
        ×Stack trace:
        line 1502 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
        line 1478 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
        line 178 of /enrol/lti/lib.php: call to moodle_database->get_record()
        line 1864 of /lib/enrollib.php: call to enrol_lti_plugin->unenrol_user()
        line 164 of /enrol/lti/lib.php: call to enrol_plugin->delete_instance()
        line 57 of /enrol/lti/index.php: call to enrol_lti_plugin->delete_instance()
        

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  23/May/16