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

scorm not retrieving order of scos correctly.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 2.6
    • Fix Version/s: None
    • Component/s: SCORM
    • Labels:
    • Testing Instructions:
      Hide

      this is specific to a particular environment that includes Postgres 9.4 (would be good if Andrew Nicols could test this)
      Restore the backup file attached to MDL-44753 into a new course. (you only need to restore the SCORM package)

      Enter the SCORM package and make sure it loads the first sco when you enter it (before the patch it loads the last SCO in certain environments)

      Show
      this is specific to a particular environment that includes Postgres 9.4 (would be good if Andrew Nicols could test this) Restore the backup file attached to MDL-44753 into a new course. (you only need to restore the SCORM package) Enter the SCORM package and make sure it loads the first sco when you enter it (before the patch it loads the last SCO in certain environments)
    • Affected Branches:
      MOODLE_26_STABLE
    • Pull Master Branch:
      master_MDL-44919

      Description

      When a scorm is restored that has scos with no sortorder listed (pre 2.6 backups) - it seems to get the wrong order of scos as the sortorder = 0 for all scos.

      we need to add a check to sort by sortorder then id to help make sure this picks up the right scos.
      this:

                  $scoes = $DB->get_records_select('scorm_scoes', $sqlselect, array($scormid), 'sortorder', 'id', 0, 1);
      

      should be this:

                  $scoes = $DB->get_records_select('scorm_scoes', $sqlselect, array($scormid), 'sortorder, id', 'id', 0, 1);
      

      the existing code appears to work fine for me on Posgrest 9.1 but on Andrews Postgres 9.4 which may have different perf tweaks it fails - adding the sort for id seems to fix it.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              danmarsden Dan Marsden
              Reporter:
              danmarsden Dan Marsden
              Peer reviewer:
              Frédéric Massart
              Participants:
              Component watchers:
              Damyon Wiese, Dan Marsden, Matteo Scaramuccia, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: