I performed some tests with the device in offline and I found some errors and behaviors that I didn't like:
- In mod_page and mod_book there are two calls to $mmUtil.showErrorModal without the translate param set to true. That means that messages 'mma.mod_book.errorchapter' and 'mma.mod_page.errorwhileloadingthepage' are not translated.
- When we open a not downloaded page/resource/book/imscp two error messages are shown: one by course_content_handler (download failed) and another shown by the controller (failed to load). I think 1 modal should be enough. This one can be a bit tricky to fix.
- When doing a pull to refresh on notifications, the message "There are no notifications" is briefly shown.
- If I go to notifications and click "View" on a forum notification in offline, I go to a page with the text: NaN undefined NaN. (Forum not cached).
- If I go to a forum from course contents in offline an empty page is shown but no error message is shown. (Forum not cached).
- If I go to a mod_assign in offline I can see "No due date" and "Add submission". I think we shouldn't see them. (Assign not cached).
- If I see a not cached participant in offline, the picture sometimes is not shown (it should have been cached in participants list).
- Add/Block contact in offline don't show an error message and the button text moves a bit.
- If I add a note but the request fails I lose all the text I wrote.
- The last message in a discussion is behind the "Send" button.
- $mmSitesManager gets $mmApp DB when it's initialized. This might be too soon in some cases, it should be retrieved when it's needed.
- In contacts view, search cannot be cleared if no results found.
- I go to discussions list, I see last message in a discussion is "A". I go into the discussions, I add new messages (or the other sends new messages). When I go back to discussions list, the last message is still "A" (is not updated unless I pull to refresh).
- In a discussion, when the keyboard is opened it hides the last messages, I have to scroll to see them. IMO they should move along with the keyboard, so they're still visible.
- There's a problem in mod_page if the module has some resources that are not shown on the page. If the user downloads it using the download icon it works fine, since it downloads all the files. But if the user accesses the page, the course handler waits for ALL the resources to be downloaded, but we only download the ones shown. We need to fetch all the page resources like we do in book and so (this can affect mod_resource too).
- Sometimes WS responses aren't stored in cache, an error appears in console saying that the object couldn't be cloned. This is because handlers are added to the objects to be stored. We need to clone the object returned in $mmSite.request, not in $mmWS.call.