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

policyagreed isn't recalculated after accepting policies in "Policies and agreements"

XMLWordPrintable

    • MOODLE_404_STABLE
    • MOODLE_403_STABLE, MOODLE_404_STABLE
    • MDL-80973-403
    • MDL-80973-404
    • MDL-80973-master
    • Hide
      1. Expose your site using ngrok or localtunnel.
      2. As admin, go to "Site administration > User > Privacy and policies > Policy settings" and set "Site policy handler" to tool_policy.
      3. Go to "Site administration > User > Privacy and policies > Manage policies" and create a new mandatory policy.
      4. In a different browser, login with a user (not admin) and accept the policy. I'll call this user "user A". Do NOT logout with this user.
      5. As admin, go to "Manage policies" again and click to Edit the existing policy. 
      6. Change anything, make sure the "Minor change" checkbox is unchecked and save changes.
      7. With user A, go to your profile > Policies and agreements.
      8. In the list of policies, click to Accept the new policy.
      9. Open the Moodle mobile app, connect to the site using user A
      10. Confirm that:
        1. You are able to browse your courses and don't see any error regarding policies pending agreement
      Show
      Expose your site using ngrok or localtunnel. As admin, go to "Site administration > User > Privacy and policies > Policy settings" and set "Site policy handler" to tool_policy. Go to "Site administration > User > Privacy and policies > Manage policies" and create a new mandatory policy. In a different browser, login with a user (not admin) and accept the policy. I'll call this user "user A". Do NOT logout with this user. As admin, go to "Manage policies" again and click to Edit the existing policy.  Change anything, make sure the "Minor change" checkbox is  unchecked  and save changes. With user A, go to your profile > Policies and agreements. In the list of policies, click to Accept the new policy. Open the Moodle mobile app, connect to the site using user A Confirm that: You are able to browse your courses and don't see any error regarding policies pending agreement

      This doesn't have any impact in LMS because a user that has already logged in doesn't need to accept policies again until he logs in again, but this blocks WebService calls so it's affecting the app.

      Steps to reproduce the problem:

      1. As admin, go to "Site administration > User > Privacy and policies > Policy settings" and set "Site policy handler" to tool_policy.
      2. Go to "Site administration > User > Privacy and policies > Manage policies" and create a new mandatory policy.
      3. In a different browser, login with a user (not admin) and accept the policy. I'll call this user "user A". Do NOT logout with this user.
      4. As admin, go to "Manage policies" again and click to Edit the existing policy. 
      5. Change anything, make sure the "Minor change" checkbox is unchecked and save changes.
      6. With user A, go to your profile > Policies and agreements.
      7. In the list of policies, click to Accept the new policy.

      At this point, policyagreed is still 0 in the database (user table). The user A is still able to use LMS in the browser, but calling certain WebServices will fail with the sitepolicynotagreed error.

      This means the user cannot access the site using the Moodle app because the WebServices fail, but if we check the policies we detect that all of them have been accepted.

        1. MDL-80973.png
          219 kB
          Ron Carl Alfon Yu

            jleyva Juan Leyva
            dpalou Dani Palou
            Rodrigo Mady Rodrigo Mady
            Huong Nguyen Huong Nguyen
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 42 minutes
                4h 42m

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