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

Site plugins cannot use the canBeCleared option in site schemas

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.8.1
    • 3.8.0
    • Site add-ons
    • Hide

      This issue should only be tested in 1 device.

      1. Install the plugin attached to this issue in a Moodle site. 
      2. In a course, create a group choice. Make sure to allow editing the response (to make it easier to test).
      3. In the app, login in the site and open the group choice.
      4. Go offline.
      5. WIthout leaving the group choice, go to the More tab > App Settings > Space usage.
      6. Remember the number of "entries in cache" displayed in the current site.
      7. Answer the choice. Check that you see a message saying that there's offline data, and the app displays the choice you selected in offline.
      8. Go back to the Space usage and perform a PTR. Check that the number of entries in cache has increased by 1.
      Show
      This issue should only be tested in 1 device. Install the plugin attached to this issue in a Moodle site.  In a course, create a group choice. Make sure to allow editing the response (to make it easier to test). In the app, login in the site and open the group choice. Go offline. WIthout leaving the group choice, go to the More tab > App Settings > Space usage. Remember the number of "entries in cache" displayed in the current site. Answer the choice. Check that you see a message saying that there's offline data, and the app displays the choice you selected in offline. Go back to the Space usage and perform a PTR. Check that the number of entries in cache has increased by 1.
    • MOODLE_38_STABLE
    • MOODLE_38_STABLE
    • Moodle App 3.8.1

      As pointed out by Noel in MOBILE-3277, since the site plugins schemas aren't added to the siteSchemas object they cannot use the canBeCleared option. We aren't adding the site plugins schemas to the object because we don't want them to be created by all sites. One possible solution is to add a new calculated property in the schema to indicate that the schema should only be created on the current site or something like that.

      Also, right now we're assuming that all schemas registered after the site has been created belong to site plugins, and this could change in the future. The only solution we thought of is to create a subclass of CoreSitesProvider with a different implementation of registerSiteSchema, and send that subclass to the site plugins instead of the original one.

            dpalou Dani Palou
            dpalou Dani Palou
            Noel De Martin Noel De Martin
            Juan Leyva Juan Leyva
            Isabel Renedo Rouco Isabel Renedo Rouco
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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