Update Course only if the connection is available
Resource opening temporary fix

There is a problem with the new cordova file plugin and webintent
plugin. The persistent location url such as cdvfile://... and
file:///data/data... don't work with the current version of the
webintent plugin. The MoodleMobApp.app.openFile() now uses the
MoodleMobApp.app.openURL() to open the files. The url is given by
the fileEntry.toNativeURL() function and it start with
file:///data/data.
The inappbrowser plugin can open only the web compatible files so
this is just a quirk and not the final solution.