Forum .LRN Q&A: Help! User default portal changes when a class is joined?

Hi folks,

This is dotlrn-2.0.3

The site I'm setting up requires only the 'join a community' portlet on the My Space page.  I edited the user portal to remove the other portlets from the first My Space page.

When I create a new user, that user sees only the 'join a community' portlet, as desired.  However, as soon as the user joins a class, the wimpypoint-slim and webblogger portlets appear in My Space.

Can someone help me to understand how to prevent them from doing this?

Thanks!

Cathy

Collapse
Posted by Cathy Sarisky on
I've found a way to do this. In dotlrn-<package>/tcl/dotlrn-<package>-procs.tcl:

ad_proc -public dotlrn_<package>::add_user_to_community {
    community_id
    user_id
} {
    Add a user to a specifc dotlrn community
} {    set package_id [dotlrn_community::get_applet_package_id -community_id $community_id -applet_key [app
let_key]]
    set portal_id [dotlrn::get_portal_id -user_id $user_id]

    # use "append" here since we want to aggregate
    set args [ns_set create]
    ns_set put $args package_id $package_id
    ns_set put $args param_action append
#    add_portlet_helper $portal_id $args
}

By commenting out the last line, I get the desired non-addition to the user's My Space page.  Works in dotlrn-weblogger and some custom code.  Unfortunately, it also makes it so that the user can't add the portlet to their 'My Space' portal later either.

Can someone point out a way to set up weblogger so that it does NOT appear on the user's My Space when the user joins a class with it, but so that it DOES show up in the list of portlets the user can put in their My Space page?

Thanks!