Forum .LRN Q&A: Response to Can't add new events to Calendar

Collapse
Posted by Marcin Kuczkowski on
The order of arguments passed to cal_item_new when creating new event is wrong.
here is my attempt to solve this:

i have changed the function call
in /packages/calendar/tcl/cal-items.xql

< fullquery name="cal_item_create.cal_item_add">      
      < querytext>
	select cal_item__new (
					null,
					:on_which_calendar,
					null,
					null,
                                        null,
                                        null,
					:timespan_id,
					:activity_id,
					null,
					'cal_item',
					:on_which_calendar,
					now(),
					:creation_user,
					:creation_ip
	)

      </querytext>
</fullquery>
NOTE: the xml query tags should not have space between < and fullquery, here it is added so the signs are displayed correctly.