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

Check the usage of module.contents

XMLWordPrintable

    • Hide
      1. Access the site that reported problems with module.contents.
      2. Check that no errors are shown in the log when seeing the course or opening the affected resources. To identify resources with this problem, look for the ones that don't have a file icon (they have a generic icon).

      If you want to check how would the app behave if any of these resources lack contents, you only have to modify the new function addContentsIfNeeded so it always set an empty array. You'll see that an error message is shown when you try to open any of these resources.

      Show
      Access the site that reported problems with module.contents. Check that no errors are shown in the log when seeing the course or opening the affected resources. To identify resources with this problem, look for the ones that don't have a file icon (they have a generic icon). If you want to check how would the app behave if any of these resources lack contents, you only have to modify the new function addContentsIfNeeded so it always set an empty array. You'll see that an error message is shown when you try to open any of these resources.
    • MOODLE_28_STABLE
    • MOODLE_28_STABLE

      While fixing MOBILE-1375 we noticed that there are a lot of areas where module.contents is used without checking if the value is undefined/null

      We need to do a complete review of the usage to avoid unexpected errors.

      Note that module.contents empty only happens under weird circumstances in a Moodle installation so it's not easy to reproduce

            dpalou Dani Palou
            jleyva Juan Leyva
            Juan Leyva Juan Leyva
            Juan Leyva Juan Leyva
            Juan Leyva Juan Leyva
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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