Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Talk:Anonymous Users

From MoodleDocs
Revision as of 09:56, 14 April 2011 by sam marshall (talk | contribs) (→‎Forum table changes: new section)

Are you sure it should be a user_alias_course table? The other option would be to do user_alias_context, which would be more flexible. Not sure if you need the flexibility, but increasingly in Moodle things are being linked to contexts.

Good point Tim. I played with the code and it actually is a lot easier than I imagined, mostly thanks to seeing the code you did for the filters. Overall I think it does give maximum fexibility so will approach it this way. --Shane Elliott 09:41, 1 May 2010 (UTC)

Forum table changes

Spec doesn't seem to mention the necessary changes to forum tables; forum_posts needs an 'anonymous' field, at least.

Also I didn't really understand how to implement support for this in a module. For instance I guess I could define FEATURE_ANONYMOUS in my module _supports function and then it would automatically add the option to the mod_form for me, but it doesn't say that.

Then should the anonymous option for that module be stored in course_modules? (I see the desire to do it with context but there is no standard UI for editing things in different contexts and we can't support it across all modules without module changes so there is no point offering it at course level... or is there...)

If it's not in course_modules then as we are going to need it in lots of places potentially, should it be cached in modinfo?

If you don't have permission to view anonymous, but you do have permission to view the 'forum posts' tab on the user profile, then this tab needs to not include anonymous messages...

I think this is probably a lot more difficult (to do properly) than what's already included in the spec. :(

You could code it a bit more easily as a feature specific to forum, though.