Index: openacs-4/packages/attendance/lib/cp-attendance.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/attendance/lib/cp-attendance.adp,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/attendance/lib/cp-attendance.adp 6 Aug 2005 10:09:17 -0000 1.3
+++ openacs-4/packages/attendance/lib/cp-attendance.adp 18 Dec 2005 03:07:26 -0000 1.4
@@ -1,9 +1,8 @@
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 --"