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

SCORM 1.3: 'long-fill-in' and 'performance' interaction type correct_response fails if prefix not used

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.4.1, 3.5
    • 3.6
    • SCORM
    • MOODLE_34_STABLE, MOODLE_35_STABLE
    • MOODLE_36_STABLE
    • Hide

      upload the SCORM package attached to this issue
      Enter the SCORM package
      Make sure "It worked OK!" appears in the document body.

      (prior to this patch the alert "Failed to make an interaction with type..") will appear.

      Show
      upload the SCORM package attached to this issue Enter the SCORM package Make sure "It worked OK!" appears in the document body. (prior to this patch the alert "Failed to make an interaction with type..") will appear.

    Description

      The long-fill-in and performance types allow some optional information at the start of their correct_response strings for things like languages or case sensitivity.

      The function CRCheckValueNodes tries to strip these off before checking that the rest of the value is acceptable. However, the regexes to detect the prefix have been written in a way that they'll even match a string without the prefix.

      Fixing this just requires checking that the matched group exists, not just that the regex matches. I'm going to submit a fix immediately after filing this issue.

      Attachments

        Activity

          People

            Lawson-Perfect Christian Lawson-Perfect
            Lawson-Perfect Christian Lawson-Perfect
            Dan Marsden Dan Marsden
            David Monllaó David Monllaó
            Toni Barberà Toni Barberà
            Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              3/Dec/18