Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-2095

Some array sorting isn't calculated right

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2.1
    • Fix Version/s: 3.3.0
    • Component/s: Others
    • Labels:
    • Testing Instructions:
      Hide
      1. In the app, open a message discussion. Check that the messages are ordered from oldest to newest.
      2. Open a SCORM with unlimited attempts both in web and in the app. In the app, go offline and do 2 attempts (use different answers to be able to identify them by grade). At the same time, do 1 attempt in web and finish it. Synchronize the app and check that the attempts are sent in order.
      3. In the app, go to private files and click to upload a file. Check that the upload methods are displayed in this order: album, camera, audio, video, file (Android), shared files (iOS).
      Show
      In the app, open a message discussion. Check that the messages are ordered from oldest to newest. Open a SCORM with unlimited attempts both in web and in the app. In the app, go offline and do 2 attempts (use different answers to be able to identify them by grade). At the same time, do 1 attempt in web and finish it. Synchronize the app and check that the attempts are sent in order. In the app, go to private files and click to upload a file. Check that the upload methods are displayed in this order: album, camera, audio, video, file (Android), shared files (iOS).
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Sprint:
      Moodle Mobile 3.3.0

      Description

      There are some places in the app where we do something like:

      array.sort(function(a, b) {
          return a > b;
      });
      

      This is wrong. The compare function must return a positive or negative value, not a boolean.

        Attachments

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            dpalou Dani Palou
            Peer reviewer:
            Dani Palou
            Integrator:
            Juan Leyva
            Tester:
            Berta Maroto
            Participants:
            Component watchers:
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              26/May/17