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

sitepolicynotagreed error appears on site policy page on clean

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      NB: Do everything on theme_clean.

      Test
      1. Comment out line 242 in lib/externallib.php (should look like $exception->backtrace = format_backtrace($exception->backtrace, true);.
      2. As admin set a site policy url.
      3. Log in as a student.
      4. Verify you do not see the messaging or notifications icons on the policy acceptance screen.
      5. Accept the policy.
      6. Verify that the messaging and notifications icons have reappeared and you can use them as expected.
      7. As admin unset the site policy url.
      8. Log in as another user who has not agreed to the site policy you set earlier.
      9. Verify that the messaging and notifications icons are present and you can use them as expected.
      Show
      NB : Do everything on theme_clean. Test Comment out line 242 in lib/externallib.php (should look like $exception->backtrace = format_backtrace($exception->backtrace, true); . As admin set a site policy url. Log in as a student. Verify you do not see the messaging or notifications icons on the policy acceptance screen. Accept the policy. Verify that the messaging and notifications icons have reappeared and you can use them as expected. As admin unset the site policy url. Log in as another user who has not agreed to the site policy you set earlier. Verify that the messaging and notifications icons are present and you can use them as expected.
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-56822-master

      Description

      sitepolicynotagreed error appears on site policy page after MDL-56292

      Note that this appears for sites without debugging enabled as well. With an ugly header of "undefined".

      Site policy not agreed: <a href="http://example.com">Click here to open the site policy.</a>

      Please note: HTML is escaped so it looks exactly like that. It's not a working link. Example.com is my site policy URL.

      This error is not useful to the user at all, they are just about to either accept or reject the policy

      It is probably caused by messaging trying to request messages before the policy is agreed to.

      This is where the exception is thrown: https://github.com/moodle/moodle/blob/master/lib/moodlelib.php#L2705

      The user can simply close the (two) dialog boxes that appear. But it's very poor user experience that we are introducing in 3.2

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cameron1729 cameron1729
              Reporter:
              johno John Okely
              Peer reviewer:
              Mark Nelson
              Integrator:
              Andrew Nicols
              Tester:
              Marina Glancy
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                5/Dec/16