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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.6
    • 3.5.4, 3.6.2
    • Web Services
    • 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"

    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

              damyon Damyon Wiese
              damyon Damyon Wiese
              Simey Lameze Simey Lameze
              Jake Dallimore Jake Dallimore
              Janelle Barcega Janelle Barcega
              Juan Leyva, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                14/Jan/19

                Time Tracking

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