cal-item-procs.tcl

Utility functions for Calendar Applications

Location:
packages/calendar/tcl/cal-item-procs.tcl
Created:
Jan 11, 2001
Authors:
Dirk Gomez <openacs@dirkgomez.de>
Gary Jin <gjin@arsdigita.com>
Ben Adida <ben@openforce.net>
CVS Identification:
$Id: cal-item-procs.tcl,v 1.35.2.9 2023/02/24 12:53:08 antoniop Exp $

Procedures in this file

Detailed information

calendar::item::add_recurrence (public)

 calendar::item::add_recurrence -cal_item_id cal_item_id \
    -interval_type interval_type -every_n every_n \
    [ -days_of_week days_of_week ] [ -recur_until recur_until ]

Adds a recurrence for a calendar item

Switches:
-cal_item_id (required)
-interval_type (required)
-every_n (required)
-days_of_week (optional)
-recur_until (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_cal_item_add_delete cal_item_add_delete (test calendar) calendar::item::add_recurrence calendar::item::add_recurrence test_cal_item_add_delete->calendar::item::add_recurrence test_cal_item_edit_recurrence cal_item_edit_recurrence (test calendar) test_cal_item_edit_recurrence->calendar::item::add_recurrence db_dml db_dml (public) calendar::item::add_recurrence->db_dml db_exec_plsql db_exec_plsql (public) calendar::item::add_recurrence->db_exec_plsql db_transaction db_transaction (public) calendar::item::add_recurrence->db_transaction Class ::xo::ical::VCALITEM Class ::xo::ical::VCALITEM (public) Class ::xo::ical::VCALITEM->calendar::item::add_recurrence calendar_item_add_recurrence calendar_item_add_recurrence (public, deprecated) calendar_item_add_recurrence->calendar::item::add_recurrence packages/calendar/www/cal-item-create-recurrence.tcl packages/calendar/ www/cal-item-create-recurrence.tcl packages/calendar/www/cal-item-create-recurrence.tcl->calendar::item::add_recurrence xo::ical::VCALITEM instproc add_recurrence xo::ical::VCALITEM instproc add_recurrence (public) xo::ical::VCALITEM instproc add_recurrence->calendar::item::add_recurrence xo::ical::VCALITEM instproc edit_recurrence xo::ical::VCALITEM instproc edit_recurrence (public) xo::ical::VCALITEM instproc edit_recurrence->calendar::item::add_recurrence

Testcases:
cal_item_edit_recurrence, cal_item_add_delete

calendar::item::all_day_event (private)

 calendar::item::all_day_event start_date_ansi end_date_ansi

Determine, if an event is an all day event depending on the ansi start and end dates (e.g. "2018-03-22 00:00:00" and "2018-03-23 00:00:00"). The event is a full_day event, when both start_date and end_date do not specify a time, which in the datamodel means both dates are set at midnight.

Parameters:
start_date_ansi (required)
end_date_ansi (required)

Partial Call Graph (max 5 caller/called nodes):
%3 calendar::item::get calendar::item::get (public) calendar::item::all_day_event calendar::item::all_day_event calendar::item::get->calendar::item::all_day_event

Testcases:
No testcase defined.

calendar::item::assign_permission (public, deprecated)

 calendar::item::assign_permission cal_item_id party_id permission \
    [ revoke ]
Deprecated. Invoking this procedure generates a warning.

update the permission of the specific cal_item if revoke is set to revoke, then we revoke all permissions DEPRECATED: this api is in fact a trivial wrapper for the permission api.

Parameters:
cal_item_id (required)
party_id (required)
permission (required)
revoke (optional)
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) permission::grant permission::grant (public) permission::revoke permission::revoke (public) calendar::item::assign_permission calendar::item::assign_permission calendar::item::assign_permission->ad_log_deprecated calendar::item::assign_permission->permission::grant calendar::item::assign_permission->permission::revoke

Testcases:
No testcase defined.

calendar::item::dates_valid_p (private)

 calendar::item::dates_valid_p -start_date start_date \
    -end_date end_date

A sanity check that the start time is before the end time.

Switches:
-start_date (required)
-end_date (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_cal_item_start_end_date_validation cal_item_start_end_date_validation (test calendar) calendar::item::dates_valid_p calendar::item::dates_valid_p test_cal_item_start_end_date_validation->calendar::item::dates_valid_p ad_log ad_log (public) calendar::item::dates_valid_p->ad_log db_string db_string (public) calendar::item::dates_valid_p->db_string calendar::item::edit calendar::item::edit (public) calendar::item::edit->calendar::item::dates_valid_p calendar::item::new calendar::item::new (public) calendar::item::new->calendar::item::dates_valid_p packages/calendar/www/cal-item-create-recurrence.tcl packages/calendar/ www/cal-item-create-recurrence.tcl packages/calendar/www/cal-item-create-recurrence.tcl->calendar::item::dates_valid_p packages/calendar/www/cal-item-new.tcl packages/calendar/ www/cal-item-new.tcl packages/calendar/www/cal-item-new.tcl->calendar::item::dates_valid_p

Testcases:
cal_item_start_end_date_validation

calendar::item::delete (public)

 calendar::item::delete -cal_item_id cal_item_id

Delete the calendar item

Switches:
-cal_item_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_cal_item_add_delete cal_item_add_delete (test calendar) calendar::item::delete calendar::item::delete test_cal_item_add_delete->calendar::item::delete callback callback (public) calendar::item::delete->callback db_exec_plsql db_exec_plsql (public) calendar::item::delete->db_exec_plsql calendar::apm::before_uninstantiate calendar::apm::before_uninstantiate (private) calendar::apm::before_uninstantiate->calendar::item::delete packages/calendar/www/cal-item-delete.tcl packages/calendar/ www/cal-item-delete.tcl packages/calendar/www/cal-item-delete.tcl->calendar::item::delete

Testcases:
cal_item_add_delete

calendar::item::delete_recurrence (public)

 calendar::item::delete_recurrence -recurrence_id recurrence_id

delete a recurrence

Switches:
-recurrence_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 test_cal_item_edit_recurrence cal_item_edit_recurrence (test calendar) calendar::item::delete_recurrence calendar::item::delete_recurrence test_cal_item_edit_recurrence->calendar::item::delete_recurrence db_exec_plsql db_exec_plsql (public) calendar::item::delete_recurrence->db_exec_plsql packages/calendar/www/cal-item-delete-all-occurrences.tcl packages/calendar/ www/cal-item-delete-all-occurrences.tcl packages/calendar/www/cal-item-delete-all-occurrences.tcl->calendar::item::delete_recurrence

Testcases:
cal_item_edit_recurrence

calendar::item::edit (public)

 calendar::item::edit -cal_item_id cal_item_id -start_date start_date \
    -end_date end_date -name name -description description \
    [ -item_type_id item_type_id ] [ -edit_all_p edit_all_p ] \
    [ -edit_past_events_p edit_past_events_p ] \
    [ -calendar_id calendar_id ] [ -location location ] \
    [ -related_link_url related_link_url ] \
    [ -related_link_text related_link_text ] \
    [ -redirect_to_rel_link_p redirect_to_rel_link_p ] \
    [ -cal_uid cal_uid ] [ -ical_vars ical_vars ]

Edit the item

Switches:
-cal_item_id (required)
-start_date (required)
-end_date (required)
-name (required)
-description (required)
-item_type_id (optional)
-edit_all_p (optional, defaults to "0")
-edit_past_events_p (optional, defaults to "1")
-calendar_id (optional)
-location (optional)
-related_link_url (optional)
-related_link_text (optional)
-redirect_to_rel_link_p (optional)
-cal_uid (optional)
-ical_vars (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_cal_item_edit_recurrence cal_item_edit_recurrence (test calendar) calendar::item::edit calendar::item::edit test_cal_item_edit_recurrence->calendar::item::edit _ _ (public) calendar::item::edit->_ ad_return_complaint ad_return_complaint (public) calendar::item::edit->ad_return_complaint ad_script_abort ad_script_abort (public) calendar::item::edit->ad_script_abort calendar::do_notifications calendar::do_notifications (public) calendar::item::edit->calendar::do_notifications calendar::item::dates_valid_p calendar::item::dates_valid_p (private) calendar::item::edit->calendar::item::dates_valid_p packages/calendar/www/cal-item-new.tcl packages/calendar/ www/cal-item-new.tcl packages/calendar/www/cal-item-new.tcl->calendar::item::edit

Testcases:
cal_item_edit_recurrence

calendar::item::edit_recurrence (public)

 calendar::item::edit_recurrence -event_id event_id \
    -start_date start_date -end_date end_date -name name \
    -description description [ -item_type_id item_type_id ] \
    [ -calendar_id calendar_id ] \
    [ -edit_past_events_p edit_past_events_p ]

edit a recurrence

Switches:
-event_id (required)
-start_date (required)
-end_date (required)
-name (required)
-description (required)
-item_type_id (optional)
-calendar_id (optional)
-edit_past_events_p (optional, defaults to "t")

Partial Call Graph (max 5 caller/called nodes):
%3 test_cal_item_edit_recurrence cal_item_edit_recurrence (test calendar) calendar::item::edit_recurrence calendar::item::edit_recurrence test_cal_item_edit_recurrence->calendar::item::edit_recurrence calendar::item::get calendar::item::get (public) calendar::item::edit_recurrence->calendar::item::get db_dml db_dml (public) calendar::item::edit_recurrence->db_dml db_exec_plsql db_exec_plsql (public) calendar::item::edit_recurrence->db_exec_plsql db_string db_string (public) calendar::item::edit_recurrence->db_string db_transaction db_transaction (public) calendar::item::edit_recurrence->db_transaction calendar::item::edit calendar::item::edit (public) calendar::item::edit->calendar::item::edit_recurrence

Testcases:
cal_item_edit_recurrence

calendar::item::get (public)

 calendar::item::get -cal_item_id cal_item_id [ -array array ] \
    [ -normalize_time_to_utc normalize_time_to_utc ]

Get the data for a calendar item

Switches:
-cal_item_id (required)
-array (optional)
-normalize_time_to_utc (optional, defaults to "0")

Partial Call Graph (max 5 caller/called nodes):
%3 test_cal_item_add_delete cal_item_add_delete (test calendar) calendar::item::get calendar::item::get test_cal_item_add_delete->calendar::item::get test_cal_item_edit_recurrence cal_item_edit_recurrence (test calendar) test_cal_item_edit_recurrence->calendar::item::get calendar::attachments_enabled_p calendar::attachments_enabled_p (public) calendar::item::get->calendar::attachments_enabled_p calendar::item::all_day_event calendar::item::all_day_event (private) calendar::item::get->calendar::item::all_day_event db_1row db_1row (public) calendar::item::get->db_1row db_string db_string (public) calendar::item::get->db_string lc_time_fmt lc_time_fmt (public) calendar::item::get->lc_time_fmt calendar::do_notifications calendar::do_notifications (public) calendar::do_notifications->calendar::item::get calendar::fts::datasource calendar::fts::datasource (private) calendar::fts::datasource->calendar::item::get calendar::fts::url calendar::fts::url (private) calendar::fts::url->calendar::item::get calendar::item::edit_recurrence calendar::item::edit_recurrence (public) calendar::item::edit_recurrence->calendar::item::get calendar::outlook::format_item calendar::outlook::format_item (public) calendar::outlook::format_item->calendar::item::get

Testcases:
cal_item_edit_recurrence, cal_item_add_delete

calendar::item::new (public)

 calendar::item::new -start_date start_date -end_date end_date \
    -name name -description description [ -calendar_id calendar_id ] \
    [ -item_type_id item_type_id ] [ -package_id package_id ] \
    [ -location location ] [ -related_link_url related_link_url ] \
    [ -related_link_text related_link_text ] \
    [ -redirect_to_rel_link_p redirect_to_rel_link_p ] \
    [ -cal_uid cal_uid ] [ -ical_vars ical_vars ]

Insert a new calendar item into the database

Switches:
-start_date (required)
-end_date (required)
-name (required)
-description (required)
-calendar_id (optional)
-item_type_id (optional)
-package_id (optional)
-location (optional)
-related_link_url (optional)
-related_link_text (optional)
-redirect_to_rel_link_p (optional)
-cal_uid (optional)
-ical_vars (optional)

Partial Call Graph (max 5 caller/called nodes):
%3 test_a_foreign_calendar_user a_foreign_calendar_user (test calendar) calendar::item::new calendar::item::new test_a_foreign_calendar_user->calendar::item::new test_cal_item_add_delete cal_item_add_delete (test calendar) test_cal_item_add_delete->calendar::item::new test_cal_item_edit_recurrence cal_item_edit_recurrence (test calendar) test_cal_item_edit_recurrence->calendar::item::new _ _ (public) calendar::item::new->_ ad_conn ad_conn (public) calendar::item::new->ad_conn ad_return_complaint ad_return_complaint (public) calendar::item::new->ad_return_complaint ad_script_abort ad_script_abort (public) calendar::item::new->ad_script_abort calendar::do_notifications calendar::do_notifications (public) calendar::item::new->calendar::do_notifications packages/calendar/www/cal-item-new.tcl packages/calendar/ www/cal-item-new.tcl packages/calendar/www/cal-item-new.tcl->calendar::item::new

Testcases:
a_foreign_calendar_user, cal_item_edit_recurrence, cal_item_add_delete

calendar_item_add_recurrence (public, deprecated)

 calendar_item_add_recurrence -cal_item_id cal_item_id \
    -interval_type interval_type -every_n every_n \
    [ -days_of_week days_of_week ] [ -recur_until recur_until ]
Deprecated. Invoking this procedure generates a warning.

Adds a recurrence for a calendar item

Switches:
-cal_item_id (required)
-interval_type (required)
-every_n (required)
-days_of_week (optional)
-recur_until (optional)
See Also:

Partial Call Graph (max 5 caller/called nodes):
%3 ad_log_deprecated ad_log_deprecated (public) calendar::item::add_recurrence calendar::item::add_recurrence (public) calendar_item_add_recurrence calendar_item_add_recurrence calendar_item_add_recurrence->ad_log_deprecated calendar_item_add_recurrence->calendar::item::add_recurrence

Testcases:
No testcase defined.
[ show source ]