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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.6
    • Fix Version/s: 3.5.4, 3.6.2
    • Component/s: Web Services
    • Labels:
    • Testing Instructions:
      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"
    • Affected Branches:
      MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
    • Pull 3.6 Branch:
    • Pull Master Branch:
      MDL-64004-master

      Description

      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.

       

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  14/Jan/19

                  Time Tracking

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