Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-64004

User course last access is still updated from some ajax requests.

XMLWordPrintable

    • MOODLE_36_STABLE
    • MOODLE_35_STABLE, MOODLE_36_STABLE
    • MDL-64004-master
    • Hide

      I cannot find a case that this would be noticeable in core (that doesn't already access a course). 

      We will have to change some code to test this!

      Setup: 

      1. Copy test.php (attached to this issue) into the top of your moodle install (same folder as config.php).

      2. Modify function user_accesstime_log() in lib/datalib.php . Add:

      die('fail');

      to the first blank line in this function.

      Test

      1. Make sure you're not logged in!

      2. Access <your moodle url>/test.php

      3. Verify:

      • You should see "pass"
      • You should not see "fail"
      Show
      I cannot find a case that this would be noticeable in core (that doesn't already access a course).  We will have to change some code to test this! Setup:  1. Copy test.php (attached to this issue) into the top of your moodle install (same folder as config.php). 2. Modify function user_accesstime_log() in lib/datalib.php . Add: die('fail'); to the first blank line in this function. Test 1. Make sure you're not logged in! 2. Access <your moodle url>/test.php 3. Verify: You should see "pass" You should not see "fail"

      MDL-63716 Fixed the most common case where a webservice called validate_context which updated the users accesstime to the course. There is still a case where a webservice could directly call require_course_login() and when this is done from a webservice it should not update the accesstime.

       

        1. image-2019-01-10-12-53-11-326.png
          12 kB
          Janelle Barcega
        2. test.php
          0.2 kB
          Damyon Wiese

            damyon Damyon Wiese
            damyon Damyon Wiese
            Simey Lameze Simey Lameze
            Jake Dallimore Jake Dallimore
            Janelle Barcega Janelle Barcega
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 15 minutes
                15m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.