The archive for REL1_31 [1] downloaded with the help of Extension:ExtensionDistributor contains 3 files only (.gitreview, version, gitinfo.json) thus it won't work due to many missing files (i.e. comparing with REL1_32). According to the Infobox it is supposed to work since MW1.27.
It seems Extension:UserAgreement works in MW1.31 if installing REL1_32 v.1.0.1 (8bf7dd1) , at least the Mediawiki:Useragreement
page is available. But after the user agreement message was filled, no message is presented (for logged in users) in opposite as expected.
[1] https://extdist.wmflabs.org/dist/extensions/UserAgreement-REL1_31-6096342.tar.gz