Index: openacs-4/packages/attendance/lib/cp-attendance.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/attendance/lib/cp-attendance.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/attendance/lib/cp-attendance.tcl 13 Aug 2005 13:09:06 -0000 1.9 +++ openacs-4/packages/attendance/lib/cp-attendance.tcl 18 Dec 2005 03:07:26 -0000 1.10 @@ -17,7 +17,11 @@ set attendance_url [apm_package_url_from_id $attendance_package_id] set calendar_id [dotlrn_calendar::get_group_calendar_id -community_id $community_id] set calendar_url [calendar_portlet_display::get_url_stub $calendar_id] -set item_type_id [db_string item_type_id "" -default 0] + +if { ! [db_0or1row item_type_id { }] } { + set item_type_id [calendar::item_type_new -calendar_id $calendar_id -type "Session"] +} + set grade_item_id [db_string "getgradeid" ""] # ns_log Notice " -- Attendance Package ID : $attendance_package_id, Grade Item : $grade_item_id --"