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

LTI Advantage content selection error when workshop or other multi-grade-item activities are present

XMLWordPrintable

      The workshop activity includes both a submission grade item and an assessment grade item. If you want to publish both of those graded activities as an LTI to a platform, an error is thrown:

      In enrol/lti/classes/local/ltiadvantage/repository/published_resource_repository.php, line 101, grade_item::fetch() is called.

      That's in lib/grade/grade_item.php, line 366, and wraps grade_object::fetch_helper, line 159 of lib/grade/grade_object.php

      This throws an exception if the count of grade items for a module instance is more than 1, however workshop is designed to have 2 grade items.

      If anyone has any direction on what a good fix here may be, I'm all ears.

      I'm looking into previous patches for insight into the error: "Found more than one record in fetch()"

      Replication steps

      1. Set up two Moodle sites: a platform site (consumer) and a tool site (provider). See the published as LTI tool docs for more information
      2. In the tool site, create a workshop in a course.
      3. Publish the workshop using LTI Advantage (the enrolment instance will be created)
      4. In the platform site, add a new instance of the external tool you've configured in step 1.
      5. When on the mod edit form, click "Select content"
        Expected: You can see those activities published in the tool
        Actual: You see an exception, as above.

      Workaround

      Don't use deep linking to create the resource link + line item binding. Instead, create the resource link manually, using the id=xxxx param provided on the Published as LTI tools page in the tool course.

            jaked Jake Dallimore
            liammoran Liam Moran
            Jordi Pujol-Ahulló Jordi Pujol-Ahulló
            Andrew Lyons Andrew Lyons
            CiBoT CiBoT
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.