|
[
Permalink
| « Hide
]
Dongsheng Cai added a comment - 10/Nov/08 11:14 AM
a patch against 1.9
The new patch allows administrators editing description anytime
Committed to 1.9 and HEAD, please review.
you can not use get_record('role_assignments', 'userid', $userid) if there are multiple role assignments - it should some debugging error
instead please use record_exists() also please reorder the if condition so that the record_exists() is executed only when really needed
Oki, I've:
TODO: 1) I'd fix the setting help text a bit, indicating it's an anti-spam measure in some way. Right now the justification of the setting isn't clear IMO. Helen can you take a look to 1 & 2, plz... Thanks everybody! 1) How about:
$string['configprofilesforenrolledusersonly'] = 'To prevent misuse by spammers, profile descriptions of users who are not yet enrolled in any course are hidden. New users must enrol in at least one course before they can add a profile description.'; 2) Information about this setting added to Moodle Docs:
http://docs.moodle.org/en/Site_policies Looks perfect for me, Helen. +1
Thanks! Thanks Eloy, reworded lang string added to HEAD, 1.9 and 1.8.
Great! BTW... looking commits... I thin the setting has been backported to 1.7 too.
Ciao Thanks Eloy, I've added the reworded lang string to 1.7 too and have updated the documentation.
Hi, everyone, 1.6 is quite different from the other versions. Where should I place the profilesforenrolledusersonly setting in "Administration Page"?
Good question... hehe.
I think it used to be a "security" section under "config variables" or something like that. That was the place where things like $CFG->secureforms or $CFG->loginhttps were defined... hope it helps. I've performed some changes in the 16_STABLE version committed some hours ago:
Seems to be working fine now. Resolving as fixed. Someone else, please, review this. Ciao PS: And please, try to perform some test when committing things to stable branches. This was simply broken in too many places to be acceptable IMO. TIA! hmm,
1/ I am not sure this should be on by default - when adding new user the description field "disappears" ?? 2/ I can see this in 1.6.x when I view my own profile and description already there, but not enrolled: "This profile description will not be shown until this person is enrolled in at least one course." and not enrolled yet. This does not seem like correct English. Anyway, reopening and going to fix more coding problems there... Petr 1/ fixed undefined 2x $userid in 1.6.x
2/ fixe 1x undefined $userid in 1.7.x, BUT the use of non-existent capability moodle/user:editprofile will not probably work in all cases - this was a know problem fixed in 1.8.x only - maybe it is the right time to close 1.7.x branch and not commit anything there at all 3/ in 1.8.x the new code in definition_after_data() MUST verify that $userid is valid (changed in 1.9.x) - it was removing the description field always - this was totally untested, right? 4/ the restriction does not belong into advanced user edit form - it was removing the description if user had only create user cap Tested on 1.9. It works fine, thanks everybody.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||