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

Logs stored in offline aren't deleted if WS returns an error

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.7.2
    • Fix Version/s: None
    • Component/s: Database add-on, Logging
    • Labels:
      None
    • Affected Branches:
      MOODLE_37_STABLE
    • Sprint:
      Moodle App 3.8.0

      Description

      If you open in offline a database that hasn't been opened before, the logView function is called without a databaseid. This data is stored in a local DB, so the app will call the WS to view a database without the ID, so the WS fails. The app should delete the log if the WS returns an error, but it doesn't so the call is retried every certain time.

      How to reproduce:

      1. Add a new site in the app and open a course.
      2. Go offline.
      3. Open a database. You should see an error saying you aren't connected.
      4. Leave the database and go online. The app should now start doing requests to log database without sending an ID.

      We need to fix 2 things in this issue:

      1. In database index, it calls logView if this.data exists, but this.data is initialized to an empty object so it always exists.
      2. Logs should be deleted if the WS call fails.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              dpalou Dani Palou
              Participants:
              Component watchers:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: