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

Display and retrieve un-expected erros in the app so we can get feedback

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1
    • Component/s: Others
    • Labels:
    • Testing Instructions:
      Hide
      1. Extract the contents of the attached file ("feedback.zip") to: http://prototype.moodle.net/mobile/feedback/
      2. Add an error to the app. E.g. open some service file and add this line in the service definition:

        var a = undefined;
        a.t = 'a';
        

      3. Install the app in a device and check that a confirm is shown right at the start. Check that if you click cancel nothing happens.
      4. Start the app again and now click OK. Check that a browser is opened, a success message is shown and the new tab is closed after a few seconds.
      5. See the contents of "feedback.txt" and check that the new report has been added to the end of the file.
      6. Check that you received a new mail with the report.
      Show
      Extract the contents of the attached file ("feedback.zip") to: http://prototype.moodle.net/mobile/feedback/ Add an error to the app. E.g. open some service file and add this line in the service definition: var a = undefined; a.t = 'a'; Install the app in a device and check that a confirm is shown right at the start. Check that if you click cancel nothing happens. Start the app again and now click OK. Check that a browser is opened, a success message is shown and the new tab is closed after a few seconds. See the contents of "feedback.txt" and check that the new report has been added to the end of the file. Check that you received a new mail with the report.
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE

      Description

      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");
      }
      

        Attachments

          Activity

            People

            Assignee:
            dpalou Dani Palou
            Reporter:
            jleyva Juan Leyva
            Peer reviewer:
            Juan Leyva
            Integrator:
            Juan Leyva
            Tester:
            Juan Leyva
            Participants:
            Component watchers:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              28/Aug/15