-
Improvement
-
Resolution: Fixed
-
Minor
-
2.1
-
-
MOODLE_21_STABLE
-
MOODLE_21_STABLE
In the former app I placed a javascript code in the index.html file (https://github.com/moodlehq/moodlemobile/blob/master/index.html#L10) in order to capture unexpected errors and display them to the final user via an alert message.
I was thinking that maybe we can improve that piece of code and use a "Confirm" dialog asking the user to submit the error. We can then implement a PHP page for retrieving and storing the errors in a local database (or file). In that case we should also retrieve the app version, Android/iOs version (if available), etc...
Something like:
var errormessage = '...';
|
var error = confirm(errormessage);
|
if (error) {
|
var version = ..;
|
var deviceModel = ..;
|
var osVersion = ..;
|
var reporturl = 'http://something.moodle.com/error.php?message=' + encodeURIComponent(errormessage) + '&appversion=' + version + 'etc..';
|
// Report message via inappbrowser
|
window.open(reporturl, "_blank");
|
}
|