| |
38 |
38 |
-name session_list \ |
| |
39 |
39 |
-multirow session_list \ |
| |
40 |
40 |
-pass_properties { attendance_url current_url calendar_url calendar_id item_type_id } \ |
| |
41 |
41 |
-key task_id \ |
| |
42 |
42 |
-no_data "No sessions" \ |
| |
43 |
43 |
-elements { |
| |
44 |
44 |
session_name { |
| |
45 |
45 |
label "Session" |
| |
46 |
46 |
display_template { <a href="@calendar_url@cal-item-view?cal_item_id=@session_list.cal_item_id@">@session_list.session_name@</a> } |
| |
47 |
47 |
} |
| |
48 |
48 |
date_time { |
| |
49 |
49 |
label "Date and Time" |
| |
50 |
50 |
} |
| |
51 |
51 |
action { |
| |
52 |
52 |
label "Actions" |
| |
53 |
53 |
html "nowrap" |
| |
54 |
54 |
display_template { <a href="@calendar_url@cal-item-new?cal_item_id=@session_list.cal_item_id@&return_url=@current_url@">Edit</a> | <a href="@attendance_url@admin/mark?item_id=@session_list.item_id@&return_url=@current_url@">Attendance</a> | <a href="@attendance_url@admin/print?item_id=@session_list.item_id@" target='_blank'>Print</a> <br> <a href="@attendance_url@admin/task-delete?task_id=@session_list.task_id@&grade_id=@session_list.grade_id@&return_url=@current_url@"> Delete</a> | <a href="@attendance_url@admin/spam?item_id=@session_list.cal_item_id@&return_url=@current_url@">Email Attendees</a> } |
| |
55 |
55 |
} |
| |
56 |
56 |
} |
| |
57 |
57 |
|
| |
58 |
|
db_multirow -extend {session_name cal_item_id date_time grade_id} session_list get_sessions { } { |
| |
|
58 |
db_multirow -extend {session_name cal_item_id date_time grade_id date_time_serial} session_list get_sessions { } { |
| |
59 |
59 |
set cal_item_id [db_string "getcalid" "select cal_item_id from evaluation_cal_task_map where task_item_id=:item_id" -default ""] |
| |
60 |
60 |
set session_name [db_string "geteventname" "select name from acs_events where event_id=:cal_item_id" -default ""] |
| |
61 |
61 |
set grade_id [db_string "getgradeid" "select grade_id from evaluation_grades where grade_item_id = :grade_item_id" -default ""] |
| |
62 |
|
set date_time [db_string datetime { |
| |
63 |
|
select to_char(start_date, 'Mon dd, yyyy hh:miam-')||to_char(end_date, 'hh:miam') |
| |
|
62 |
|
| |
|
63 |
set date_time "" |
| |
|
64 |
set date_time_serial 0 |
| |
|
65 |
db_0or1row datetime { |
| |
|
66 |
select to_char(start_date, 'Mon dd, yyyy hh:miam-')||to_char(end_date, 'hh:miam') as date_time, to_char(start_date, 'yyyymmddhhmi') as date_time_serial |
| |
64 |
67 |
from cal_items ci, acs_events e, acs_activities a, timespans s, time_intervals t |
| |
65 |
68 |
where e.timespan_id = s.timespan_id |
| |
66 |
69 |
and s.interval_id = t.interval_id |
| |
67 |
70 |
and e.activity_id = a.activity_id |
| |
68 |
71 |
and e.event_id = ci.cal_item_id |
| |
69 |
72 |
and ci.cal_item_id = :cal_item_id |
| |
70 |
|
} -default ""] |
| |
71 |
73 |
} |
| |
|
74 |
} |
| |
72 |
75 |
|
| |
|
76 |
template::multirow sort session_list date_time_serial |
| |
|
77 |
|
| |
73 |
78 |
} else { |
| |
74 |
79 |
set return_url [ad_return_url] |
| |
75 |
80 |
set create_session_type_url [export_vars -base "attendance/admin/create-cal-session-type" { return_url calendar_id }] |
| |
76 |
81 |
set attendance_msg "To use the Attendance Tracking feature you must create a \"Session\" designtation for calendar events. Click <a href=\"$create_session_type_url\">here</a> to let the system create the \"Session\" designation and enable attendance tracking." |
| |
77 |
82 |
} |
| |
78 |
83 |
|