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

LTI Outcomes service returns 0 when no grade exists

XMLWordPrintable

    • MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE
    • MOODLE_29_STABLE, MOODLE_30_STABLE
    • MDL-50218-master
    • Hide
      Prerequisites
      1. A site that is accessible publicly. You can use ngrok for this. If you use ngrok you may want to set up the course and LTI module first, and only after that actually activate ngrok (This will save time as it loads slowly)
      Test
      1. Create an LTI instance in a course
      2. Set its url to http://ltiapps.net/test/tp.php
      3. Open the LTI instance
      4. In the LTI, click outcomes
      5. Click 'Read'
      6. Make sure the returned grade is empty, not zero
      7. Click 'Update'
      8. Type a grade (e.g. 0.7)
      9. Click 'Read'
      10. Make sure that same grade is returned
      11. Click 'Delete'
      12. Click 'Read'
      13. Make sure the returned grade is empty, not zero
      Show
      Prerequisites A site that is accessible publicly. You can use ngrok for this. If you use ngrok you may want to set up the course and LTI module first, and only after that actually activate ngrok (This will save time as it loads slowly) Test Create an LTI instance in a course Set its url to http://ltiapps.net/test/tp.php Open the LTI instance In the LTI, click outcomes Click 'Read' Make sure the returned grade is empty, not zero Click 'Update' Type a grade (e.g. 0.7) Click 'Read' Make sure that same grade is returned Click 'Delete' Click 'Read' Make sure the returned grade is empty, not zero

      Requests to read an outcome value using the LTI 1.1 Basic Outcomes service returns a value of zero when no grade exists for the user. When the grade is deleted (using the LTI 1.1 Basic Outcomes service) a grade item is created with a value of zero and a read request continues to return a zero value, even though the grade has supposedly been deleted. I would regard a value of zero as being different from the absence of a grade, which I would expect to be returned as an empty string. As per section 6.1.2 of the LTI 1.1 specification:

      If the grade has not yet been set via a replaceResult operation or an existing grade has been deleted via a deleteResult operation, the TC should return a valid response with a present but empty textString element. The TC should not return 0.0 to indicate a non-existent grade and the TC should not return a failure status when a grade does not exist. It should simply return an "empty" grade.

            johno John Okely
            svickers Stephen Vickers
            Simey Lameze Simey Lameze
            David Monllaó David Monllaó
            Rajesh Taneja Rajesh Taneja
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

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