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

core-site-plugins-call-ws-on-load isn't executed when performing a PTR

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.5.2
    • 3.6.0
    • Site add-ons
    • Hide
      1. In a Moodle site, install the certificate plugin (the old one).
      2. Create a certificate in a course.
      3. In the app, open the certificate.
      4. In web, go to the logs of that course (Cog icon > More > Reports > Logs) and check that there is a log entry saying the student has viewed the activity.
      5. In the app, perform a PTR.
      6. In web, refresh the logs. Check that a new viewed entry has been added to the log.
      Show
      In a Moodle site, install the certificate plugin (the old one). Create a certificate in a course. In the app, open the certificate. In web, go to the logs of that course (Cog icon > More > Reports > Logs) and check that there is a log entry saying the student has viewed the activity. In the app, perform a PTR. In web, refresh the logs. Check that a new viewed entry has been added to the log.
    • Hide

      To ensure that the template is always recompiled, ensure that the content changes after each refresh.

      A simple way of doing this is to pass PHP's time() to the mustache template, and render it in an element with display: none;

      Show
      To ensure that the template is always recompiled, ensure that the content changes after each refresh. A simple way of doing this is to pass PHP's time() to the mustache template, and render it in an element with display: none;
    • MOODLE_35_STABLE
    • MOODLE_36_STABLE
    • Moodle Mobile 3.6.0

    Description

      This directive was created with logging in mind. In the app, we only call logging WebServices when the user opens a page, they aren't called when the user performs a PTR. It's not a bug, it was designed like this.

      However, the behaviour of this directive isn't consistent. If the user performs a PTR and the HTML or Javascript returned by the plugin has changed, the page is compiled and core-site-plugins-call-ws-on-load is executed (this cannot be prevented). If the HTML and javascript haven't changed, then the code isn't compiled and the directive isn't executed.

      We discussed this internally and we decided to always compile the code, even if it hasn't changed. This means that the directive will be executed when performing a PTR too.

      Attachments

        Activity

          People

            dpalou Dani Palou
            dpalou Dani Palou
            Pau Ferrer Pau Ferrer
            Juan Leyva Juan Leyva
            Albert Gasset Albert Gasset
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Jan/19