| |
441 |
441 |
event |
| |
442 |
442 |
old_value |
| |
443 |
443 |
new_value |
| |
444 |
444 |
} { |
| |
445 |
445 |
listens for the following events: rename |
| |
446 |
446 |
} { |
| |
447 |
447 |
switch $event { |
| |
448 |
448 |
rename { |
| |
449 |
449 |
handle_rename -community_id $community_id -old_value $old_value -new_value $new_value |
| |
450 |
450 |
} |
| |
451 |
451 |
} |
| |
452 |
452 |
} |
| |
453 |
453 |
|
| |
454 |
454 |
ad_proc -private dotlrn_calendar::handle_rename { |
| |
455 |
455 |
{-community_id:required} |
| |
456 |
456 |
{-old_value:required} |
| |
457 |
457 |
{-new_value:required} |
| |
458 |
458 |
} { |
| |
459 |
459 |
what to do in calendar when a dotlrn community is renamed |
| |
460 |
460 |
} { |
| |
461 |
|
calendar::rename -calendar_id [get_group_calendar_id -community_id $community_id] -name $new_value |
| |
|
461 |
calendar::rename -calendar_id [get_group_calendar_id -community_id $community_id] -calendar_name $new_value |
| |
462 |
462 |
} |
| |
463 |
463 |
|
| |
464 |
464 |
# |
| |
465 |
465 |
# Some dotlrn_calendar specific procs |
| |
466 |
466 |
# |
| |
467 |
467 |
|
| |
468 |
468 |
ad_proc -public dotlrn_calendar::get_group_calendar_id { |
| |
469 |
469 |
{-community_id:required} |
| |
470 |
470 |
} { |
| |
471 |
471 |
Find the group_calendar_id for the given community |
| |
472 |
472 |
} { |
| |
473 |
473 |
set portal_id [dotlrn_community::get_portal_id \ |
| |
474 |
474 |
-community_id $community_id |
| |
475 |
475 |
] |
| |
476 |
476 |
|
| |
477 |
477 |
# get the calendar element for this community |
| |
478 |
478 |
set element_id [portal::get_element_ids_by_ds \ |
| |
479 |
479 |
$portal_id \ |
| |
480 |
480 |
[calendar_portlet::get_my_name] |
| |
481 |
481 |
] |